node-axosoft
Advanced tools
Comparing version 1.3.0 to 2.0.0
@@ -6,3 +6,3 @@ var _ = require('lodash'); | ||
var _axosoft_api_version = 'v5'; | ||
var _axosoft_api_version = 'v6'; | ||
var _base_url; | ||
@@ -57,2 +57,3 @@ var _axosoft_api_base_url; | ||
rest_function; | ||
// Validate credentials | ||
@@ -59,0 +60,0 @@ _authenticateCredentails(function (err) { |
@@ -61,3 +61,3 @@ var api = require('./api'); | ||
delete: function (attachment_id, callback) { | ||
api.handleRestRequest('delete', '/attachments/' + attachment_id + '', null, callback); | ||
api.handleRestRequest('del', '/attachments/' + attachment_id + '', null, callback); | ||
} | ||
@@ -64,0 +64,0 @@ }; |
@@ -70,3 +70,3 @@ var api = require('./api'); | ||
delete: function (contact_id, callback) { | ||
api.handleRestRequest('delete', '/contacts/' + contact_id + '', null, callback); | ||
api.handleRestRequest('del', '/contacts/' + contact_id + '', null, callback); | ||
} | ||
@@ -73,0 +73,0 @@ |
@@ -70,3 +70,3 @@ var api = require('./api'); | ||
delete: function (customer_id, callback) { | ||
api.handleRestRequest('delete', '/customers/' + customer_id + '', null, callback); | ||
api.handleRestRequest('del', '/customers/' + customer_id + '', null, callback); | ||
} | ||
@@ -73,0 +73,0 @@ |
@@ -36,2 +36,14 @@ var api = require('./api'); | ||
/** | ||
* Retrieves a list of comments for an item. | ||
* | ||
* @param integer defect_id ID of desired defect | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getComments: function (defect_id, callback) { | ||
api.handleRestRequest('get', '/defects/' + defect_id + '/comments', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of email messages for an item. | ||
@@ -48,4 +60,27 @@ * | ||
/** | ||
* Retrieves a list of fields on the view template | ||
* | ||
* @param integer defect_id ID of desired defect | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getTemplateView: function (defect_id, callback) { | ||
api.handleRestRequest('get', '/defects/' + defect_id + '/template/view', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of available workflow steps | ||
* | ||
* @param integer defect_id ID of desired defect | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getWorkflowSteps: function (defect_id, callback) { | ||
api.handleRestRequest('get', '/defects/' + defect_id + '/workflow_steps', null, callback); | ||
}, | ||
/** | ||
* Adds an item | ||
@@ -73,5 +108,17 @@ * | ||
update: function (defect_id, defect_data, callback) { | ||
api.handleRestRequest('postJson', '/defects/' + defect_id + '', defect_data, callback); | ||
api.handleRestRequest('postJson', '/defects/' + defect_id, defect_data, callback); | ||
}, | ||
/** | ||
* Updates a workflow step | ||
* | ||
* @param integer defect_id ID of desired defect | ||
* @param object defect_data Updated data for defect | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
updateWorkflowStep: function (defect_id, defect_data, callback) { | ||
api.handleRestRequest('postJson', '/defects/' + defect_id + '/workflow_steps', defect_data, callback); | ||
}, | ||
@@ -91,2 +138,14 @@ /** | ||
/** | ||
* Adds one comment to an item | ||
* | ||
* @param integer defect_id ID of desired defect | ||
* @param object comment_data Data for new comment | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addComments: function (defect_id, comment_data, callback) { | ||
api.handleRestRequest('postJson', '/defects/' + defect_id + '/comments', comment_data, callback); | ||
}, | ||
@@ -116,3 +175,3 @@ /** | ||
delete: function (defect_id, callback) { | ||
api.handleRestRequest('delete', '/defects/' + defect_id + '', null, callback); | ||
api.handleRestRequest('del', '/defects/' + defect_id + '', null, callback); | ||
} | ||
@@ -119,0 +178,0 @@ |
@@ -57,3 +57,3 @@ var api = require('./api'); | ||
delete: function (email_id, callback) { | ||
api.handleRestRequest('delete', '/emails/' + email_id + '', null, callback); | ||
api.handleRestRequest('del', '/emails/' + email_id + '', null, callback); | ||
} | ||
@@ -60,0 +60,0 @@ |
@@ -10,3 +10,3 @@ var api = require('./api'); | ||
* @param integer feature_id ID of desired feature | ||
* @param object options Filtering and flag options to retrieve features | ||
* @param object options Filtering and flag options to retrieve contacts | ||
* @param function callback Callback function | ||
@@ -32,3 +32,3 @@ * | ||
getAttachments: function (feature_id, callback) { | ||
api.handleRestRequest('get', '/features' + feature_id + '/attachments', null, callback); | ||
api.handleRestRequest('get', '/features/' + feature_id + '/attachments', null, callback); | ||
}, | ||
@@ -38,2 +38,14 @@ | ||
/** | ||
* Retrieves a list of comments for an item. | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getComments: function (feature_id, callback) { | ||
api.handleRestRequest('get', '/features/' + feature_id + '/comments', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of email messages for an item. | ||
@@ -51,6 +63,30 @@ * | ||
/** | ||
* Adds an item | ||
* Retrieves a list of fields on the view template | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getTemplateView: function (feature_id, callback) { | ||
api.handleRestRequest('get', '/features/' + feature_id + '/template/view', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of available workflow steps | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getWorkflowSteps: function (feature_id, callback) { | ||
api.handleRestRequest('get', '/features/' + feature_id + '/workflow_steps', null, callback); | ||
}, | ||
/** | ||
* Adds an item | ||
* | ||
* @param object feature_data Data for new feature | ||
* @param function callback Callback function | ||
* @param function callback Callback function | ||
* | ||
@@ -60,3 +96,3 @@ * @return void | ||
add: function (feature_data, callback) { | ||
api.handleRestRequest('postJson', '/features/', feature_data, callback); | ||
api.handleRestRequest('postJson', '/features', feature_data, callback); | ||
}, | ||
@@ -68,5 +104,5 @@ | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data New data for feature | ||
* @param function callback Callback function | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data Updated data for feature | ||
* @param function callback Callback function | ||
* | ||
@@ -76,5 +112,17 @@ * @return void | ||
update: function (feature_id, feature_data, callback) { | ||
api.handleRestRequest('postJson', '/features/' + feature_id + '', feature_data, callback); | ||
api.handleRestRequest('postJson', '/features/' + feature_id, feature_data, callback); | ||
}, | ||
/** | ||
* Updates a workflow step | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data Updated data for feature | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
updateWorkflowStep: function (feature_id, feature_data, callback) { | ||
api.handleRestRequest('postJson', '/features/' + feature_id + '/workflow_steps', feature_data, callback); | ||
}, | ||
@@ -84,5 +132,5 @@ /** | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data New attachment data | ||
* @param function callback Callback function | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data Data for new attachment(s) | ||
* @param function callback Callback function | ||
* | ||
@@ -95,2 +143,14 @@ * @return void | ||
/** | ||
* Adds one comment to an item | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param object comment_data Data for new comment | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addComments: function (feature_id, comment_data, callback) { | ||
api.handleRestRequest('postJson', '/features/' + feature_id + '/comments', comment_data, callback); | ||
}, | ||
@@ -100,5 +160,5 @@ /** | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data New notification data | ||
* @param function callback Callback function | ||
* @param integer feature_id ID of desired feature | ||
* @param object feature_data Data for new notificiation(s) | ||
* @param function callback Callback function | ||
* | ||
@@ -113,6 +173,6 @@ * @return void | ||
/** | ||
* Delete a single feature | ||
* Delete a feature | ||
* | ||
* @param integer feature_id ID of desired feature | ||
* @param function callback Callback function | ||
* @param integer feature_id ID of desired feature | ||
* @param function callback Callback function | ||
* | ||
@@ -122,3 +182,3 @@ * @return void | ||
delete: function (feature_id, callback) { | ||
api.handleRestRequest('delete', '/features/' + feature_id + '', null, callback); | ||
api.handleRestRequest('del', '/features/' + feature_id + '', null, callback); | ||
} | ||
@@ -125,0 +185,0 @@ |
@@ -0,0 +0,0 @@ var api = require('./api'); |
@@ -9,5 +9,5 @@ var api = require('./api'); | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param object options Filtering and flag options to retrieve incidents | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param object options Filtering and flag options to retrieve contacts | ||
* @param function callback Callback function | ||
* | ||
@@ -26,4 +26,4 @@ * @return void | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param function callback Callback function | ||
* | ||
@@ -38,6 +38,18 @@ * @return void | ||
/** | ||
* Retrieves a list of comments for an item. | ||
* | ||
* @param integer incident_id ID of desired incident | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getComments: function (incident_id, callback) { | ||
api.handleRestRequest('get', '/incidents/' + incident_id + '/comments', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of email messages for an item. | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param function callback Callback function | ||
* | ||
@@ -50,10 +62,31 @@ * @return void | ||
/** | ||
* Retrieves a list of fields on the view template | ||
* | ||
* @param integer incident_id ID of desired incident | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getTemplateView: function (incident_id, callback) { | ||
api.handleRestRequest('get', '/incidents/' + incident_id + '/template/view', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of available workflow steps | ||
* | ||
* @param integer incident_id ID of desired incident | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getWorkflowSteps: function (incident_id, callback) { | ||
api.handleRestRequest('get', '/incidents/' + incident_id + '/workflow_steps', null, callback); | ||
}, | ||
/** | ||
* Adds an item | ||
* Adds an item | ||
* | ||
* @param object incident_data Data for new incident | ||
* @param function callback Callback function | ||
* @param function callback Callback function | ||
* | ||
@@ -70,5 +103,5 @@ * @return void | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param object incident_data New data for an incident | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param object incident_data Updated data for incident | ||
* @param function callback Callback function | ||
* | ||
@@ -78,5 +111,17 @@ * @return void | ||
update: function (incident_id, incident_data, callback) { | ||
api.handleRestRequest('postJson', '/incidents/' + incident_id + '', incident_data, callback); | ||
api.handleRestRequest('postJson', '/incidents/' + incident_id, incident_data, callback); | ||
}, | ||
/** | ||
* Updates a workflow step | ||
* | ||
* @param integer incident_id ID of desired incident | ||
* @param object incident_data Updated data for incident | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
updateWorkflowStep: function (incident_id, incident_data, callback) { | ||
api.handleRestRequest('postJson', '/incidents/' + incident_id + '/workflow_steps', incident_data, callback); | ||
}, | ||
@@ -86,5 +131,5 @@ /** | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param object incident_data Data for new attachement | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param object incident_data Data for new attachment(s) | ||
* @param function callback Callback function | ||
* | ||
@@ -97,2 +142,14 @@ * @return void | ||
/** | ||
* Adds one comment to an item | ||
* | ||
* @param integer incident_id ID of desired incident | ||
* @param object comment_data Data for new comment | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addComments: function (incident_id, comment_data, callback) { | ||
api.handleRestRequest('postJson', '/incidents/' + incident_id + '/comments', comment_data, callback); | ||
}, | ||
@@ -102,5 +159,5 @@ /** | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param object incident_data Data for new Notification | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param object incident_data Data for new notificiation(s) | ||
* @param function callback Callback function | ||
* | ||
@@ -115,6 +172,6 @@ * @return void | ||
/** | ||
* {Custom comment here} | ||
* Delete a incident | ||
* | ||
* @param integer incident_id ID of required incident | ||
* @param function callback Callback function | ||
* @param integer incident_id ID of desired incident | ||
* @param function callback Callback function | ||
* | ||
@@ -124,3 +181,3 @@ * @return void | ||
delete: function (incident_id, callback) { | ||
api.handleRestRequest('delete', '/incidents/' + incident_id + '', null, callback); | ||
api.handleRestRequest('del', '/incidents/' + incident_id + '', null, callback); | ||
} | ||
@@ -127,0 +184,0 @@ |
@@ -54,3 +54,3 @@ var api = require('./api'); | ||
delete: function (item_relation_id, callback) { | ||
api.handleRestRequest('delete', '/item_relations/' + item_relation_id, null, callback); | ||
api.handleRestRequest('del', '/item_relations/' + item_relation_id, null, callback); | ||
} | ||
@@ -57,0 +57,0 @@ |
@@ -0,0 +0,0 @@ var api = require('./api'); |
@@ -0,0 +0,0 @@ var api = require('./api'); |
@@ -11,3 +11,5 @@ var pkg = require('../package.json'); | ||
VERSION: pkg.version, | ||
Activity: require('./activity.js'), | ||
Attachments: require('./attachments.js'), | ||
Comments: require('./comments.js'), | ||
Contacts: require('./contacts.js'), | ||
@@ -17,2 +19,3 @@ Customers: require('./customers.js'), | ||
Features: require('./features.js'), | ||
Filters: require('./filters.js'), | ||
Tasks: require('./tasks.js'), | ||
@@ -28,2 +31,3 @@ Incidents: require('./incidents.js'), | ||
Releases: require('./releases.js'), | ||
Security: require('./security.js'), | ||
SecurityRoles: require('./security_roles.js'), | ||
@@ -30,0 +34,0 @@ Settings: require('./settings.js'), |
@@ -18,3 +18,3 @@ var api = require('./api'); | ||
picklist_type = args[0], | ||
picklist_id = (args[0]) ? '/' + args[0] : ''; | ||
picklist_id = parseInt(args[1]) ? '/' + args[1] :''; | ||
@@ -73,3 +73,3 @@ api.handleRestRequest('get', '/picklists/' + picklist_type + picklist_id + '', null, callback); | ||
deletePriority: function (picklist_id, callback) { | ||
api.handleRestRequest('delete', '/picklists/priority/' + picklist_id + '', null, callback); | ||
api.handleRestRequest('del', '/picklists/priority/' + picklist_id + '', null, callback); | ||
}, | ||
@@ -87,3 +87,3 @@ | ||
deleteSeverity: function (picklist_id, callback) { | ||
api.handleRestRequest('delete', '/picklists/severity/' + picklist_id + '', null, callback); | ||
api.handleRestRequest('del', '/picklists/severity/' + picklist_id + '', null, callback); | ||
}, | ||
@@ -101,3 +101,3 @@ | ||
deleteStatus: function (picklist_id, callback) { | ||
api.handleRestRequest('delete', '/picklists/status/' + picklist_id + '', null, callback); | ||
api.handleRestRequest('del', '/picklists/status/' + picklist_id + '', null, callback); | ||
} | ||
@@ -104,0 +104,0 @@ |
@@ -47,3 +47,3 @@ var api = require('./api'); | ||
project_id = args[0], | ||
filters = args[1] || null; | ||
filters = typeof args[1] === 'string' ? args[1] : null; | ||
@@ -104,3 +104,3 @@ api.handleRestRequest('get', '/projects/' + project_id + '/workflow', filters, callback); | ||
delete: function (project_id, callback) { | ||
api.handleRestRequest('delete', '/projects/' + project_id, null, callback); | ||
api.handleRestRequest('del', '/projects/' + project_id, null, callback); | ||
} | ||
@@ -107,0 +107,0 @@ |
@@ -21,3 +21,17 @@ var api = require('./api'); | ||
/** | ||
* Retrieves capacity details for release | ||
* | ||
* @param integer release_id Optional ID of specific release | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getCapacity: function () { | ||
var params = utilities.processArgs(arguments); | ||
api.handleRestRequest('get', '/releases' + params.id + '/capacity_details', null, params.callback); | ||
}, | ||
/** | ||
@@ -59,3 +73,3 @@ * Add a new release | ||
delete: function (release_id, callback) { | ||
api.handleRestRequest('delete', '/releases/' + release_id + '', null, callback); | ||
api.handleRestRequest('del', '/releases/' + release_id + '', null, callback); | ||
} | ||
@@ -62,0 +76,0 @@ |
@@ -0,0 +0,0 @@ var api = require('./api'); |
@@ -0,0 +0,0 @@ var api = require('./api'); |
246
lib/tasks.js
@@ -6,112 +6,172 @@ var api = require('./api'); | ||
/** | ||
* Returns a list of items | ||
* | ||
* @param integer task_id ID of required task | ||
* @param object options Filtering and flag options to retrieve tasks | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
get: function () { | ||
var params = utilities.processArgs(arguments); | ||
/** | ||
* Returns a list of items | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param object options Filtering and flag options to retrieve contacts | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
get: function () { | ||
var params = utilities.processArgs(arguments); | ||
api.handleRestRequest('get', '/tasks' + params.id, params.options, params.callback); | ||
}, | ||
api.handleRestRequest('get', '/tasks' + params.id, params.options, params.callback); | ||
}, | ||
/** | ||
* Retrieves a list of attachments of an item | ||
* | ||
* @param integer task_id ID of required task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getAttachments: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/attachments', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of attachments of an item | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getAttachments: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/attachments', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of email messages for an item. | ||
* | ||
* @param integer task_id ID of required task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getEmails: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/emails', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of comments for an item. | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getComments: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/comments', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of email messages for an item. | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getEmails: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/emails', null, callback); | ||
}, | ||
/** | ||
* Adds an item | ||
* | ||
* @param object task_data Data for new tasks | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
add: function (task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks', task_data, callback); | ||
}, | ||
/** | ||
* Retrieves a list of fields on the view template | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getTemplateView: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/template/view', null, callback); | ||
}, | ||
/** | ||
* Retrieves a list of available workflow steps | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
getWorkflowSteps: function (task_id, callback) { | ||
api.handleRestRequest('get', '/tasks/' + task_id + '/workflow_steps', null, callback); | ||
}, | ||
/** | ||
* Updates an item | ||
* | ||
* @param integer task_id ID of required task | ||
* @param object task_data Data for updated task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
update: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '', task_data, callback); | ||
}, | ||
/** | ||
* Adds an item | ||
* | ||
* @param object task_data Data for new task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
add: function (task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks', task_data, callback); | ||
}, | ||
/** | ||
* Adds one or more attachments to an item | ||
* | ||
* @param integer task_id ID of required task | ||
* @param object task_data Data for new attachment | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addAttachments: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '/attachments', task_data, callback); | ||
}, | ||
/** | ||
* Updates an item | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param object task_data Updated data for task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
update: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id, task_data, callback); | ||
}, | ||
/** | ||
* Updates a workflow step | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param object task_data Updated data for task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
updateWorkflowStep: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '/workflow_steps', task_data, callback); | ||
}, | ||
/** | ||
* Adds a change notification for the item | ||
* | ||
* @param integer task_id ID of required task | ||
* @param object task_data Data for new notification | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addNotifications: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '/notifications', task_data, callback); | ||
}, | ||
/** | ||
* Adds one or more attachments to an item | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param object task_data Data for new attachment(s) | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addAttachments: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '/attachments', task_data, callback); | ||
}, | ||
/** | ||
* Adds one comment to an item | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param object comment_data Data for new comment | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addComments: function (task_id, comment_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '/comments', comment_data, callback); | ||
}, | ||
/** | ||
* Delete a task | ||
* | ||
* @param integer task_id ID of required task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
delete: function (task_id, callback) { | ||
api.handleRestRequest('delete', '/tasks/' + task_id + '', null, callback); | ||
} | ||
/** | ||
* Adds a change notification for the item | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param object task_data Data for new notificiation(s) | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
addNotifications: function (task_id, task_data, callback) { | ||
api.handleRestRequest('postJson', '/tasks/' + task_id + '/notifications', task_data, callback); | ||
}, | ||
/** | ||
* Delete a task | ||
* | ||
* @param integer task_id ID of desired task | ||
* @param function callback Callback function | ||
* | ||
* @return void | ||
*/ | ||
delete: function (task_id, callback) { | ||
api.handleRestRequest('del', '/tasks/' + task_id + '', null, callback); | ||
} | ||
}; | ||
module.exports = Tasks; |
@@ -0,0 +0,0 @@ var api = require('./api'); |
@@ -58,3 +58,3 @@ var api = require('./api'); | ||
delete: function (user_id, callback) { | ||
api.handleRestRequest('delete', '/users/' + user_id, null, callback); | ||
api.handleRestRequest('del', '/users/' + user_id, null, callback); | ||
} | ||
@@ -61,0 +61,0 @@ |
@@ -0,0 +0,0 @@ var _ = require('lodash'); |
@@ -58,3 +58,3 @@ var api = require('./api'); | ||
delete: function (work_log_id, callback) { | ||
api.handleRestRequest('delete', '/work_logs/' + work_log_id, null, callback); | ||
api.handleRestRequest('del', '/work_logs/' + work_log_id, null, callback); | ||
} | ||
@@ -61,0 +61,0 @@ |
@@ -0,0 +0,0 @@ var api = require('./api'); |
@@ -0,0 +0,0 @@ var api = require('./api'); |
{ | ||
"name": "node-axosoft", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "A node.js client for accessing the Axosoft API", | ||
"main": "./lib/node-axosoft", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/jamesbirkett/node-axosoft.git" | ||
}, | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"keywords": [ | ||
@@ -22,8 +11,19 @@ "Node", | ||
], | ||
"author": "James Birkett", | ||
"license": "ISC", | ||
"homepage": "https://github.com/axosoft/node-axosoft#readme", | ||
"bugs": { | ||
"url": "https://github.com/jamesbirkett/node-axosoft/issues" | ||
"url": "https://github.com/axosoft/node-axosoft/issues" | ||
}, | ||
"homepage": "https://github.com/jamesbirkett/node-axosoft#readme", | ||
"license": "MIT", | ||
"author": "Brett Goldman", | ||
"main": "./lib/node-axosoft", | ||
"directories": { | ||
"lib": "./lib" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/axosoft/node-axosoft.git" | ||
}, | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"dependencies": { | ||
@@ -30,0 +30,0 @@ "lodash": "^3.10.1", |
# node-axosoft | ||
A node.js client for the Axosoft API |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
89383
34
1625
3
70