Skip to content

Commit 6e7091c

Browse files
committed
review doc
1 parent 6d0603d commit 6e7091c

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

docs/_sidebar.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
- [Fetch](api/woqlClient.js?id=fetch)
1616
- [setApiKey](api/woqlClient.js?id=setApiKey)
1717
- [customHeaders](api/woqlClient.js?id=customHeaders)
18-
- [setApiKey](api/woqlClient.js?id=setApiKey)
1918
- [copy](api/woqlClient.js?id=copy)
2019
- [server](api/woqlClient.js?id=server)
2120
- [api](api/woqlClient.js?id=api)

docs/api/typedef.js.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ an object that describe a property element
191191
| [repo] | [<code>RepoType</code>](#RepoType) \| <code>string</code> | set cursor to this repo |
192192
| [branch] | <code>string</code> | set branch to this id |
193193
| [ref] | <code>string</code> | set commit ref |
194-
| [jwt] | <code>string</code> | jwt token, can use that token to get access to the associated resources in the cloud |
195194
| [default_branch_id] | <code>string</code> | set the default branch id |
196195

197196

docs/api/woqlClient.js.md

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,25 @@ For situations where you want to communicate with a TerminusDB server API, the W
1919
```js
2020
//to connect with your local terminusDB
2121
const client = new TerminusClient.WOQLClient(SERVER_URL,{user:"admin",key:"myKey"})
22-
await client.connect()
23-
client.db("test")
24-
client.checkout("dev")
25-
const schema = await client.getSchema()
22+
async function getSchema() {
23+
await client.connect()
24+
client.db("test")
25+
client.checkout("dev")
26+
const schema = await client.getSchema()
27+
}
2628
//The client has an internal state which defines what
2729
//organization / database / repository / branch / ref it is currently attached to
2830

2931
//to connect with your TerminusDB Cloud Instance
3032
const client = new TerminusClient.WOQLClient(SERVER_URL,{user:"myemail@something.com",
31-
jwt:"MY_ACCESS_TOKEN",
3233
organization:'mycloudTeam'})
33-
await client.connect()
34-
client.db("test")
35-
client.checkout("dev")
36-
const schema = await client.getSchema()
34+
client.setApiKey(MY_ACCESS_TOKEN)
35+
async function getSchema() {
36+
await client.connect()
37+
client.db("test")
38+
client.checkout("dev")
39+
const schema = await client.getSchema()
40+
}
3741
```
3842

3943
### TerminusDB Client API
@@ -250,6 +254,8 @@ Use [#remoteAuth](#remoteAuth) instead.
250254
251255
### setApiKey
252256
#### woqlClient.setApiKey(accessToken)
257+
set the api key to access the cloud resources
258+
253259
254260
| Param | Type |
255261
| --- | --- |
@@ -266,16 +272,6 @@ add extra headers to your request
266272
| customHeaders | <code>object</code> |
267273
268274
269-
### setApiKey
270-
#### woqlClient.setApiKey(accessToken)
271-
set the api access token to connect to TerminusX Cloud
272-
273-
274-
| Param | Type |
275-
| --- | --- |
276-
| accessToken | <code>string</code> |
277-
278-
279275
### copy
280276
#### woqlClient.copy() ⇒ [<code>WOQLClient</code>](#WOQLClient)
281277
creates a copy of the client with identical internal state and context

0 commit comments

Comments
 (0)