Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kfiroo authored Sep 3, 2016
1 parent bcaac00 commit a98c3a7
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# sendbird-nodejs
Thin wrapper around SendBird Server REST API

# PLEASE NOTE THIS WORKS ON TOP OF `SENDBIRD V2.0` API - V3.0 WILL COME SOON

## Installation
`npm install sendbird-nodejs --save`


## Usage
See [SendBird Documentation](https://docs.sendbird.com/platform) for payload and response details.
See [SendBird Documentation](https://docs.sendbird.com/v2/platform) for payload and response details.
You don't need to pass the `auth` field on the payload, you provide it when creating a new instance of `SendBird` and it is attached to all requests.

```javascript
var SendBird = require('sendbird-nodejs');
var sb = new SendBird(config.sendBird.appToken);
```

The `sb` instance we just created has a field for each endpoint in the [SendBird Server API](https://docs.sendbird.com/platform#overview) that is an object with the endpoints methods.
[sb.user](https://docs.sendbird.com/platform#user)
[sb.channel](https://docs.sendbird.com/platform#open_chat)
[sb.messaging](https://docs.sendbird.com/platform#messaging)
[sb.admin](https://docs.sendbird.com/platform#admin)
[sb.migration](https://docs.sendbird.com/platform#migration)
The `sb` instance we just created has a field for each endpoint in the [SendBird Server API](https://docs.sendbird.com/v2/platform#overview) that is an object with the endpoints methods.
[sb.user](https://docs.sendbird.com/v2/platform#user)
[sb.channel](https://docs.sendbird.com/v2/platform#open_chat)
[sb.messaging](https://docs.sendbird.com/v2/platform#messaging)
[sb.admin](https://docs.sendbird.com/v2/platform#admin)
[sb.migration](https://docs.sendbird.com/v2/platform#migration)

So, to create a user you would simply need to have something like this:
```javascript
Expand Down

0 comments on commit a98c3a7

Please sign in to comment.