-
Notifications
You must be signed in to change notification settings - Fork 30
Home
-
blob_enc_keyThe encryption key -
patternThe pattern for creating the hash -
secretAn secret for creating the hash -
static_tokenStatic token for initial login and register. -
hostnameAPI hostname (So you can do debuging) -
user_agentThe user agent.
return a req_token. First param is typically the auth_token. Second param is typically the timestamp.
Make a post call and sign it with a req_token.
-
endpointThe endpoint to call eg:'/ph/login' -
post_dataData -
param1Usually the auth_token -
param2Usually the timestamp -
rawIf true, return a stream instead of a string. The stream will be paused to avoid data loss
usernamepassword
Returns a promise of sync_data
###register(String username, String email, String password) Register an account. On success, it will return sync data.
usernameemailpassword
Get current state and optionally update it
usernameauth_token-
jsonAn object optionally containing fields to update.
The current state
Fetch a blob
usernameauth_token-
idThe blob's id (This is a number followedr)
Returns a promise of a paused stream.
Upload an blob
usernameauth_token-
blobA Readable stream of an image or video to upload. (The official app can view jpeg and pngs images; and mp4 video. It cannot view gifs. [possibly more]) -
isVideoSet this totrueif you are uploading a video.
Returns a promise of the blob's media_id
send(String username, String auth_token, String mediaId, Array(String) recipients, Number time=undefined)
Send the snap to people
usernameauth_token-
mediaIdThe blobs's media_id -
friendsA list of people to send the snap to. -
timeHow long (in seconds) a snap should be visible. This should only be set if the snap is a picture.
###addFriend(String username, String auth_token, String friend) Add a friend
usernameauth_token-
friendThe username of your soon-to-be friend
###rename(String username, String auth_token, String friend, String newName)
Set a friend's display name.
usernameauth_token-
friendThe friend to rename. -
newNameTheir new display name.
###unfriend(String username, String auth_token, String friend) Remove a friend.
usernameauth_token-
friendThe friend to remove
Update your privacy setting
usernameauth_token-
onlyFriendsIftrue, only friends can send you snaps.
Change your email
usernameauth_token-
emailYour new email