Permalink
Browse files

Merge branch 'master' into travis-ci

  • Loading branch information...
stomita committed Jan 22, 2014
2 parents afa0851 + 0e0d35f commit f0e91304a60f40dc28b4caddbbebae0d202f54dc
Showing with 1,833 additions and 230 deletions.
  1. +2 −0 .gitignore
  2. +12 −0 README.md
  3. +30 −25 lib/analytics.js
  4. +3 −5 lib/apex.js
  5. +45 −31 lib/bulk.js
  6. +299 −0 lib/chatter.js
  7. +51 −33 lib/connection.js
  8. +607 −0 lib/metadata.js
  9. +27 −34 lib/query.js
  10. +6 −13 lib/record-stream.js
  11. +3 −8 lib/record.js
  12. +130 −0 lib/soap.js
  13. +24 −35 lib/sobject.js
  14. +16 −11 lib/streaming.js
  15. +21 −33 lib/tooling.js
  16. +2 −2 package.json
  17. +352 −0 test/chatter.test.js
  18. BIN test/data/MyPackage.zip
  19. +203 −0 test/metadata.test.js
View
@@ -12,3 +12,5 @@ results
node_modules
npm-debug.log
+
+.npmignore
View
@@ -1235,6 +1235,18 @@ $ sfjs
## Change History
+v0.8.0 (Jan 22, 2014):
+
+* Support Chatter API.
+
+* Support Metadata API.
+
+
+v0.7.2 (Jan 16, 2014):
+
+* Removed unneeded files in npm-published package.
+
+
v0.7.1 (Dec 19, 2013):
* Support SObject get updated/deleted.
View
@@ -2,14 +2,16 @@
* @file Manages Salesforce Analytics API
* @author Shinichi Tomita <shinichi.tomita@gmail.com>
*/
+
var _ = require('underscore')._,
Promise = require('./promise');
/**
* Report instance to retrieving asynchronously executed result
*
- * @constructor
- * @param {Report} report - Report
+ * @protected
+ * @class Analytics~ReportInstance
+ * @param {Analytics~Report} report - Report
* @param {String} id - Report instance id
*/
var ReportInstance = function(report, id) {
@@ -20,8 +22,10 @@ var ReportInstance = function(report, id) {
/**
* Retrieve report result asynchronously executed
- * @param {Callback.<ReportResult>} [callback] - Callback function
- * @returns {Promise.<ReportResult>}
+ *
+ * @method Analytics~ReportInstance#retrieve
+ * @param {Callback.<Analytics~ReportResult>} [callback] - Callback function
+ * @returns {Promise.<Analytics~ReportResult>}
*/
ReportInstance.prototype.retrieve = function(callback) {
var conn = this._conn,
@@ -33,7 +37,8 @@ ReportInstance.prototype.retrieve = function(callback) {
/**
* Report object in Analytics API
*
- * @constructor
+ * @protected
+ * @class Analytics~Report
* @param {Connection} conn Connection
*/
var Report = function(conn, id) {
@@ -44,8 +49,9 @@ var Report = function(conn, id) {
/**
* Describe report metadata
*
- * @param {Callback.<ReportMetadata>} [callback] - Callback function
- * @returns {Promise.<ReportMetadata>}
+ * @method Analytics~Report#describe
+ * @param {Callback.<Analytics~ReportMetadata>} [callback] - Callback function
+ * @returns {Promise.<Analytics~ReportMetadata>}
*/
Report.prototype.describe = function(callback) {
var url = [ this._conn._baseUrl(), "analytics", "reports", this.id, "describe" ].join('/');
@@ -55,14 +61,12 @@ Report.prototype.describe = function(callback) {
/**
* Run report synchronously
*
- * @method execute
- * @memberof Report.prototype
+ * @method Analytics~Report#execute
* @param {Object} [options] - Options
* @param {Boolean} options.details - Flag if include detail in result
- * @param {ReportMetadata} options.metadata - Overriding report metadata
- * @param {Callback.<ReportResult>} [callback] - Callback function
- * @returns {Promise.<ReportResult>}
- *
+ * @param {Analytics~ReportMetadata} options.metadata - Overriding report metadata
+ * @param {Callback.<Analytics~ReportResult>} [callback] - Callback function
+ * @returns {Promise.<Analytics~ReportResult>}
*/
Report.prototype.run =
Report.prototype.exec =
@@ -87,13 +91,12 @@ Report.prototype.execute = function(options, callback) {
/**
* Run report asynchronously
*
- * @method executeAsync
- * @memberof Report.prototype
+ * @method Analytics~Report#executeAsync
* @param {Object} [options] - Options
* @param {Boolean} options.details - Flag if include detail in result
- * @param {ReportMetadata} options.metadata - Overriding report metadata
- * @param {Callback.<ReportInstanceAttrs>} [callback] - Callback function
- * @returns {Promise.<ReportInstanceAttrs>}
+ * @param {Analytics~ReportMetadata} options.metadata - Overriding report metadata
+ * @param {Callback.<Analytics~ReportInstanceAttrs>} [callback] - Callback function
+ * @returns {Promise.<Analytics~ReportInstanceAttrs>}
*/
Report.prototype.executeAsync = function(options, callback) {
options = options || {};
@@ -116,8 +119,9 @@ Report.prototype.executeAsync = function(options, callback) {
/**
* Get report instance for specified instance ID
*
+ * @method Analytics~Report#instance
* @param {String} id - Report instance ID
- * @returns {ReportInstance}
+ * @returns {Analytics~ReportInstance}
*/
Report.prototype.instance = function(id) {
return new ReportInstance(this, id);
@@ -126,8 +130,9 @@ Report.prototype.instance = function(id) {
/**
* List report instances which had been executed asynchronously
*
- * @param {Callback.<Array.<ReportInstanceAttrs>>} [callback] - Callback function
- * @returns {Promise.<Array.<ReportInstanceAttrs>>}
+ * @method Analytics~Report#instances
+ * @param {Callback.<Array.<Analytics~ReportInstanceAttrs>>} [callback] - Callback function
+ * @returns {Promise.<Array.<Analytics~ReportInstanceAttrs>>}
*/
Report.prototype.instances = function(callback) {
var url = [ this._conn._baseUrl(), "analytics", "reports", this.id, "instances" ].join('/');
@@ -138,7 +143,7 @@ Report.prototype.instances = function(callback) {
/**
* API class for Analytics API
*
- * @constructor
+ * @class
* @param {Connection} conn Connection
*/
var Analytics = function(conn) {
@@ -149,7 +154,7 @@ var Analytics = function(conn) {
* Get report object of Analytics API
*
* @param {String} id - Report Id
- * @returns {Report}
+ * @returns {Analytics~Report}
*/
Analytics.prototype.report = function(id) {
return new Report(this._conn, id);
@@ -158,8 +163,8 @@ Analytics.prototype.report = function(id) {
/**
* Get recent report list
*
- * @param {Callback.<Array.<ReportInfo>>} [callback] - Callback function
- * @returns {Promise.<Array.<ReportInfo>>}
+ * @param {Callback.<Array.<Analytics~ReportInfo>>} [callback] - Callback function
+ * @returns {Promise.<Array.<Analytics~ReportInfo>>}
*/
Analytics.prototype.reports = function(callback) {
var url = [ this._conn._baseUrl(), "analytics", "reports" ].join('/');
View
@@ -6,7 +6,7 @@
/**
* API class for Apex REST endpoint call
*
- * @constructor
+ * @class
* @param {Connection} conn Connection
*/
var Apex = function(conn) {
@@ -104,8 +104,7 @@ Apex.prototype.patch = function(path, body, callback) {
/**
* Synonym of Apex#delete()
*
- * @method del
- * @memberof Apex.prototype
+ * @method Apex#del
*
* @param {String} path - URL path to Apex REST service
* @param {Object} [body] - Request body
@@ -115,8 +114,7 @@ Apex.prototype.patch = function(path, body, callback) {
/**
* Call Apex REST service in DELETE request
*
- * @method delete
- * @memberof Apex.prototype
+ * @method Apex#delete
*
* @param {String} path - URL path to Apex REST service
* @param {Object} [body] - Request body
Oops, something went wrong.

0 comments on commit f0e9130

Please sign in to comment.