dispatch-node-sdk
Advanced tools
Comparing version 0.0.37 to 0.0.38
@@ -69,2 +69,6 @@ 'use strict'; | ||
var _survey = require('./entities/survey'); | ||
var _survey2 = _interopRequireDefault(_survey); | ||
var _user = require('./entities/user'); | ||
@@ -115,2 +119,3 @@ | ||
organizations: new _Collection2.default(this, endpoints.ORGANIZATIONS), | ||
survey: (0, _survey2.default)(this), | ||
user: (0, _user2.default)(this), | ||
@@ -117,0 +122,0 @@ users: new _Collection2.default(this, endpoints.USERS) |
@@ -18,3 +18,4 @@ 'use strict'; | ||
var ORGANIZATIONS = exports.ORGANIZATIONS = '/v1/organizations'; | ||
var PUBLIC_SURVEY_RESPONSES = exports.PUBLIC_SURVEY_RESPONSES = '/v1/public/survey_responses'; | ||
var SURVEY_RESPONSES = exports.SURVEY_RESPONSES = '/v1/survey_responses'; | ||
var USERS = exports.USERS = '/v1/users'; |
@@ -120,2 +120,18 @@ 'use strict'; | ||
}); | ||
}, | ||
getSurveys: function getSurveys() { | ||
var query = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var DEFAULT_QUERY = { | ||
job_id_eq: id | ||
}; | ||
if (query.filter) { | ||
query.filter = Object.assign({}, query.filter, DEFAULT_QUERY); | ||
} else { | ||
query.filter = DEFAULT_QUERY; | ||
} | ||
return client.getCollection(endpoints.SURVEY_RESPONSES, query); | ||
} | ||
@@ -122,0 +138,0 @@ }; |
{ | ||
"name": "dispatch-node-sdk", | ||
"version": "0.0.37", | ||
"version": "0.0.38", | ||
"description": "High- and low-level libraries for interacting with the Dispatch API", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174324
60
4487