Skip to content

Commit 3d4e98d

Browse files
Align dataservice-read-catalog-example.md with latest changes
Change `catalog metadata` to `catalog configuration`. Reflect api changes in CatalogClient documentation. Add mentions of VersionLayerClient, where it used: retrieve partitions metadata and retrieve data. Resolves: OLPEDGE-1070 Signed-off-by: Diachenko Mykahilo <[email protected]>
1 parent 17beca1 commit 3d4e98d

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

docs/dataservice-read-catalog-example.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Read example
22

3-
This example shows how to retrieve catalog metadata, partition metadata, and partition data using the HERE OLP SDK for C++.
3+
This example shows how to retrieve catalog configuration, partition metadata, and partition data using the HERE OLP SDK for C++.
44

5-
Before you run the example, authorize by replacing the placeholders in `examples/dataservice-read/example.cpp` with your app access key id and secret access key, which you can find on the platform `Apps & keys` page:
5+
Before you run the example, authorize by replacing the placeholders in `examples/dataservice-read/example.cpp` with your app access key id and access key secret that you can find on the platform `Apps & keys` page:
66

77
```cpp
88
const std::string kKeyId(""); // your here.access.key.id
@@ -130,13 +130,12 @@ Once everything is set up correctly, build and run the example application on yo
130130

131131
### CatalogClient
132132

133-
The main entry point for the OLP is `CatalogClient`. This class provides a high-level interface for the retrieval of `OLP` catalog data and configuration, and defines the following operations:
133+
The main entry point for the OLP is `CatalogClient`. This class provides a high-level interface to retrieve `OLP` catalog data and configuration, and defines the following operations:
134134

135135
* `GetCatalog`: Fetches the catalog configuration asynchronously.
136-
* `GetPartitions`: Fetches the full list of partitions for the given generic layer asynchronously.
137-
* `GetData`: Fetches data of a partition or data handle asynchronously.
136+
* `GetLatestVersion`: Fetches the catalog version asynchronously.
138137

139-
To create a `CatalogClient`, provide the corresponding `HRN` (Here Resource Name) and preconfigured `OlpClientSettings`:
138+
To create a `CatalogClient`, provide the corresponding Here Resource Name (`HRN`) and the preconfigured `OlpClientSettings`:
140139

141140
```cpp
142141
// Create a task scheduler instance
@@ -180,9 +179,9 @@ The `OlpClientSettings` class pulls together all the different settings for cust
180179
181180
Configuration of the `authentication_settings` is sufficient to start using the `CatalogClient`.
182181
183-
### Retrieve catalog metadata
182+
### Retrieve catalog configuration
184183
185-
To retrieve catalog metadata, create a `CatalogRequest`. The `CatalogRequest` class allows to set properties of the catalog request, including:
184+
To retrieve catalog configuration, create a `CatalogRequest`. The `CatalogRequest` class allows you to set properties of the catalog request, including:
186185
187186
* `WithBillingTag`: Sets the billing tag used for this request.
188187
@@ -245,7 +244,7 @@ The `ApiError` class contains details regarding to the incurred error, including
245244

246245
### Retrieve partitions metadata
247246

248-
To retrieve partition metadata, create a `PartitionsRequest`. The `PartitionsRequest` class allows to set the properties of the catalog request, including:
247+
The `GetPartition` method in the `VersionedLayerClient` object fetches partitions metadata for a particular layer. To retrieve partitions metadata, create a `PartitionsRequest`. The `PartitionsRequest` class allows you to set the properties of the partition request, including:
249248

250249
* `WithBillingTag`: Sets the billing tag used for this request.
251250

@@ -276,7 +275,7 @@ The execution result is a `CancellableFuture` that contains `PartitionsResponse`
276275
// Wait for PartitionsResponse
277276
olp::dataservice::read::PartitionsResponse partitions_response =
278277
future.GetFuture().get();
279-
278+
280279
// Check the response
281280
if (partitions_response.IsSuccessful()) {
282281
const olp::dataservice::read::PartitionsResult& response_result =
@@ -302,10 +301,10 @@ The `Partition` class contains partition metadata and exposes the following memb
302301

303302
### Retrieve partition data
304303

305-
To retrieve partition data, create the `DataRequest`. The `DataRequest` class allows to specify the parameters of the `GetData` function, including:
304+
The `GetData` method in the `VersionedLayerClient` object fetches data for a partition or data handle asynchronously. To retrieve partition data, create the `DataRequest`. The `DataRequest` class allows you to specify the following parameters of the data request:
306305

307306
* `WithPartitionId`: Sets the partition for the data request.
308-
* `WithDataHandle`: Sets the requested data handle, which can be found via the GetPartition call in the `olp::dataservice::read::model::Partition::GetDataHandle` member.
307+
* `WithDataHandle`: Sets the requested data handle which can be found via the `GetPartition` call in the `olp::dataservice::read::model::Partition::GetDataHandle` member.
309308
* `WithBillingTag`: Sets the billing tag for the request.
310309

311310
```cpp

0 commit comments

Comments
 (0)