@artaio/node-api 0.27.0 → 0.29.0
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 +9 -11
- package/dist/package.json +12 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,31 +13,29 @@ Please refer to [Arta official documentation](https://api-reference.arta.io/).
|
|
|
13
13
|
### 1. Install Arta Node Library
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
$ npm install
|
|
16
|
+
$ npm install @artaio/node-api
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### 2. Use it to interact with our API in pure JS
|
|
20
20
|
```js
|
|
21
|
-
const { Arta } = require('
|
|
21
|
+
const { Arta } = require('@artaio/node-api');
|
|
22
22
|
const arta = new Arta('<YOUR_API_TOKEN>');
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const { items } = arta.webhooks.list();
|
|
25
|
+
const myHook = items[0];
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
myEndpoint.ping().then(console.log);
|
|
27
|
+
myHook.ping().then(console.log);
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
### 3. Use it to interact with our API in TS
|
|
32
31
|
```ts
|
|
33
|
-
import { Arta } from '
|
|
32
|
+
import { Arta, Webhook } from '@artaio/node-api';
|
|
34
33
|
const arta: Arta = new Arta('<YOUR_API_TOKEN>');
|
|
35
34
|
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
const myEndpoint: ArtaEndpoint = endpoint[0];
|
|
35
|
+
const { items } = arta.webhooks.list();
|
|
36
|
+
const myHook: Webhook = items[0];
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
myHook.ping().then(console.log);
|
|
41
39
|
```
|
|
42
40
|
|
|
43
41
|
## Contributing
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "0.
|
|
2
|
+
"name": "@artaio/node-api",
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -p tsconfig-build.json",
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/"
|
|
19
19
|
],
|
|
20
|
+
"homepage": "https://github.com/artaio/arta-node-api",
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git://github.com/artaio/arta-node-api.git"
|
|
24
|
+
},
|
|
20
25
|
"keywords": [],
|
|
21
26
|
"author": "ARTA <hello@arta.io> (https://arta.io/)",
|
|
22
27
|
"contributors": [
|
|
@@ -45,5 +50,9 @@
|
|
|
45
50
|
"prettier": "2.7.1",
|
|
46
51
|
"ts-jest": "^29.0.3",
|
|
47
52
|
"typescript": "^4.8.4"
|
|
48
|
-
}
|
|
53
|
+
},
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/artaio/arta-node-api/issues"
|
|
56
|
+
},
|
|
57
|
+
"license": "MIT"
|
|
49
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artaio/node-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "The Arta Node library provides a seamless integration to Arta API for applications running on Node.js using both Typescript or Javascript.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -p tsconfig-build.json",
|