Skip to content

Commit 8fdc782

Browse files
Dev guide improvements (#1705)
Fixing guide mistakes Relates-To: DATASDK-99 Signed-off-by: Andrey Kashcheev <ext-andrey.kashcheev@here.com>
1 parent 5d91790 commit 8fdc782

12 files changed

Lines changed: 34 additions & 32 deletions

docs/dev_guide/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The Data SDK for C++ package contains three independent modules that focus on di
88
- `olp-cpp-sdk-dataservice-read` – downloads and caches data from the platform.
99
- `olp-cpp-sdk-dataservice-write` – queues and uploads data to the platform layers.
1010

11-
For more information about the modules, see the [architectural overview](https://github.com/heremaps/here-olp-sdk-cpp/blob/master/docs/OverallArchitecture.md).
11+
For more information about the modules, see the [architectural overview](https://github.com/heremaps/here-data-sdk-cpp/blob/master/docs/OverallArchitecture.md).
1212

1313
HERE is committed to respecting your privacy and to complying with applicable data protection and privacy laws. For more information, see the [HERE Privacy Charter](https://www.here.com/en-gb/here-privacy-charter).
1414

@@ -37,4 +37,4 @@ For more information on Data API, see its [Developer Guide](https://docs.here.co
3737

3838
When new API is introduced in the Data SDK for C++, the old one is not deleted straight away. The standard API deprecation time is six months. It gives you time to switch to new code. However, we do not provide ABI backward compatibility.
3939

40-
All of the deprecated methods, functions, and parameters are documented in the Data SDK for C++ [API Reference](https://heremaps.github.io/here-data-sdk-cpp/index.html) and [changelog](https://github.com/heremaps/here-olp-sdk-cpp/blob/master/CHANGELOG.md).
40+
All of the deprecated methods, functions, and parameters are documented in the Data SDK for C++ [API Reference](https://heremaps.github.io/here-data-sdk-cpp/index.html) and [changelog](https://github.com/heremaps/here-data-sdk-cpp/blob/master/CHANGELOG.md).

docs/dev_guide/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- [Get data from a versioned layer](../dataservice-read-catalog-example.md#get-data-from-a-versioned-layer)
1414
- [Get data from a versioned layer with a cache](../dataservice-cache-example.md#get-data-from-a-versioned-layer-with-a-cache)
1515
- [Get data from a volatile layer](topics/get-data-from-volatile-layer.md)
16-
- [Get data from a stream layer](../dataservice-read-from-stream-layer-example.md#get-data-from-a-stream-layer)
16+
- [Get data from a stream layer](topics/get-data-from-stream-layer.md)
1717
- [Publish data](topics/publish-data.md)
1818
- [Publish data to a versioned layer](topics/publish-data-to-versioned-layer.md)
1919
- [Publish data to a volatile layer](topics/publish-data-to-volatile-layer.md)

docs/dev_guide/topics/get-catalog-metadata.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Catalog metadata contains a list of configurations that describe the catalog and
3434
request.WithBillingTag("MyBillingTag");
3535
```
3636

37-
5. Call the `GetRequest` method with the `CatalogRequest` parameter.
37+
5. Call the `GetCatalog` method with the `CatalogRequest` parameter.
3838

3939
```cpp
4040
auto future = catalog_client.GetCatalog(request);
@@ -44,7 +44,7 @@ Catalog metadata contains a list of configurations that describe the catalog and
4444

4545
```cpp
4646
olp::dataservice::read::CatalogResponse catalog_response = future.GetFuture().get();
47-
````
47+
```
4848

4949
The `CatalogResponse` object holds details of the completed operation and is used to determine operation success and access resultant data:
5050

docs/dev_guide/topics/get-data-from-stream-layer.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ You can read messages from a [stream layer](https://docs.here.com/data-api/docs/
1212

1313
```cpp
1414
olp::dataservice::read::StreamLayerClient client(
15-
client::HRN catalog, std::string layer_id,
16-
client::OlpClientSettings settings);
15+
olp::client::HRN(kCatalogHRN), layer_id, client_settings);
1716
```
1817
1918
3. Create the `SubscribeRequest` object with the `serial` or `parallel` subscription type.
@@ -24,22 +23,25 @@ You can read messages from a [stream layer](https://docs.here.com/data-api/docs/
2423
2524
```cpp
2625
auto request = olp::dataservice::read::SubscribeRequest()
27-
.WithSubscriptionMode(olp::dataservice::read::SubscribeRequest::SubscriptionMode::kSerial));
26+
.WithSubscriptionMode(olp::dataservice::read::SubscribeRequest::SubscriptionMode::kSerial);
2827
```
2928

3029
4. Call the `Subscribe` method with the `SubscribeRequest` parameter.
3130

3231
```cpp
33-
client::CancellableFuture<SubscribeResponse> Subscribe(
34-
SubscribeRequest request);
32+
auto future = client.Subscribe(request);
33+
auto subscribe_response = future.GetFuture().get();
34+
auto subscription_id = subscribe_response.GetResult();
3535
```
3636

3737
You receive a subscription ID from the requested subscription to the selected layer.
3838

3939
5. Call the `Poll` method.
4040

4141
```cpp
42-
client::CancellableFuture<PollResponse> Poll();
42+
auto poll_future = client.Poll();
43+
auto poll_response = poll_future.GetFuture().get();
44+
auto messages = poll_response.GetResult().GetMessages();
4345
```
4446

4547
You get messages with the layer data and partition metadata. The `Poll` method also commits the offsets, so you can continue polling new messages.
@@ -49,8 +51,8 @@ You can read messages from a [stream layer](https://docs.here.com/data-api/docs/
4951
6. If the data size is greater than 1 MB, call the `GetData` method with the `Messages` instance.
5052

5153
```cpp
52-
client::CancellableFuture<DataResponse> GetData(
53-
const model::Message& message);
54+
auto data_future = client.GetData(message);
55+
auto data_response = data_future.GetFuture().get();
5456
```
5557

5658
You get data from the requested partition.

docs/dev_guide/topics/get-data-from-volatile-layer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can only get the latest published data from a [volatile layer](https://docs.
1212

1313
```cpp
1414
olp::dataservice::read::VolatileLayerClient layer_client(
15-
olp::client::HRN(kCatalogHRN), layer_id, client_settings);
15+
olp::client::HRN(kCatalogHRN), layer_id, client_settings);
1616
```
1717
1818
3. Create the `DataRequest` object with the partition ID and one of the following fetch options:
@@ -29,7 +29,7 @@ You can only get the latest published data from a [volatile layer](https://docs.
2929
.WithFetchOption(FetchOptions::OnlineIfNotFound);
3030
```
3131

32-
4. Call the `GetRequest` method with the `DataRequest` parameter.
32+
4. Call the `GetData` method with the `DataRequest` parameter.
3333

3434
```cpp
3535
auto future = layer_client.GetData(request);
@@ -39,7 +39,7 @@ You can only get the latest published data from a [volatile layer](https://docs.
3939

4040
```cpp
4141
olp::dataservice::read::DataResponse data_response =
42-
future.GetFuture().get();
42+
future.GetFuture().get();
4343
```
4444

4545
The `DataResponse` object holds details of the completed operation and is used to determine operation success and access resultant data:

docs/dev_guide/topics/get-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Get data
22

3-
You can use the HERE Data SDK for C++ to get data from catalogs. The process of getting data from catalogs depends on the layer type. Currently, we only support getting data from versioned, volatile, and stream layers. Test.
3+
You can use the HERE Data SDK for C++ to get data from catalogs. The process of getting data from catalogs depends on the layer type. Currently, we only support getting data from versioned, volatile, and stream layers.
44

55
- [Get data from a versioned layer](../../dataservice-read-catalog-example.md#get-data-from-a-versioned-layer)
66
- [Get data from a versioned layer with a cache](../../dataservice-cache-example.md#get-data-from-a-versioned-layer-with-a-cache)
77
- [Get data from a volatile layer](get-data-from-volatile-layer.md)
8-
- [Get data from a stream layer](../../dataservice-read-from-stream-layer-example.md#get-data-from-a-stream-layer)
8+
- [Get data from a stream layer](get-data-from-stream-layer.md)
99

docs/dev_guide/topics/get-partition-metadata.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Partition metadata consists of the following information about the partition:
1313

1414
1. Create the `OlpClientSettings` object.
1515

16-
For instructions, see [Create platform client settings](../docs/create-platform-client-settings.md).
16+
For instructions, see [Create platform client settings](../../create-platform-client-settings.md).
1717

1818
2. Depending on the layer type, create a versioned or volatile layer client with the HERE Resource Name (HRN), layer ID, layer version, and platform client settings from step 1.
1919

@@ -43,7 +43,7 @@ Partition metadata consists of the following information about the partition:
4343
olp::dataservice::read::FetchOptions::OnlineIfNotFound);
4444
```
4545

46-
4. Call `GetPartitions` method with the `PartitionRequest` parameter.
46+
4. Call `GetPartitions` method with the `PartitionsRequest` parameter.
4747

4848
```cpp
4949
auto future = layer_client.GetPartitions(request);

docs/dev_guide/topics/manage-eviction-protection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ You can also remove tile keys from protection.
3939
- If you want to remove tile keys from protection, make sure that the `Protect` method is not in progress, and then call the `Release` method with the list of tile keys that you want to remove from protection.
4040
4141
```cpp
42-
layer_client.Protect(<vector of tile keys>);
42+
layer_client.Release(<vector of tile keys>);
4343
```
4444
4545
Data and keys of the specified tiles are removed from the protected list. The keys are added to the LRU cache. Now, they can be evicted. Expiration value is restored, and keys can expire. The quadtree can be removed from the protected list if all tile keys are no longer protected.

docs/dev_guide/topics/publish-data-to-index-layer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can index and store metadata and data in a way that is optimized for batch p
3535
.WithLayerId(layer_id);
3636
```
3737

38-
5. Call the `PublishIndex` method with the `DataRequest` parameter.
38+
5. Call the `PublishIndex` method with the `PublishIndexRequest` parameter.
3939

4040
```cpp
4141
auto future = client.PublishIndex(index_request);

docs/dev_guide/topics/publish-data-to-versioned-layer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ If you need to store and access the history of previous data updates, publish da
6161

6262
```cpp
6363
auto complete_batch_response =
64-
versioned_client->CompleteBatch(get_batch_response.GetResult())
64+
versioned_client.CompleteBatch(get_batch_response.GetResult())
6565
.GetFuture()
6666
.get();
6767
```
@@ -73,11 +73,11 @@ The `PublishDataResponse` object holds details of the completed operation and is
7373
- `GetError()` &ndash; contains error information as a result of an error in the `olp::client::ApiError` object.
7474

7575
```cpp
76-
if (response.IsSuccessful()) {
77-
auto response_result = response.GetResult();
76+
if (complete_batch_response.IsSuccessful()) {
77+
auto response_result = complete_batch_response.GetResult();
7878
// Handle success
7979
} else {
80-
auto api_error = response.GetError();
80+
auto api_error = complete_batch_response.GetError();
8181
// Handle fail
8282
}
8383
```

0 commit comments

Comments
 (0)