Skip to content

Commit 6d0603d

Browse files
committed
review doc
1 parent 645e116 commit 6d0603d

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

lib/typedef.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
* @property {RepoType | string} [repo] - set cursor to this repo
9696
* @property {string} [branch] - set branch to this id
9797
* @property {string} [ref] - set commit ref
98-
* @property {string} [jwt] - jwt token, can use that token to get access to the associated resources in the cloud
9998
* @property {string} [default_branch_id] - set the default branch id
10099
*/
101100

lib/woqlClient.js

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,25 @@ const { default: axios } = require('axios')
2121
* @example
2222
* //to connect with your local terminusDB
2323
* const client = new TerminusClient.WOQLClient(SERVER_URL,{user:"admin",key:"myKey"})
24-
* await client.connect()
25-
* client.db("test")
26-
* client.checkout("dev")
27-
* const schema = await client.getSchema()
24+
* async function getSchema() {
25+
* await client.connect()
26+
* client.db("test")
27+
* client.checkout("dev")
28+
* const schema = await client.getSchema()
29+
* }
2830
* //The client has an internal state which defines what
2931
* //organization / database / repository / branch / ref it is currently attached to
3032
*
3133
* //to connect with your TerminusDB Cloud Instance
3234
* const client = new TerminusClient.WOQLClient(SERVER_URL,{user:"myemail@something.com",
33-
* jwt:"MY_ACCESS_TOKEN",
3435
* organization:'mycloudTeam'})
35-
* await client.connect()
36-
* client.db("test")
37-
* client.checkout("dev")
38-
* const schema = await client.getSchema()
39-
*
36+
* client.setApiKey(MY_ACCESS_TOKEN)
37+
* async function getSchema() {
38+
* await client.connect()
39+
* client.db("test")
40+
* client.checkout("dev")
41+
* const schema = await client.getSchema()
42+
* }
4043
*/
4144

4245
function WOQLClient(serverUrl, params) {
@@ -47,7 +50,7 @@ function WOQLClient(serverUrl, params) {
4750

4851

4952
/**
50-
*
53+
* set the api key to access the cloud resources
5154
* @param {string} accessToken
5255
*/
5356
WOQLClient.prototype.setApiKey = function (accessToken){
@@ -65,15 +68,6 @@ WOQLClient.prototype.customHeaders = function(customHeaders) {
6568
else return this._customHeaders
6669
}
6770

68-
/**
69-
* set the api access token to connect to TerminusX Cloud
70-
* @param {string} accessToken
71-
*/
72-
73-
WOQLClient.prototype.setApiKey = function(accessToken) {
74-
this.localAuth({type: "jwt", key: accessToken} )
75-
}
76-
7771
WOQLClient.CONST = CONST
7872

7973
/**

0 commit comments

Comments
 (0)