Skip to content

Commit 96a794c

Browse files
docs(generated): replace placeholder values in examples
Generated SDK source code using: - Generator version 3.107.1 - Specification version 1.0.0-dev0.1.29 - Automation (cloudant-sdks) version 14e653f
1 parent 993f1de commit 96a794c

13 files changed

Lines changed: 50 additions & 44 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ or programmatically.
153153

154154
Quick start for Cloudant with an IAM API key:
155155
```sh
156-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL # use your own Cloudant public or private URL
156+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
157157
CLOUDANT_APIKEY=a1b2c3d4e5f6f1g4h7j3k6l9m2p5q8s1t4v7x0z3 # use your own IAM API key
158158
```
159159

160160
Quick start for Apache CouchDB with a username/password session:
161161
```sh
162162
CLOUDANT_AUTH_TYPE=COUCHDB_SESSION
163-
CLOUDANT_URL=http://~replaceWithYourUniqueHost~.example:5984 # use your CouchDB URL
163+
CLOUDANT_URL=https://~replace-with-your-unique-host~.example:6984 # use your CouchDB URL
164164
CLOUDANT_USERNAME=username # replace with your username
165165
CLOUDANT_PASSWORD=password # replace with your password
166166
```

docs/Authentication.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ amending the values with your own
5858
`CLOUDANT_AUTH_TYPE` to `IAM` because it is the default when supplying an `APIKEY`.
5959

6060
```sh
61-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
61+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
6262
CLOUDANT_APIKEY=a1b2c3d4e5f6f1g4h7j3k6l9m2p5q8s1t4v7x0z3 # use your own IAM API key
6363
```
6464

@@ -69,8 +69,8 @@ amending with your own correct values. There is no need to set
6969
`CLOUDANT_AUTH_TYPE` to `CONTAINER` because it is the default.
7070

7171
```sh
72-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
73-
CLOUDANT_IAM_PROFILE_ID=iam-Profile-00000000-aaaa-4444-bbbb-0123456789ab # use your own IAM profile ID
72+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
73+
CLOUDANT_IAM_PROFILE_ID=iam-Profile-00000000-0000-0000-0000-000000000000 # use your own IAM profile ID
7474
```
7575

7676
Alternatives to `CLOUDANT_IAM_PROFILE_ID`:
@@ -83,8 +83,8 @@ amending with your own correct values.
8383

8484
```sh
8585
CLOUDANT_AUTH_TYPE=VPC
86-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
87-
CLOUDANT_IAM_PROFILE_ID=iam-Profile-00000000-aaaa-4444-bbbb-0123456789ab # use your own IAM profile ID
86+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
87+
CLOUDANT_IAM_PROFILE_ID=iam-Profile-00000000-0000-0000-0000-000000000000 # use your own IAM profile ID
8888
```
8989

9090
Alternatives to `CLOUDANT_IAM_PROFILE_ID`:
@@ -98,8 +98,8 @@ amending with your own correct values.
9898

9999
```sh
100100
CLOUDANT_AUTH_TYPE=IAMASSUME
101-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
102-
CLOUDANT_IAM_PROFILE_ID=iam-Profile-00000000-aaaa-4444-bbbb-0123456789ab # use your own IAM profile ID
101+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
102+
CLOUDANT_IAM_PROFILE_ID=iam-Profile-00000000-0000-0000-0000-000000000000 # use your own IAM profile ID
103103
```
104104

105105
Alternatives to `CLOUDANT_IAM_PROFILE_ID`:
@@ -113,7 +113,7 @@ amending with your own [service credentials](https://cloud.ibm.com/docs/Cloudant
113113

114114
```sh
115115
CLOUDANT_AUTH_TYPE=COUCHDB_SESSION
116-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
116+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
117117
CLOUDANT_USERNAME=username # replace with your Cloudant legacy username
118118
CLOUDANT_PASSWORD=password # replace with your Cloudant legacy password or API key (not IAM)
119119
```
@@ -127,7 +127,7 @@ amending with your own correct values.
127127

128128
```sh
129129
CLOUDANT_AUTH_TYPE=BEARERTOKEN
130-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
130+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
131131
CLOUDANT_BEARER_TOKEN=A1b2C3QiOiIyMDE4MDgxNDAwMDAwMDAwMDAwMDBjNzYwNzY2YjYxYjYwYjYwIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJ1c2VyQGdtYWlsLmNvbSIsImF1ZCI6Imh0dHBzOi8vaWF1LmNsb3VkLmlibS5jb20iLCJpYXQiOjE2ODg4ODg4ODgsImV4cCI6MTY4ODg5MjQ4OCwiaXNzIjoiaHR0cHM6Ly9pYXUuY2xvdWQuaWJtLmNvbSIsInNjb3BlIjpbImNsb3VkLnJlYWRlciJdfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c # replace with your bearer token
132132
```
133133

@@ -140,7 +140,7 @@ amending with your own correct values.
140140

141141
```sh
142142
CLOUDANT_AUTH_TYPE=BASIC
143-
CLOUDANT_URL=https://~replaceWithYourUniqueHost~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
143+
CLOUDANT_URL=https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud # use your own Cloudant public or private URL
144144
CLOUDANT_USERNAME=username # replace with your Cloudant legacy username
145145
CLOUDANT_PASSWORD=password # replace with your Cloudant legacy password or API key (not IAM)
146146
```

examples/README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ Cloudant service = Cloudant.newInstance();
380380
DeleteReplicationDocumentOptions replicationDocOptions =
381381
new DeleteReplicationDocumentOptions.Builder()
382382
.docId("repldoc-example")
383-
.rev("3-a0ccbdc6fe95b4184f9031d086034d85")
383+
.rev("1-00000000000000000000000000000000")
384384
.build();
385385

386386
DocumentResult response =
@@ -468,12 +468,12 @@ import com.ibm.cloud.cloudant.v1.model.ReplicationDocument;
468468
Cloudant service = Cloudant.newInstance();
469469

470470
ReplicationDatabase sourceDb = new ReplicationDatabase.Builder()
471-
.url("<your-source-service-url>/animaldb")
471+
.url("https://~replace-with-source-host~.cloudantnosqldb.appdomain.cloud/animaldb")
472472
.build();
473473

474474
ReplicationDatabaseAuthIam targetAuthIam =
475475
new ReplicationDatabaseAuthIam.Builder()
476-
.apiKey("<your-iam-api-key>")
476+
.apiKey("a1b2c3d4e5f6f1g4h7j3k6l9m2p5q8s1t4v7x0z3") //use your own IAM API key
477477
.build();
478478

479479
ReplicationDatabaseAuth targetAuth = new ReplicationDatabaseAuth.Builder()
@@ -482,7 +482,7 @@ ReplicationDatabaseAuth targetAuth = new ReplicationDatabaseAuth.Builder()
482482

483483
ReplicationDatabase targetDb = new ReplicationDatabase.Builder()
484484
.auth(targetAuth)
485-
.url("<your-target-service-url>/animaldb-target")
485+
.url("https://~replace-with-target-host~.cloudantnosqldb.appdomain.cloud/animaldb-target")
486486
.build();
487487

488488
ReplicationDocument replDocument = new ReplicationDocument();
@@ -752,7 +752,7 @@ Cloudant service = Cloudant.newInstance();
752752

753753
DeleteDatabaseOptions databaseOptions =
754754
new DeleteDatabaseOptions.Builder()
755-
.db("<db-name>")
755+
.db("products")
756756
.build();
757757

758758
Ok response =
@@ -1056,12 +1056,12 @@ Cloudant service = Cloudant.newInstance();
10561056

10571057
Document eventDoc1 = new Document();
10581058
eventDoc1.setId("ns1HJS13AMkK:0007241142412418284");
1059-
eventDoc1.setRev("1-5005d65514fe9e90f8eccf174af5dd64");
1059+
eventDoc1.setRev("1-00000000000000000000000000000000");
10601060
eventDoc1.setDeleted(true);
10611061

10621062
Document eventDoc2 = new Document();
10631063
eventDoc2.setId("H8tDIwfadxp9:0007241142412418285");
1064-
eventDoc1.setRev("1-2d7810b054babeda4812b3924428d6d6");
1064+
eventDoc1.setRev("1-00000000000000000000000000000000");
10651065
eventDoc1.setDeleted(true);
10661066

10671067
BulkDocs bulkDocs = new BulkDocs.Builder()
@@ -1158,12 +1158,12 @@ List<BulkGetQueryDocument> bulkGetDocs = new ArrayList<>();
11581158
bulkGetDocs.add(
11591159
new BulkGetQueryDocument.Builder()
11601160
.id(docId)
1161-
.rev("3-917fa2381192822767f010b95b45325b")
1161+
.rev("3-22222222222222222222222222222222")
11621162
.build());
11631163
bulkGetDocs.add(
11641164
new BulkGetQueryDocument.Builder()
11651165
.id(docId)
1166-
.rev("4-a5be949eeb7296747cc271766e9a498b")
1166+
.rev("4-33333333333333333333333333333333")
11671167
.build());
11681168

11691169
PostBulkGetOptions bulkGetOptions = new PostBulkGetOptions.Builder()
@@ -1227,7 +1227,7 @@ Cloudant service = Cloudant.newInstance();
12271227
BulkGetQueryDocument bulkGetQueryDocument =
12281228
new BulkGetQueryDocument.Builder()
12291229
.id("order00058")
1230-
.addAttsSince("1-99b02e08da151943c2dcb40090160bb8")
1230+
.addAttsSince("1-00000000000000000000000000000000")
12311231
.build();
12321232

12331233
PostBulkGetOptions postBulkGetOptions =
@@ -1317,7 +1317,7 @@ DeleteDesignDocumentOptions designDocumentOptions =
13171317
new DeleteDesignDocumentOptions.Builder()
13181318
.db("products")
13191319
.ddoc("appliances")
1320-
.rev("1-98e6a25b3b45df62e7d47095ac15b16a")
1320+
.rev("1-00000000000000000000000000000000")
13211321
.build();
13221322

13231323
DocumentResult response =
@@ -2246,9 +2246,12 @@ import java.util.Arrays;
22462246
// section: code
22472247
Cloudant service = Cloudant.newInstance();
22482248

2249-
Map<String, List<String>> docRevisions =
2250-
Collections.singletonMap("order00077", Arrays.asList("<1-missing-revision>",
2251-
"<2-missing-revision>", "<3-possible-ancestor-revision>"));
2249+
Map<String, List<String>> docRevisions =
2250+
Collections.singletonMap("order00077", Arrays.asList(
2251+
"1-00000000000000000000000000000000", // missing revision
2252+
"2-11111111111111111111111111111111", // missing revision
2253+
"3-22222222222222222222222222222222" // possible ancestor revision
2254+
));
22522255

22532256
PostRevsDiffOptions revsDiffOptions =
22542257
new PostRevsDiffOptions.Builder()
@@ -2406,7 +2409,7 @@ DeleteDocumentOptions documentOptions =
24062409
new DeleteDocumentOptions.Builder()
24072410
.db("orders")
24082411
.docId("order00058")
2409-
.rev("1-99b02e08da151943c2dcb40090160bb8")
2412+
.rev("1-00000000000000000000000000000000")
24102413
.build();
24112414

24122415
DocumentResult response =
@@ -2533,7 +2536,7 @@ DeleteAttachmentOptions attachmentOptions =
25332536
.db("products")
25342537
.docId("1000042")
25352538
.attachmentName("product_details.txt")
2536-
.rev("4-1a0d1cd6f40472509e9aac646183736a")
2539+
.rev("4-33333333333333333333333333333333")
25372540
.build();
25382541

25392542
DocumentResult response =

examples/snippets/deleteAttachment/example_request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.db("products")
1111
.docId("1000042")
1212
.attachmentName("product_details.txt")
13-
.rev("4-1a0d1cd6f40472509e9aac646183736a")
13+
.rev("4-33333333333333333333333333333333")
1414
.build();
1515

1616
DocumentResult response =

examples/snippets/deleteDatabase/example_request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
DeleteDatabaseOptions databaseOptions =
99
new DeleteDatabaseOptions.Builder()
10-
.db("<db-name>")
10+
.db("products")
1111
.build();
1212

1313
Ok response =

examples/snippets/deleteDesignDocument/example_request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
new DeleteDesignDocumentOptions.Builder()
1010
.db("products")
1111
.ddoc("appliances")
12-
.rev("1-98e6a25b3b45df62e7d47095ac15b16a")
12+
.rev("1-00000000000000000000000000000000")
1313
.build();
1414

1515
DocumentResult response =

examples/snippets/deleteDocument/example_request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
new DeleteDocumentOptions.Builder()
1010
.db("orders")
1111
.docId("order00058")
12-
.rev("1-99b02e08da151943c2dcb40090160bb8")
12+
.rev("1-00000000000000000000000000000000")
1313
.build();
1414

1515
DocumentResult response =

examples/snippets/deleteReplicationDocument/example_request.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
DeleteReplicationDocumentOptions replicationDocOptions =
99
new DeleteReplicationDocumentOptions.Builder()
1010
.docId("repldoc-example")
11-
.rev("3-a0ccbdc6fe95b4184f9031d086034d85")
11+
.rev("1-00000000000000000000000000000000")
1212
.build();
1313

1414
DocumentResult response =

examples/snippets/postBulkDocs/example_request_delete_documents.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
Document eventDoc1 = new Document();
1414
eventDoc1.setId("ns1HJS13AMkK:0007241142412418284");
15-
eventDoc1.setRev("1-5005d65514fe9e90f8eccf174af5dd64");
15+
eventDoc1.setRev("1-00000000000000000000000000000000");
1616
eventDoc1.setDeleted(true);
1717

1818
Document eventDoc2 = new Document();
1919
eventDoc2.setId("H8tDIwfadxp9:0007241142412418285");
20-
eventDoc1.setRev("1-2d7810b054babeda4812b3924428d6d6");
20+
eventDoc1.setRev("1-00000000000000000000000000000000");
2121
eventDoc1.setDeleted(true);
2222

2323
BulkDocs bulkDocs = new BulkDocs.Builder()

examples/snippets/postBulkGet/alternative_example_request_for_atts_since.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
BulkGetQueryDocument bulkGetQueryDocument =
1212
new BulkGetQueryDocument.Builder()
1313
.id("order00058")
14-
.addAttsSince("1-99b02e08da151943c2dcb40090160bb8")
14+
.addAttsSince("1-00000000000000000000000000000000")
1515
.build();
1616

1717
PostBulkGetOptions postBulkGetOptions =

0 commit comments

Comments
 (0)