toto.js to call your Toto based webservice.
var toto = new Toto(url) to get an instance of the toto client that points to your
url, then use
toto.request(method, args, successCallback(response), errorCallback(error)) to call
method is the string name of the method to call,
errorCallback are both optional.
toto.createAccount(userID, password, args, successCallback, errorCallback) to create a new account.
args is a dictionary that contains any additional parameters that your
account.create method takes, or
null if not needed.
toto.authenticate(userID, password, successCallback, errorCallback) can be used to log in to an existing account. Both
toto.createAccount will result in a logged
in session, and all future calls to
toto.request will be authenticated.
Toto uses localStorage to store the User ID and Session ID for each domain, so it is possible to use multiple Toto services simultaneously.
TotoClient-JS uses jsSHA for HMAC.