Skip to content

Commit

Permalink
Merge pull request #50 from esonderegger/version-bump
Browse files Browse the repository at this point in the history
update dependencies and bump version number
  • Loading branch information
esonderegger authored Sep 6, 2019
2 parents 2701c69 + 538b4d8 commit 3938e00
Show file tree
Hide file tree
Showing 3 changed files with 228 additions and 159 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,24 @@ JS library to communicate with Elemental live API.
The client provides standard methods for resources, so calls will use be
structured in the format ``<client-instance>.<resource>().<operation>()``.

API operations always return promises that resolve with the response data and
fail with details about the failure. An example, listing presets:
First, initialize the client. Optionally, provide any extra headers to add to
requests. Note, adding a version string is optional but instructs the client
to use that version in requests to the API.

```javascript
const client = new ElementalClient('https://elemental-server.example.com');
```

or

```javascript
const client = new ElementalClient('https://elemental-server.example.com', { 'X-API-Key': 'anApiKey' },'v2.15.3.0');
```

API operations always return promises that resolve with the response data and
fail with details about the failure. An example, listing presets:

```javascript
client.presets().list()
.then((data) => console.log(`Got presets: ${data}`))
.catch((err) => console.log(`Something went wrong: ${err}`));
Expand Down
Loading

0 comments on commit 3938e00

Please sign in to comment.