1.1.3 • Published 10 years ago

eventick v1.1.3

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

npm.io.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

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago