@@ -13,16 +13,16 @@ VisWiz service.
13
13
14
14
## Installation
15
15
16
- Install the SDK module using ` npm ` :
16
+ Install the SDK module using ` yarn ` :
17
17
18
18
```
19
- $ npm install -D viswiz-sdk
19
+ $ yarn add -D viswiz-sdk
20
20
```
21
21
22
- or using ` yarn ` :
22
+ Or using ` npm ` :
23
23
24
24
```
25
- $ yarn add -D viswiz-sdk
25
+ $ npm install -D viswiz-sdk
26
26
```
27
27
28
28
## Usage
@@ -35,18 +35,18 @@ const VisWiz = require('viswiz-sdk');
35
35
const client = new VisWiz (' your-unique-api-key-here' );
36
36
37
37
client
38
- .getProjects ()
39
- .then (projects => projects .find (project => project .name === ' Foo' ))
40
- .then (project =>
41
- client .createBuild ({
42
- projectID: project .id ,
43
- name: ' Foo Bar' ,
44
- revision: ' abcdef1234567890' ,
45
- })
46
- )
47
- .then (build =>
48
- client .createImage (build .id , ' image-name' , ' /path/to/image.png' )
49
- );
38
+ .getProjects ()
39
+ .then (projects => projects .find (project => project .name === ' Foo' ))
40
+ .then (project =>
41
+ client .createBuild ({
42
+ projectID: project .id ,
43
+ name: ' Foo Bar' ,
44
+ revision: ' abcdef1234567890' ,
45
+ })
46
+ )
47
+ .then (build =>
48
+ client .createImage (build .id , ' image-name' , ' /path/to/image.png' )
49
+ );
50
50
```
51
51
52
52
Using ` async ` /` await ` :
@@ -55,33 +55,37 @@ Using `async`/`await`:
55
55
const VisWiz = require (' viswiz-sdk' );
56
56
57
57
async function run () {
58
- const client = new VisWiz (' your-unique-api-key-here' );
58
+ const client = new VisWiz (' your-unique-api-key-here' );
59
59
60
- const projects = await client .getProjects ();
61
- const project = projects .find (project => project .name === ' Foo' );
60
+ const projects = await client .getProjects ();
61
+ const project = projects .find (project => project .name === ' Foo' );
62
62
63
- const build = await client .createBuild ({
64
- projectID: project .id ,
65
- name: ' Foo Bar' ,
66
- revision: ' abcdef1234567890' ,
67
- });
63
+ const build = await client .createBuild ({
64
+ projectID: project .id ,
65
+ name: ' Foo Bar' ,
66
+ revision: ' abcdef1234567890' ,
67
+ });
68
68
69
- await client .createImage (build .id , ' image-name' , ' /path/to/image.png' );
69
+ await client .createImage (build .id , ' image-name' , ' /path/to/image.png' );
70
70
}
71
71
72
72
run ();
73
73
```
74
74
75
75
## Documentation
76
76
77
- See the JSDoc markdown documentation in [ Documentation.md] ( Documentation.md ) .
77
+ See the JSDoc markdown documentation in
78
+ [ Documentation.md] ( https://github.com/viswiz-io/viswiz-nodejs-sdk/blob/master/Documentation.md#readme ) .
78
79
79
80
## Change log
80
81
81
- The change log can be found here: [ CHANGELOG.md] ( CHANGELOG.md ) .
82
+ The change log can be found here:
83
+ [ CHANGELOG.md] ( https://github.com/viswiz-io/viswiz-nodejs-sdk/blob/master/CHANGELOG.md#readme ) .
82
84
83
85
## Authors and license
84
86
85
87
Author: [ VisWiz.io] ( https://www.viswiz.io/ ) .
86
88
87
- MIT License, see the included [ License.md] ( License.md ) file.
89
+ MIT License, see the included
90
+ [ License.md] ( https://github.com/viswiz-io/viswiz-nodejs-sdk/blob/master/License.md )
91
+ file.
0 commit comments