eventick

1.1.3 • Public • Published

.js Build Status

JavaScript wrapper around Eventick's API. Amazingly backed by Promises and Functional Programming.

Usage

Grab it from npm:

npm install --save eventick

The lib has only one method, called login. After logging in, the user will have access to the API.

  1. Eventick.login(user, password)
  • Type: String -> String -> Promise
  • Usage: enter credentials, the promise will resolve to an Object representing the API or throw an Error Object. Use .then() and .catch() rather than .then(ok, rejected).

Logged API:

  1. token
  • Type: String
  • Usage: normally you're not going to use this. however, if you'd need it, here it is.
  1. events.get(id)
  • Type: Number -> Promise
  • Usage: enter event's id, get a promise that will resolve to an Object containing event's data or throw an Error Object.
  1. events.getList()
  • Type: (no param) -> Promise
  • Usage: get a promise that will resolve to an Array containing events' data or throw an Error Object.
  1. attendees.get(eventId, attendeeId)
  • Type: Number -> Number -> Promise
  • Usage: enter event's id and attendee's id, get a promise that will resolve to an Object containing attendee's data or throw an Error Object.
  1. attendees.getList(eventId)
  • Type: Number -> Promise
  • Usage: get a promise that will resolve to an Array containing events' data or throw an Error Object.

FAQ

  1. Yes, all methods are curried.
  2. Yes, all methods return promises.
  3. Do I need to know Functional Programming in order to use it? No.
  4. And what about promises? Yes.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i eventick

Weekly Downloads

4

Version

1.1.3

License

MIT

Last publish

Collaborators

  • jugoncalves