1.0.0 • Published 1 year ago

@subscribepro/sdk v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Subscribe Pro JavaScript Client

CircleCI

This is our JavaScript client library for accessing the Subscribe Pro REST API. Our API documentation is available at https://docs.subscribepro.com/technical/rest-api/.

To learn more about Subscribe Pro you can visit us at https://www.subscribepro.com/.

Installation

This library is packaged as an NPM package. You can install with NPM through the standard method:

npm install @subscribepro/sdk

If you are using YARN you add this library to your package.json with:

yarn add @subscribepro/sdk

Usage

As this is packaged as a standard NPM typescript module the import should be familiar:

import { SubscribePro } from '@subscribepro/sdk';

SubscribePro.configure({
  accessToken: 'ACCESS_TOKEN',
  environmentKey: 'ENVIRONMENT_KEY'
})

The API is split in to two versions that reflect the SubscribePro API versioning. The V2 and V3 APIs have overlapping functionality, but there are capabilities that can only be found in one or the other. The definitive documentation can be found on the SubscribePro docs:

Example (Retrieve and Update a Product V3 API)

import { SubscribePro } from '@subscribepro/sdk';

SubscribePro.configure({
  accessToken: 'ACCESS_TOKEN',
  environmentKey: 'ENVIRONMENT_KEY'
})

let product = SubscribePro.V3.Products.findById({id: '12345'});
SubscribePro.V3.Products.update({id: product.id, data: {name: `${product.name} (2022)`}});

Example (Retrieve and Update a Product V2 API)

import { SubscribePro } from '@subscribepro/sdk';

SubscribePro.configure({
  accessToken: 'ACCESS_TOKEN',
  environmentKey: 'ENVIRONMENT_KEY'
})

let product = SubscribePro.V2.Products.getOne({id: '12345'});
SubscribePro.V2.Products.updateOne({id: product.id, data: {name: `${product.name} (2022)`}});

License

MIT

1.0.0

1 year ago

1.0.0-beta.5

1 year ago

1.0.0-beta.11

1 year ago

1.0.0-beta.12

1 year ago

1.0.0-beta.10

1 year ago

1.0.0-beta.6

1 year ago

1.0.0-beta.7

1 year ago

1.0.0-beta.8

1 year ago

1.0.0-beta.9

1 year ago

1.0.0-beta.17

1 year ago

1.0.0-beta.15

1 year ago

1.0.0-beta.16

1 year ago

1.0.0-beta.13

1 year ago

1.0.0-beta.14

1 year ago

1.0.0-beta.4

1 year ago

1.0.0-beta.3

1 year ago

1.0.0-beta.2

1 year ago