totalum-api-sdk 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +45 -1
- package/package.json +1 -1
package/README.MD
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
1
|
## Totalum api sdk wraper
|
|
2
2
|
|
|
3
|
-
This library wraps the totalum public api, so you can easy call all endpoints
|
|
3
|
+
This library wraps the totalum public api, so you can easy call all endpoints.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Usage:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm i totalum-api-sdk
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
// IN TYPESCRIPT
|
|
15
|
+
|
|
16
|
+
import {AuthOptions, TotalumApiSdk} from 'totalum-api-sdk';
|
|
17
|
+
|
|
18
|
+
const options: AuthOptions = {
|
|
19
|
+
token:{
|
|
20
|
+
accessToken: 'YOUR TOKEN'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
const totalumClient = new TotalumApiSdk(options);
|
|
26
|
+
|
|
27
|
+
// execute some function
|
|
28
|
+
|
|
29
|
+
const result = await totalumClient.getItems('your_item', {});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```javascript
|
|
33
|
+
// IN JAVASCRIPT
|
|
34
|
+
|
|
35
|
+
const totalum = require('totalum-api-sdk');
|
|
36
|
+
|
|
37
|
+
const options = {
|
|
38
|
+
token:{
|
|
39
|
+
accessToken: 'YOUR TOKEN'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const totalumClient = new totalum.TotalumApiSdk(options);
|
|
44
|
+
|
|
45
|
+
const result = await totalumClient.getItems('your_item', {});
|
|
46
|
+
|
|
47
|
+
```
|