Skip to content

Commit 4eef91f

Browse files
committed
Merge branch 'release/2.0.0'.
2 parents c8f72ed + 245a1ff commit 4eef91f

18 files changed

Lines changed: 837 additions & 1353 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
dist/
12
node_modules/
23
.vscode/
34
docs/forge-nodejs-utils/

.jsdoc.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
language: node_js
22
node_js:
3-
- "10"
3+
- '10'
4+
5+
script:
6+
- npm run build
7+
- npm run test
8+
- npm run docs
49

510
deploy:
611
provider: npm

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ manually, you can use the `AuthenticationClient` class:
1414

1515
```js
1616
const { AuthenticationClient } = require('forge-nodejs-utils');
17-
const auth = new AuthenticationClient(); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
17+
const auth = new AuthenticationClient(process.env.FORGE_CLIENT_ID, process.env.FORGE_CLIENT_SECRET);
1818
const authentication = await auth.authenticate(['bucket:read', 'data:read']);
1919
console.log('2-legged token', authentication.access_token);
2020
```
@@ -33,7 +33,7 @@ const bim360 = new BIM360Client({ token: '...' });
3333

3434
```js
3535
const { DataManagementClient } = require('forge-nodejs-utils');
36-
const data = new DataManagementClient(); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
36+
const data = new DataManagementClient({ client_id: process.env.FORGE_CLIENT_ID, client_secret: process.env.FORGE_CLIENT_SECRET });
3737

3838
const buckets = await data.listBuckets();
3939
console.log('Buckets', buckets.map(bucket => bucket.bucketKey).join(','));
@@ -46,7 +46,7 @@ console.log('Objects', objects.map(object => object.objectId).join(','));
4646

4747
```js
4848
const { ModelDerivativeClient } = require('forge-nodejs-utils');
49-
const derivatives = new ModelDerivativeClient(); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
49+
const derivatives = new ModelDerivativeClient({ client_id: process.env.FORGE_CLIENT_ID, client_secret: process.env.FORGE_CLIENT_SECRET });
5050
const job = await derivatives.submitJob('<your-document-urn>', [{ type: 'svf', views: ['2d', '3d'] }]);
5151
console.log('Job', job);
5252
```
@@ -55,7 +55,7 @@ console.log('Job', job);
5555

5656
```js
5757
const { DesignAutomationClient, AuthenticationClient } = require('forge-nodejs-utils');
58-
const client = new DesignAutomationClient(); // If no params, gets credentials from env. vars FORGE_CLIENT_ID and FORGE_CLIENT_SECRET
58+
const client = new DesignAutomationClient({ client_id: process.env.FORGE_CLIENT_ID, client_secret: process.env.FORGE_CLIENT_SECRET });
5959
const bundles = await client.listAppBundles();
6060
console.log('App bundles', bundles);
6161
```

0 commit comments

Comments
 (0)