Coder Social home page Coder Social logo

node-zendesk's Introduction

node-zendesk Join the chat at https://gitter.im/blakmatrix/node-zendesk build status

node-zendesk logo

A Zendesk API client library for use with node.js

Read the full documentation at blakmatrix.github.io/node-zendesk/


Promise support introduced

Promise support was introduced in @v2.0.0, the Legacy version of node-zendesk without Promises @v1.5.0

Install

To use the API, just do the standard

$ npm install --save node-zendesk

Example

var zendesk = require('node-zendesk');

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

or you can use Promises, you just need to skip the callback:

var zendesk = require('node-zendesk');

var client = zendesk.createClient({
  username:  'username',
  token:     'token',
  remoteUri: 'https://remote.zendesk.com/api/v2'
});

client.users.list()
  .then(function(result) {
    console.log(JSON.stringify(result[0], null, 2, true));//gets the first page
  })
  .catch(function(error) {
    console.log(error);
  });

Take a look in the examples folder for more examples.

Contributions

If you're looking to contribute, please refer to the API Coverage Document, open an issue, or make a PR!

Tests and examples are also welcome.

Zendesk's documentation can be found here.

License

MIT.

node-zendesk's People

Contributors

basdewachter avatar blairanderson avatar blakmatrix avatar dependabot[bot] avatar dkapell-delphix avatar eikecm avatar erikzrekz avatar fmsouza avatar iconecd avatar ignigena avatar jamesmgreene avatar jamesw-mso avatar jfrerich avatar karolisg avatar magiobus avatar mattcasey avatar mfrye avatar mgmarino avatar moshikeilon avatar nhim175 avatar nnabuuu avatar onufryk avatar pchhetri avatar rangeles avatar reuvenchacha avatar rubadeau avatar rubyistdotjs avatar svishwanath-tw avatar tresni avatar wibisono avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.