Important: This is an early development stage. So far only login is implemented. You can however post to any endpoints of the API but you have to deal with the response yourself
Provide a username and a password. The response of snapchat will contain the friends, the besties, the snaps and some additional information.
helpers.login(USERNAME, PASSWORD, function(res) { someCallback(); }, function(err) { someError(); });
The first and second hashparam are most likely helpers.static_token
and helpers.nanotime()
. To give maximum flexibility though, I implemented this in a configurable way:
helpers.postToSnapchatApi('/myEndPoint',{my: data}, [hashparam1, hashparam2], function(res) { someCallback(); }, function(err) { someError(); });
That's it so far. Feel free to enhance the script and remove any errors or inconsistencies.