Skip to content

Commit c12f20d

Browse files
docs: updated README.md
1 parent 261b92e commit c12f20d

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,33 @@ Let’s walk through setting up a project that uses the Salable API Class from t
99
1. Create a new Node.js project.
1010
2. Inside of the project, run: `npm install @salable/node-sdk`. Adding packages results in update in lock file, [yarn.lock](https://yarnpkg.com/getting-started/qa/#should-lockfiles-be-committed-to-the-repository) or [package-lock.json](https://docs.npmjs.com/configuring-npm/package-lock-json). You **should** commit your lock file along with your code to avoid potential breaking changes.
1111

12-
## v4.0.0 Update
12+
## v5.0.0 Update
1313

1414
The SDK now supports Salable API version selection and developers can choose which version of the Salable API they want to interact with via the SDK
15-
As such, the Salable API version is now a required argument when instantiating the SDK
15+
As such, the Salable API version is now a required argument when instantiating the SDK
1616

1717
```typescript
18-
import { Salable } from '@salable/node-sdk';
18+
import { initSalable } from '@salable/node-sdk';
1919

20-
const salable = new Salable('your_api_key', 'v2');
20+
const salable = initSalable('your_api_key', 'v3');
2121
```
22-
> **_NOTE:_** Support for `v1` of the Salable API has been deprecated, `v2` is currently the only supported version
2322

2423
### General Changes
2524

2625
#### Salable API versioning and Types
2726
- Types and method documentation are dynamic and automatically adjust to the version selected
2827

2928
```typescript
30-
import { Salable } from '@salable/node-sdk';
29+
import { initSalable } from '@salable/node-sdk';
3130

32-
const salableV1 = new Salable('your_api_key', 'v1'); // NOTE: 'v1' is not supported and used for example purposes
33-
const salableV2 = new Salable('your_api_key', 'v2');
31+
const salableV2 = initSalable('your_api_key', 'v2');
32+
const salableV3 = initSalable('your_api_key', 'v3');
3433

35-
// The "licenses.getUsage" method is supported in this version and will work
36-
await salableV1.licenses.getUsage():
34+
// "licenses.check" method is supported in this version and will work
35+
await salableV2.licenses.check();
3736

38-
// This will error as "licenses.getUsage" has been deprecated in 'v2'
39-
await salableV2.licenses.getUsage(): // Will error with: "Property 'getUsage' does not exist ..."
37+
// This will error as all "licenses" methods has been deprecated in 'v3'
38+
await salableV3.licenses.check(); // Will error with: "Property 'licenses' does not exist ..."
4039
```
4140
#### Pagination
4241
- All methods are now scope authorized and your API Key must contain the appropriate scopes to user certain methods

docs/docs/subscriptions/update-seat-count.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { initSalable } from '@salable/node-sdk';
1616

1717
const salable = initSalable('{{API_KEY}}', 'v3');
1818

19-
await salable.subscriptions.addSeats('d18642b3-6dc0-40c4-aaa5-6315ed37c744', { increment: 2 });
19+
await salable.subscriptions.updateSeatCount('d18642b3-6dc0-40c4-aaa5-6315ed37c744', { increment: 2 });
2020
```
2121

2222
### Parameters
@@ -51,7 +51,7 @@ import { initSalable } from '@salable/node-sdk';
5151

5252
const salable = initSalable('{{API_KEY}}', 'v3');
5353

54-
await salable.subscriptions.addSeats('d18642b3-6dc0-40c4-aaa5-6315ed37c744', { decrement: 2 });
54+
await salable.subscriptions.updateSeatCount('d18642b3-6dc0-40c4-aaa5-6315ed37c744', { decrement: 2 });
5555
```
5656

5757
### Parameters

0 commit comments

Comments
 (0)