0.2.0 • Published 10 years ago
sitegate-user v0.2.0
sitegate-user
Methods
getById(id, callback)
Usage
User.getById('550b42003376b4ec12fbbcb1', function(err, user) {
console.log(user.name);
});Arguments
update(id, updatedFields, callback)
Usage
User.update('550b42003376b4ec12fbbcb1', {
name: 'New name'
}, function (err, user) {
console.log(user.name);
});Arguments
| Name | Type | Description |
|---|---|---|
| id | string | The ID of the user that has to be updated. |
| updatedFields | object | A hash of the fields that have to be updated with the new values. |
| cb | function(err, user) | A callback function to receive the updated user. |
License
The MIT License (MIT)