var hoodie = new Hoodie()
Init Hoodie on your server
new Hoodie('https://example.com')
Init Hoodie on different server
All methods return a promise.
.add(type, properties) add data |
.find(type, id) find specific data with ID |
.findAll(type) find all data of type |
.update(type, id, changedProperties) update specific data of type with ID |
.updateAll(type, changedProperties) update all data of type |
.remove(type, id) remove specific data with ID |
.removeAll(type, id) remove all data of type |
.findOrAdd(type, id, properties) find data and add if not there |
.UpdateOrAdd(type, id, properties) add data or update, if already there |
All methods return a promise.
.signUp(username, password) sign user up |
.signIn(username, password) sign user in |
.signOut() sign user out |
.destroy() destroy user account, delete all data |
.resetPassword(username) reset password of user account |
.username gives back string of username |
hoodie.id() returns unique ID for current user |
hoodie.request(type, path, options) send custom requests, type being "GET" or "POST" |
var rStore = hoodie.open(dbName) work with remote store, same API as hoodie.store |
hoodie.on('event', fcn)
|
hoodie.store.on('event', fcn)
|
hoodie.account.on('event', fcn)
signout, function(username) |