You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
Copy file name to clipboardExpand all lines: docs/dataservice-read-catalog-example.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Read example
2
2
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++.
4
4
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:
6
6
7
7
```cpp
8
8
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
130
130
131
131
### CatalogClient
132
132
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:
134
134
135
135
*`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.
138
137
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`:
140
139
141
140
```cpp
142
141
// Create a task scheduler instance
@@ -180,9 +179,9 @@ The `OlpClientSettings` class pulls together all the different settings for cust
180
179
181
180
Configuration of the `authentication_settings` is sufficient to start using the `CatalogClient`.
182
181
183
-
### Retrieve catalog metadata
182
+
### Retrieve catalog configuration
184
183
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:
186
185
187
186
* `WithBillingTag`: Sets the billing tag used for this request.
188
187
@@ -245,7 +244,7 @@ The `ApiError` class contains details regarding to the incurred error, including
245
244
246
245
### Retrieve partitions metadata
247
246
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:
249
248
250
249
*`WithBillingTag`: Sets the billing tag used for this request.
251
250
@@ -276,7 +275,7 @@ The execution result is a `CancellableFuture` that contains `PartitionsResponse`
@@ -302,10 +301,10 @@ The `Partition` class contains partition metadata and exposes the following memb
302
301
303
302
### Retrieve partition data
304
303
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:
306
305
307
306
*`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.
309
308
*`WithBillingTag`: Sets the billing tag for the request.
0 commit comments