node-zendesk
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -57,3 +57,3 @@ //client.js | ||
} else { // we have recieved a query string ex. '?sort_by=id&sort_order=desc' | ||
if (last_element.indexOf('?') === 0) { | ||
if (last_element.toString().indexOf('?') === 0) { | ||
params = last_element; | ||
@@ -77,3 +77,3 @@ } else { | ||
'Accept' : 'application/json', | ||
'User-Agent' : 'node-zendesk/0.0.10 (node/' + process.versions.node + ')' | ||
'User-Agent' : 'node-zendesk/0.0.11 (node/' + process.versions.node + ')' | ||
}; | ||
@@ -113,3 +113,3 @@ if(useOAuth){ //token is an oauth token obtained from OAuth2 | ||
this._request(options, function (err, response, result) { | ||
return this._request(options, function (err, response, result) { | ||
if (err) { | ||
@@ -243,3 +243,3 @@ return callback(err); | ||
'Content-Length': stat.size, | ||
'User-Agent' : 'node-zendesk/0.0.10 (node/' + process.versions.node + ')' | ||
'User-Agent' : 'node-zendesk/0.0.11 (node/' + process.versions.node + ')' | ||
}; | ||
@@ -263,3 +263,3 @@ if(useOAuth) | ||
out = Client.prototype.request.apply(this, ['POST', uri, function (error, request, result) { | ||
out = Client.prototype.request.apply(self, ['POST', uri, function (error, request, result) { | ||
if (error) { | ||
@@ -266,0 +266,0 @@ return callback(error); |
@@ -57,2 +57,6 @@ //tickets.js: Client for the zendesk API. | ||
Tickets.prototype.showMany = function (ticket_ids, cb) { | ||
this.request('GET', ['tickets', 'show_many', '?ids=' + ticket_ids.toString()], cb); | ||
}; | ||
// ====================================== Creating Tickets | ||
@@ -59,0 +63,0 @@ Tickets.prototype.create = function (ticket, cb) { |
{ | ||
"name": "node-zendesk", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "zendesk API client wrapper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -298,2 +298,3 @@ # node-zendesk | ||
show(ticketID, cb) | ||
showMany(ticket_ids, cb) | ||
create(ticket, cb) | ||
@@ -300,0 +301,0 @@ update(ticketID, ticket, cb) |
68817
1505
421