node-zendesk
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -80,3 +80,3 @@ //tickets.js: Client for the zendesk API. | ||
// ====================================== Ticket Export Sample (max 50 tickets per request) | ||
Tickets.prototype.export = function (startTime, cb) { | ||
Tickets.prototype.exportSample = function (startTime, cb) { | ||
this.request('GET', ['exports', 'tickets', 'sample', {start_time: startTime}], cb); | ||
@@ -89,5 +89,5 @@ }; | ||
// ====================================== Listing Audits | ||
Tickets.prototype.export = function (ticketID, cb) { | ||
Tickets.prototype.exportAudit = function (ticketID, cb) { | ||
this.request('GET', ['tickets', ticketID, 'audits'], cb); | ||
}; | ||
{ | ||
"name": "node-zendesk", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "zendesk API client wrapper", | ||
"keywords": [ | ||
"zendesk", | ||
"API", | ||
"support", | ||
"supportdesk", | ||
"buddha" | ||
], | ||
"homepage": "https://github.com/blakmatrix/node-zendesk", | ||
@@ -12,11 +19,11 @@ "repository": { | ||
"scripts": { | ||
"test": "vows --spec ./test/*-test.js" | ||
"test": "node ./test/*-test.js" | ||
}, | ||
"author": "Farrin Reid <blakmatrix@gmail.com>", | ||
"dependencies": { | ||
"request": "~2.9.x", | ||
"querystring": "~0.1.x", | ||
"async": "~0.1.x", | ||
"request": "2.9.x", | ||
"querystring": "0.1.x", | ||
"async": "0.1.x", | ||
"flatten": "0.0.x" | ||
} | ||
} |
312
ReadMe.md
@@ -1,38 +0,324 @@ | ||
# node-zensupport | ||
# node-zendesk | ||
--- | ||
[![build status](https://secure.travis-ci.org/blakmatrix/node-zendesk.png)](http://travis-ci.org/blakmatrix/node-zendesk) | ||
## Example | ||
## Example: | ||
```js | ||
var zendesk = require('node-zendesk'), | ||
fs = require('fs'); | ||
var client = zendesk.createClient({ | ||
username: 'username', | ||
token: 'token', | ||
remoteUri: 'https://remote.zendesk.com/api/v2' | ||
}); | ||
client.users.list(function (err, req, result) { | ||
if (err) { | ||
console.log(err); | ||
return; | ||
} | ||
console.log(JSON.stringify(result[0], null, 2, true));//gets the first page | ||
}); | ||
``` | ||
Take a look in the `examples` folder for more examples. | ||
## Install: | ||
## Install | ||
This library may be installed using npm: | ||
Install using npm: | ||
```bash | ||
npm install node-zendesk | ||
``` | ||
npm install ???????? | ||
## client | ||
## Usage: | ||
```js | ||
request(method, uri) | ||
requestAll(method, uri) //pulls back multiple pages | ||
upload(uri, file, fileToken, callback) | ||
``` | ||
### api.createClient(options) | ||
## Methods | ||
### accountsettings | ||
```js | ||
show(cb) | ||
``` | ||
### client | ||
### activitystream | ||
```js | ||
show(activityID, cb) | ||
list(cb) | ||
``` | ||
### attachments | ||
and many more... | ||
```js | ||
upload(file, fileToken, cb) | ||
``` | ||
## Tests | ||
### categories | ||
All tests are written with [vows](http://vowsjs.org) and should be run with [npm](http://npmjs.org): | ||
```js | ||
list(cb) | ||
show(categoryID, cb) | ||
create(category, cb) | ||
update(categoryID, category, cb) | ||
delete(categoryID, cb) | ||
``` | ||
``` bash | ||
$ npm test | ||
### customagentroles | ||
```js | ||
list(cb) | ||
``` | ||
### forums | ||
```js | ||
list(cb) | ||
listByCategory(categoryID, cb) | ||
show(forumID, cb) | ||
create(forum, cb) | ||
update(forumID, forum, cb) | ||
delete(forumID, cb) | ||
``` | ||
### forumsubscriptions | ||
```js | ||
list(cb) | ||
listByForum(forumID, cb) | ||
show(forumSubscriptionID, cb) | ||
create(forumSubscription, cb) | ||
delete(forumSubscriptionID, cb) | ||
``` | ||
### groupmemberships | ||
```js | ||
list(cb) | ||
listByUser(userID, cb) | ||
listByGroup(groupID, cb) | ||
show(groupMembershipID, cb) | ||
showByUser(userID, groupMembershipID, cb) | ||
create(groupMembership, cb) | ||
createByUser(userID, groupMembership, cb) | ||
delete(groupMembershipID, cb) | ||
deleteByUser(userID, groupMembershipID, cb) | ||
makeDefault(userID, groupMembershipID, cb) | ||
``` | ||
### groups | ||
```js | ||
list(cb) | ||
assignable(cb) | ||
show(groupID, cb) | ||
create(group, cb) | ||
update(groupID, group, cb) | ||
delete(groupID, cb) | ||
``` | ||
### jobstatuses | ||
```js | ||
show(jobStatusID, cb) | ||
``` | ||
### locales | ||
```js | ||
list(cb) | ||
show(localeID, cb) | ||
showCurrent(cb) | ||
current(cb) | ||
``` | ||
### macros | ||
```js | ||
list(cb) | ||
apply(macroID, cb) | ||
applyTicket(ticketID, macroID, cb) | ||
``` | ||
### organizations | ||
```js | ||
list(cb) | ||
show(organizationID, cb) | ||
create(organization, cb) | ||
update(organizationID, organization, cb) | ||
delete(organizationID, cb) | ||
``` | ||
### satisfactionratings | ||
```js | ||
list(cb) | ||
received(cb) | ||
show(satisfactionRatingID, cb) | ||
``` | ||
### search | ||
```js | ||
query(searchTerm, cb) | ||
queryAll(searchTerm, cb) | ||
queryAnonymous (searchTerm, cb) | ||
queryAnonymousAll (searchTerm, cb) | ||
``` | ||
### suspendedtickets | ||
```js | ||
list(cb) | ||
show(suspendedTicketID, cb) | ||
recover(suspendedTicketID, cb) | ||
recoverMany(suspendedTicketIDs, cb) | ||
delete(suspendedTicketID, cb) | ||
destroyMany(suspendedTicketIDs, cb) | ||
deleteMany(suspendedTicketIDs, cb) | ||
``` | ||
### tags | ||
```js | ||
list(cb) | ||
``` | ||
### ticketaudits | ||
```js | ||
list(ticketID, cb) | ||
``` | ||
### ticketfields | ||
```js | ||
list(cb) | ||
show(ticketFieldID, cb) | ||
create(ticketField, cb) | ||
update(ticketFieldID, ticketField, cb) | ||
delete(ticketFieldID, cb) | ||
``` | ||
### tickets | ||
```js | ||
list(cb) | ||
listByOrganization(orgID, cb) | ||
listByUserRequested(userID, cb) | ||
listByUserCCD(userID, cb) // email cc | ||
listRecent(cb) | ||
listCollaborators(ticketID, cb) | ||
listIncidents(ticketID, cb) | ||
show(ticketID, cb) | ||
create(ticket, cb) | ||
update(ticketID, ticket, cb) | ||
updateMany(ticket_ids, ticket, cb) | ||
delete(ticketID, cb) | ||
export(startTime, cb) //1000 per page export | ||
exportSample(startTime, cb) //Ticket Export Sample (max 50 tickets per request) | ||
exportAudit(ticketID, cb) //Listing Audits | ||
``` | ||
### topiccomments | ||
```js | ||
list(topicID, cb) | ||
listByUser(userID, cb) | ||
show(topicID, commentID, cb) | ||
showByUser(userID, commentID, cb) | ||
create(topicID, comment, cb) | ||
update(topicID, commentID, comment, cb) | ||
delete(topicID, commentID, cb) | ||
``` | ||
### topics | ||
```js | ||
list(cb) | ||
listByForum(forumID, cb) | ||
listByUser(userID, cb) | ||
show(topicID, cb) | ||
showMany(topicIDs, cb) | ||
create(topic, cb) | ||
update(topicID, topic, cb) | ||
delete(topicID, cb) | ||
``` | ||
### topicsubscriptions | ||
```js | ||
list(cb) | ||
listByTopic(topicID, cb) | ||
show(topicSubscriptionsID, cb) | ||
create(topicSubscription, cb) | ||
delete(topicSubscriptionsID, cb) | ||
``` | ||
### topicvotes | ||
```js | ||
list(topicID, cb) | ||
listByUser(userID, cb) | ||
show(topicID, cb) | ||
create(topicID, vote, cb) | ||
delete(topicID, cb) | ||
``` | ||
### useridentities | ||
```js | ||
list(userID, cb) | ||
show(userID, userIDentityID, cb) | ||
create(userID, userIDentity, cb) | ||
update(userID, userIDentityID, cb) | ||
makePrimary(userID, userIDentityID, cb) | ||
verify(userID, userIDentityID, cb) | ||
requestVerification(userID, userIDentityID, cb) | ||
delete(userID, userIDentityID, cb) | ||
``` | ||
### users | ||
```js | ||
auth(cb) //also me() | ||
list(cb) | ||
listByGroup(id, cb) | ||
listByOrganization(id, cb) | ||
show(id, cb) | ||
create(user, cb) | ||
createMany(users, cb) | ||
update(id, user, cb) | ||
suspend(id, cb) | ||
delete(id, cb) | ||
search(params, cb) | ||
me(cb) | ||
``` | ||
### views | ||
```js | ||
list(cb) | ||
listActive(cb) | ||
show(viewID, cb) | ||
showCount(viewID, cb) | ||
showCounts(viewIDs, cb) | ||
``` | ||
## Tests | ||
ToDO | ||
## License | ||
MIT. |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
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
50603
39
1083
325
1
6
Updatedasync@0.1.x
Updatedquerystring@0.1.x
Updatedrequest@2.9.x