Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add username to init command #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# API Changes

## 1.1.1
- For the `init` command, optionally specify the `username` if the API key
requires it.

## 1.1

- For the `cv` command, if the supplied parameter is not formatted properly or we cannot return all the changes from that cursor, the response will now be `cv:?`. Previously, the server responded with `c:?`
Expand Down
3 changes: 2 additions & 1 deletion SYNCING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ When a client is ready to connet to a user's bucket it sends the `init` command.
- **clientid** : a string that identifies the simperium client. Example: **simperium-andriod-1.0**
- **api** : the api version to use. Current: **1.1**
- **token** : a user's access token obtained via the auth api.
- **username** : username used with the auth api
- **app_id** : a simperium app id. Example: **abusers-headset-123**
- **name** : the name of the bucket to use. Example: **notes**
- **library** : the library name of the connecting client: **simperium-android**
Expand All @@ -78,7 +79,7 @@ Optionally, the init request can contain a command to be executed upon initializ

An example `init` command with a channel prefix `0`:

0:init:{"api":1,"client_id":"android-1.0","token":"abc123","app_id":"abusers-headset","name":"notes"}
0:init:{"api":1,"client_id":"android-1.0","token":"abc123","username":"[email protected]","app_id":"abusers-headset","name":"notes"}

The Simperium server will respond with an `auth` command which will also contain either the authorized user's email address, or if authorization failed, a JSON error object.

Expand Down