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
Copy file name to clipboardExpand all lines: docs/api/woqlClient.js.md
+32-14Lines changed: 32 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,13 @@
4
4
**License**: Apache Version 2
5
5
6
6
#### new WOQLClient(serverUrl, [params])
7
-
The core functionality of the TerminusDB javascript client is defined in the WOQLClient class - in the woqlClient.js file.
8
-
This class provides methods which allow you to directly get and set all of the configuration and API endpoints of the client.
9
-
The other parts of the WOQL core - connectionConfig.js and connectionCapabilities.js - are used by the client to store internal state - they should never have to be accessed directly.
10
-
For situations where you want to communicate with a TerminusDB server API, the WOQLClient class is all you will need.
7
+
The core functionality of the TerminusDB javascript client is
8
+
defined in the WOQLClient class - in the woqlClient.js file. This class provides
9
+
methods which allow you to directly get and set all of the configuration and API
10
+
endpoints of the client. The other parts of the WOQL core - connectionConfig.js
11
+
and connectionCapabilities.js - are used by the client to store internal state - they
12
+
should never have to be accessed directly. For situations where you want to communicate
13
+
with a TerminusDB server API, the WOQLClient class is all you will need.
@@ -288,7 +291,8 @@ creates a copy of the client with identical internal state and context
288
291
useful if we want to change context for a particular API call without changing
289
292
the current client context
290
293
291
-
**Returns**: [<code>WOQLClient</code>](#WOQLClient) - new client object with identical state to original but which can be manipulated independently
294
+
**Returns**: [<code>WOQLClient</code>](#WOQLClient) - new client object with identical state to original but
295
+
which can be manipulated independently
292
296
**Example**
293
297
```js
294
298
let newClient =client.copy()
@@ -304,7 +308,8 @@ it can only be set creating a new WOQLCLient instance
304
308
#### woqlClient.api() ⇒ <code>string</code>
305
309
Retrieve the URL of the server’s API base that we are currently connected to
306
310
307
-
**Returns**: <code>string</code> - the URL of the TerminusDB server api endpoint we are connected to (typically server() + “api/”)
311
+
**Returns**: <code>string</code> - the URL of the TerminusDB server api endpoint we are connected
312
+
to (typically server() + “api/”)
308
313
**Example**
309
314
```js
310
315
let api_url =client.api()
@@ -504,7 +509,7 @@ of the current context for "commits" "meta" "branch" and "ref" special resources
504
509
| Param | Type | Description |
505
510
| --- | --- | --- |
506
511
| resourceType | <code>typedef.ResourceType</code> | the type of resource string that is required - one of “db”, “meta”, “repo”, “commits”, “branch”, “ref” |
507
-
| [resourceId] | <code>string</code> | can be used to specify a specific branch / ref - if not supplied the current context will be used |
512
+
| [resourceId] | <code>string</code> | can be used to specify a specific branch / ref - if not supplied the current context will be used |
508
513
509
514
**Example**
510
515
```js
@@ -661,6 +666,19 @@ Adds an author string (from the user object returned by connect) to the commit m
0 commit comments