Novices Performing Miracles

    node-zendesk
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/node-zendesk package

    2.1.0 • Public • Published

    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.

    Install

    npm i node-zendesk

    DownloadsWeekly Downloads

    29,404

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    176 kB

    Total Files

    91

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar