Skip to content

Commit 27e9a59

Browse files
author
Kevin Paulisse
committed
Update documentation for new objects
1 parent 02954fa commit 27e9a59

7 files changed

Lines changed: 63 additions & 18 deletions

File tree

doc/dev/api/v1.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
# octocatalog-diff v1 API documentation
22

3-
## catalog
3+
## API calls
4+
5+
#### catalog
46

57
`catalog` allows you to build a catalog using the octocatalog-diff compiler or to obtain a catalog from a Puppet server.
68

7-
[Read more about `catalog`](/doc/dev/api/v1/catalog.md)
9+
[Read more about the `catalog` call](/doc/dev/api/v1/calls/catalog.md)
810

9-
## catalog-diff
11+
#### catalog-diff
1012

1113
`catalog-diff` allows you compare two catalogs and obtain the differences between them. Catalogs can be built if necessary.
1214

13-
[Read more about `catalog-diff`](/doc/dev/api/v1/catalog-diff.md)
15+
[Read more about the `catalog-diff` call](/doc/dev/api/v1/calls/catalog-diff.md)
1416

15-
## config
17+
#### config
1618

1719
`config` allows you read and parse an [octocatalog-diff configuration file](/doc/configuration.md).
1820

19-
[Read more about `config`](/doc/dev/api/v1/config)
21+
[Read more about the `config` call](/doc/dev/api/v1/calls/config.md)
22+
23+
## Objects
24+
25+
#### OctocatalogDiff::API::V1::Catalog
26+
27+
The `OctocatalogDiff::API::V1::Catalog` object represents a compiled catalog and supports several methods to get information about the catalog.
28+
29+
[Read more about the `OctocatalogDiff::API::V1::Catalog` object](/doc/dev/api/v1/objects/catalog.md)
30+
31+
#### OctocatalogDiff::API::V1::Diff
32+
33+
The `OctocatalogDiff::API::V1::Diff` object represents a difference between two catalogs and supports several methods to get information about the difference.
34+
35+
[Read more about the `OctocatalogDiff::API::V1::Diff` object](/doc/dev/api/v1/objects/diff.md)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,20 @@ catalog_diff_result = OctocatalogDiff::API::V1.catalog_diff(
1818

1919
## Return value
2020

21+
The return value is a structure in the following format:
22+
23+
```
24+
{
25+
diffs: Array<OctocatalogDiff::API::V1::Diff>,
26+
from: OctocatalogDiff::API::V1::Catalog,
27+
to: OctocatalogDiff::API::V1::Catalog
28+
}
29+
```
30+
31+
It is possible to query this object as a hash (e.g. `result[:diffs]`) or using methods (e.g. `result.diffs`).
32+
33+
[Read more about the `OctocatalogDiff::API::V1::Catalog` object](/doc/dev/api/v1/objects/catalog.md)
34+
35+
[Read more about the `OctocatalogDiff::API::V1::Diff` object](/doc/dev/api/v1/objects/diff.md)
36+
2137
## Exceptions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ catalog_obj = OctocatalogDiff::API::V1.catalog(
1717

1818
## Return value
1919

20-
The return value is an [`OctocatalogDiff::Catalog`](/doc/dev/api/v1/octocatalogdiff-catalog.md) object.
20+
The return value is an [`OctocatalogDiff::API::V1::Catalog`](/doc/dev/api/v1/objects/catalog.md) object.
2121

2222
## Exceptions
File renamed without changes.

doc/dev/api/v1/objects/catalog.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# octocatalog-diff v1 API documentation: OctocatalogDiff::API::V1::Catalog
2+
3+
## Overview
4+
5+
`OctocatalogDiff::API::V1::Catalog` is an object that represents a compiled catalog.
6+
7+
It wraps the [`OctocatalogDiff::Catalog`](/lib/octocatalog-diff/catalog.rb) object.
8+
9+
This object is the return value from the [`catalog`](/doc/dev/api/v1/calls/catalog.md) API call, and the `to` and `from` catalogs computed by the [`catalog-diff`](/doc/dev/api/v1/calls/catalog-diff.md) API call.
10+
11+
## Methods
12+
13+
## Exceptions

doc/dev/api/v1/objects/diff.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# octocatalog-diff v1 API documentation: OctocatalogDiff::API::V1::Diff
2+
3+
## Overview
4+
5+
`OctocatalogDiff::API::V1::Diff` is an object that represents a single difference between two catalogs.
6+
7+
The return value from the `diffs` computed by the [`catalog-diff`](/doc/dev/api/v1/calls/catalog-diff.md) API call is an Array of these `OctocatalogDiff::API::V1::Diff` objects.
8+
9+
## Methods
10+
11+
## Exceptions

doc/dev/api/v1/octocatalogdiff-catalog.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)