node-zendesk
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -7,3 +7,3 @@ var parts = ['Users', 'Tickets', 'TicketAudits', 'TicketFields', 'Views', | ||
'ActivityStream', 'Attachments', 'JobStatuses', 'Locales', | ||
'Macros', 'SatisfactionRatings', 'SuspendedTickets', 'UserFields', 'OrganizationFields']; | ||
'Macros', 'SatisfactionRatings', 'SuspendedTickets', 'UserFields', 'OrganizationFields','OauthTokens']; | ||
@@ -10,0 +10,0 @@ parts.forEach(function (k) { |
@@ -30,3 +30,7 @@ //client.js | ||
} | ||
if (!this.jsonAPIName3) { | ||
this.jsonAPIName3 = null; | ||
} | ||
if (typeof this.options.get !== 'function') { | ||
@@ -77,3 +81,3 @@ this.options.get = function (key) { | ||
'Accept' : 'application/json', | ||
'User-Agent' : 'node-zendesk/0.0.11 (node/' + process.versions.node + ')' | ||
'User-Agent' : 'node-zendesk/0.0.12 (node/' + process.versions.node + ')' | ||
}; | ||
@@ -158,2 +162,6 @@ if(useOAuth){ //token is an oauth token obtained from OAuth2 | ||
} | ||
if (!body && self.jsonAPIName3 !== null) { | ||
body = res[(self.jsonAPIName3.toString())]; | ||
} | ||
if (!body) { | ||
@@ -194,3 +202,3 @@ body = res; | ||
async.whilst( | ||
function () {return nextPage !== null && nextPage !== 'undefined'; }, | ||
function () {return nextPage !== null && typeof nextPage !== 'undefined'; }, | ||
function (cb) { | ||
@@ -244,3 +252,3 @@ Client.prototype.request.apply(self, ['GET', nextPage, function (error, status, body, response, result) { | ||
'Content-Length': stat.size, | ||
'User-Agent' : 'node-zendesk/0.0.11 (node/' + process.versions.node + ')' | ||
'User-Agent' : 'node-zendesk/0.0.12 (node/' + process.versions.node + ')' | ||
}; | ||
@@ -247,0 +255,0 @@ if(useOAuth) |
@@ -21,3 +21,3 @@ //TicketAudits.js: Client for the zendesk API. | ||
TicketAudits.prototype.list = function (ticketID, cb) { | ||
this.request('GET', ['tickits', ticketID, 'audit'], cb);//all? | ||
this.requestAll('GET', ['tickets', ticketID, 'audit'], cb);//all? | ||
}; |
@@ -12,2 +12,3 @@ //tickets.js: Client for the zendesk API. | ||
this.jsonAPIName2 = 'ticket'; | ||
this.jsonAPIName3 = 'audits'; | ||
Client.call(this, options); | ||
@@ -106,4 +107,4 @@ }; | ||
Tickets.prototype.exportAudit = function (ticketID, cb) { | ||
this.request('GET', ['tickets', ticketID, 'audits'], cb); | ||
this.requestAll('GET', ['tickets', ticketID, 'audits'], cb); | ||
}; | ||
{ | ||
"name": "node-zendesk", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "zendesk API client wrapper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -199,2 +199,11 @@ # node-zendesk | ||
### oauthtokens | ||
```js | ||
list(cb) | ||
show(id, cb) | ||
current(cb) | ||
revoke(id, cb) | ||
``` | ||
### organizations | ||
@@ -201,0 +210,0 @@ |
70463
51
1552
430
19