0.1.6 • Published 8 years ago

dispatch-client v0.1.6

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

dispatch-client Build Status

Universal javascript client for the Dispatch API.

Installation

npm install dispatch-client

API Overview

Every resource is accessed via your dispatch instance:

const dispatch = new require('dispatch-client')({ clientId, clientSecret });
// dispatch.{ RESOURCE_NAME }.{ METHOD_NAME }

Every resource method returns a promise:

dispatch.events.get({ jobId: '123' }).then(events => {
  console.log('Job events', events);
});

Resources & methods

  • dispatch
  • attachments
    • get(selector, [options]) - dispatch.attachments.get({ jobId: '1' })
    • create(doc, [options]) - dispatch.attachments.create({ jobId: '1', fileToken: 'filetoken' })
  • events
    • get(selector, [options]) - dispatch.events.get({ jobId: '1'})
    • create(doc, [options]) - dispatch.events.create({ jobId: '1', message: 'Friendly dog at the house' })
  • files
    • url(token) - dispatch.files.url('filetoken')
  • fetch(path, [options]) - dispatch.fetch('v1/jobs')
  • getToken([options]) - dispatch.getToken()
  • momentTimezone(timezone) - dispatch.momentTimezone('Hawaii')
0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1-rc10

8 years ago

0.0.1-rc9

8 years ago

0.0.1-rc8

8 years ago

0.0.1-rc7

8 years ago

0.0.1-rc6

8 years ago

0.0.1-rc5

8 years ago

0.0.1-rc4

8 years ago

0.0.1-rc3

8 years ago

0.0.1-rc2

8 years ago

0.0.1-rc1

8 years ago

0.0.1-rc0

8 years ago