Code Monkey home page Code Monkey logo

onboardiq's Introduction

OnboardIQ GitHub version npm version

A node.js client for the OnboardIQ API

This module is a third-party Client API and not supported by OnboardIQ

Table of Contents

Install

$ npm install onboardiq

Getting Started

The module supports all OnboardIQ API v1 endpoints. For complete information about the api, head to the API Docs: v1 or v2

Endpoints

All endpoints return a JS Promise. See Callbacks for more details

var OnboardIQ = require('onboardiq');
var Client = new OnboardIQ.Client(API_TOKEN, API_VERSION);

// Creates a new applicant
Client.addApplicant(params);

// Modifies an existing applicant
Client.updateApplicant(id, params);

// Lists all applicants
Client.listApplicants();

// Deletes an existing applicant
Client.deleteApplicant(id);

Callbacks

All endpoints return a Promise. Below is a successful example on how to consume a Promise:

Client.listApplicants().then(function(resp) {
  // do something with the resp
});

All endpoints return a response object. An example object is shown below. The return data is the information returned by the OnboardIQ API. Please refer to their docs on how to consume it >> v1 or v2

{
	"statusCode": 200,
	"data": {}
}

Error Handling

If an error occurs with executing an API endpoint. Please use the .catch Promise method to handle it. Below is an example. The returned error is from OnboardIQ. Please refer to their docs on how to consume it >> v1 or v2.

It is a good practice to have a catch method call on all executed Promises!

Client.listApplicants().then(function(resp) {
  // do something with the resp
}).catch(function(err) {
  // do something with the error
});

Support

Please refer to the Contributing.md docs for more info

Tests

Copy the ENV file and add your API confidentials for OnboardIQ

cp .env.example .env

Then run the tests

npm test

License

See License

onboardiq's People

Contributors

bogini avatar stephnr avatar

Watchers

 avatar  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.