Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

The Node client library for the Tuneup Technology App.

License

Notifications You must be signed in to change notification settings

tuneuptechnology/tuneuptechnology-node

Repository files navigation

Tuneup Technology App Node Client Library

The Node client library for the Tuneup Technology App.

Build Status Coverage Status NPM Licence

This library allows you to interact with the customers, tickets, inventory, and locations objects without needing to do the hard work of binding your calls and data to endpoints. Simply call an action such as Customer.create and pass some data and let the library do the rest.

Install

npm install tuneuptechnology

Example

const tuneuptechnology = require('tuneuptechnology');

const client = new tuneuptechnology.client(process.env.API_EMAIL, process.env.API_KEY);

const data = {
  firstname: 'Jake',
  lastname: 'Peralta',
  email: '[email protected]',
  phone: '8015551234',
  user_id: 1,
  notes: 'Believes he is a good detective.',
  location_id: 1,
};

client.customers.create(data).then(console.log).catch(console.log);

Other examples can be found in the /examples directory. Alter according to your needs.

Usage

[email protected] API_KEY=123... node createCustomer.js

Documentation

Up-to-date API documentation can be found here.

Development

# Lint project
npm run lint

# Run tests
npm run test

# Run coverage
npm run coverage

Releasing

As a separate PR from the feature/bug PR:

  1. Update the version string client.js
  2. Update CHANGELOG
  3. Create a GitHub tag with proper Node version semantics (eg: v1.0.0)
  4. Publish the NPM package