Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including buddha with all npm packages installed. Try it out:

var buddha = require("buddha")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

buddha v1.0.1

Simple interface with zendesk.

buddha

buddha is a node interface into zendesk.

Build Status

Installation

npm install buddha

Usage

var buddha = require('../lib/buddha.js');

buddha.setCredentials('helpdesk.zendesk.com', 'agentemail', 'password');

buddha.getTickets('12345678', 1, function(error, data) {
  console.log(data);
});

Methods

setCredentials

Set authentication details for subsequent calls. All communication uses https.

For the zendesk example this would be:


buddha.setCredentials('helpdesk.zendesk.com', 'agentemail', 'password');

resetCredentials

Remove the current credentials meaning all subsequent calls will fail.


buddha.resetCredentials();

setOnBehalfOf

Used to perform actions on behalf of another user.


buddha.setOnBehalfOf('joe.enduser@theendusers.com');

getUsers

Get a list of users.


buddha.getUsers(function(e, d) {
  ...
});

getTickets

Get a page of tickets for a view:


buddha.getTickets(1234567, 1, function(e, d) {
  ...
});

getTicketCount

Get a count of all tickets in a view:


buddha.getTicketCount(1234567, function(e, d) {
  ...
});

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free