Permalink
Browse files

Updated JS lib to 0.9.15.

  • Loading branch information...
1 parent 5db9078 commit 3b9bc4b556385424e8aec1fc8deece234b3b561f @vseventer vseventer committed Jun 13, 2013
Showing with 30 additions and 4 deletions.
  1. +29 −3 kinvey.js
  2. +1 −1 package.json
View
@@ -172,9 +172,9 @@
* @return {string} Device information.
*/
var getDeviceInfo = function() {
- // Example: "js-node/0.9.14 linux-node v0.6.13 0".
+ // Example: "js-node/0.9.15 linux-node v0.6.13 0".
return [
- 'js-node/0.9.14',
+ 'js-node/0.9.15',
process.platform + '-' + process.title,
process.version,
0// always set device ID to 0.
@@ -415,7 +415,7 @@
*
* @constant
*/
- Kinvey.SDK_VERSION = '0.9.14';
+ Kinvey.SDK_VERSION = '0.9.15';
/**
* Returns current user, or null if not set.
@@ -3270,6 +3270,20 @@
}
});
+
+ /**
+ * Executes a custom command.
+ *
+ * @param {string} id The endpoint.
+ * @param {Object} [args] Command arguments.
+ * @param {Object} options Options.
+ */
+ Kinvey.execute = function(id, args, options) {
+ var store = new Kinvey.Store.Rpc();
+ store.execute(id, args, options);
+ };
+
+
/**
* Kinvey Store namespace. Home to all stores.
*
@@ -3345,6 +3359,18 @@
options.error && (this.options.error = options.error);
},
+ /**
+ * Executes a custom command.
+ *
+ * @param {string} id The endpoint.
+ * @param {Object} args Command arguments,.
+ * @param {Object} [options] Options.
+ */
+ execute: function(id, args, options) {
+ var url = this._getUrl([ 'custom', id ]);
+ this._send('POST', url, JSON.stringify(args), options);
+ },
+
/**
* Resets password for a user.
*
View
@@ -2,7 +2,7 @@
"author": "Kinvey, Inc <support@kinvey.com> (http://www.kinvey.com)",
"name": "kinvey",
"description": "Kinvey JavaScript Library for Node.js.",
- "version": "0.9.14",
+ "version": "0.9.15",
"homepage": "http://www.kinvey.com",
"bugs": {
"email": "support@kinvey.com"

0 comments on commit 3b9bc4b

Please sign in to comment.