2.1.0 • Published 4 months ago

rotacloud v2.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 months ago

RotaCloud Node SDK

Getting started

To use this SDK you'll need to npm install rotacloud. This will ensure you're ready to start working with the SDK in your project.

Contributing

Please ensure you perform the npm run version:bump command before commiting and pushing your changes to the remote branch.

Configuration

Configuration is simple, import the createRotaCloudClient function from the SDK and supply your API key:

import { createRotaCloudClient } from 'rotacloud';

const client = createRotaCloudClient({
  apiKey: 'YOUR_API_KEY',
});

Auto paging

Our SDK supports auto pagination as a way for developers to quickly consume list based endpoints. You will find a list() method on most services within the SDK which can be consumed using for await of. Please ensure you are catching errors in your implementation.

const client = createRotaCloudClient({...})

try {
  for await (const user of client.user.list()) {
    console.log(user);
  }
} catch (e) {
  console.log(e);
}

Retry Policies

Our SDK supports both basic and customisable retry polices. Both can be easily configured in the SDKConfig object at time of instantiation. Both exponential and static value based back offs are supported.

Only idempotent requests will be retried.

import { createRotaCloudClient } from 'rotacloud';

const client = createRotaCloudClient({
  apiKey: 'YOUR_API_KEY',
  retry: 'expo' | 'static',
});

If more granular control is required of the internal retry policy values, an object of retry configuration can be passed through to the retry field instead.

import { createRotaCloudClient } from 'rotacloud';

const client = createRotaCloudClient({
  apiKey: 'YOUR_API_KEY',
  retry: { delay: 2000, exponential: false, maxRetries: 10 },
});
2.0.3

4 months ago

2.0.2

4 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.5.2

7 months ago

1.5.1

8 months ago

2.1.0

4 months ago

1.4.6

1 year ago

1.4.9

11 months ago

1.4.8

12 months ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.0

1 year ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.49

2 years ago

1.0.51

2 years ago

1.0.55

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.58

2 years ago

1.0.57

2 years ago

1.0.56

2 years ago

1.0.39

2 years ago

1.0.40

2 years ago

1.0.41

2 years ago

1.0.38

3 years ago

1.0.37

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.30

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago