Skip to content

Commit

Permalink
Merge pull request #40 from cloudmine/develop
Browse files Browse the repository at this point in the history
merge develop
  • Loading branch information
spectorar authored May 30, 2018
2 parents e136695 + 905a7ee commit 03e9ef3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CloudMine JavaScript Library Change Log

## 0.10.2
* added replaceUserMaster method to cloudmine.js

## 0.10.1
* Updated dependencies
* Updated unit tests
Expand Down
49 changes: 33 additions & 16 deletions js/cloudmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,22 +742,39 @@
});
},

/**
* Update a user object without having a session token. Requires the use of the master key
* @param {string} user_id the user id of the user to update.
* @param {object} profile a JSON object representing the profile
* @param {object} [options] Override defaults set on WebService. See WebService constructor for parameters.
*/
updateUserMaster: function(user_id, profile, options) {
options = opts(this, options);
return new APICall({
action: 'account/' + user_id,
type: 'POST',
options: options,
query: server_params(options),
data: JSON.stringify(profile)
});
},
/**
* Update a user object without having a session token. Requires the use of the master key
* @param {string} user_id the user id of the user to update.
* @param {object} profile a JSON object representing the profile
* @param {object} [options] Override defaults set on WebService. See WebService constructor for parameters.
*/
updateUserMaster: function(user_id, profile, options) {
options = opts(this, options);
return new APICall({
action: 'account/' + user_id,
type: 'POST',
options: options,
query: server_params(options),
data: JSON.stringify(profile)
});
},

/**
* Replace a user object without having a session token. Requires the use of the master key
* @param {string} user_id the user id of the user to update.
* @param {object} profile a JSON object representing the profile
* @param {object} [options] Override defaults set on WebService. See WebService constructor for parameters.
*/
replaceUserMaster: function(user_id, profile, options) {
options = opts(this, options);
return new APICall({
action: 'account/' + user_id,
type: 'PUT',
options: options,
query: server_params(options),
data: JSON.stringify(profile)
});
},

/**
* Change a user's password
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cloudmine",
"preferGlobal": false,
"version": "0.10.1",
"version": "0.10.2",
"author": {
"name": "CloudMine, Inc.",
"email": "[email protected]"
Expand Down

0 comments on commit 03e9ef3

Please sign in to comment.