buddha

Simple interface with zendesk.

Usage no npm install needed!

<script type="module">
  import buddha from 'https://cdn.skypack.dev/buddha';
</script>

README

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) {
  ...
});