node-zendesk
Advanced tools
Comparing version
@@ -18,2 +18,6 @@ // client.js - node-zendesk client initialization | ||
'Votes', 'Search', 'AccessPolicies' | ||
], | ||
voiceParts = [ | ||
'PhoneNumbers', 'GreetingCategories', 'Greetings', 'CurrentQueueActivity', | ||
'HistoricalQueueActivity', 'AgentActivity', 'Availabilities' | ||
]; | ||
@@ -44,2 +48,5 @@ | ||
alias: 'helpcenter' | ||
}, | ||
'v': { | ||
alias: 'voice' | ||
} | ||
@@ -53,2 +60,4 @@ }); | ||
this.helpcenter = true; | ||
} else if (nconf.get('voice')) { | ||
this.voice = true; | ||
} | ||
@@ -58,3 +67,5 @@ | ||
if (this.helpcenter) { | ||
nconf.set('remoteUri', 'https://' + nconf.get('subdomain') + '.zendesk.com/hc/api/v2'); | ||
nconf.set('remoteUri', 'https://' + nconf.get('subdomain') + '.zendesk.com/api/v2/help_center'); | ||
} else if (this.voice){ | ||
nconf.overrides({'remoteUri': 'https://'+nconf.get('subdomain') + '.zendesk.com/api/v2/channels/voice'}); | ||
} else { | ||
@@ -70,2 +81,5 @@ nconf.set('remoteUri', 'https://' + nconf.get('subdomain') + '.zendesk.com/api/v2'); | ||
clientPath = './client/helpcenter/'; | ||
} else if (this.voice) { | ||
partsToAdd = voiceParts; | ||
clientPath = './client/voice/'; | ||
} else { | ||
@@ -76,2 +90,3 @@ partsToAdd = parts; | ||
partsToAdd.forEach(function (k) { | ||
@@ -78,0 +93,0 @@ exports[k] = require(clientPath + k.toLowerCase())[k]; |
@@ -30,2 +30,9 @@ //Macros.js: Client for the zendesk API. | ||
Macros.prototype.create = function (user, cb) { | ||
this.request('POST', ['macros'], macro, cb); | ||
}; | ||
Macros.prototype.createMany = function (users, cb) { | ||
this.request('POST', ['users', 'create_many'], users, cb); | ||
}; |
{ | ||
"name": "node-zendesk", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "zendesk API client wrapper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -58,8 +58,9 @@ # node-zendesk | ||
``` | ||
-s --subdomain X | ||
-u --username X | ||
-p --password X | ||
-t --token X | ||
-r --remoteUri X | ||
-s --subdomain X | ||
-u --username X | ||
-p --password X | ||
-t --token X | ||
-r --remoteUri X | ||
-hc --helpcenter | ||
-v --voice | ||
--debug | ||
@@ -66,0 +67,0 @@ --no-cookies |
155732
5.19%73
10.61%2326
8.09%602
0.17%