Skip to content

ifraixedes/node-theyworkforyou-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

They Work For You API

This a node module for They Work For You API (http://www.theyworkforyou.com/api); I will use twfy to mention it in the rest of this document.

How to install

I've supposed that you have installed NodeJS and npm, so

npm install theyworkforyou-api

How to use

To use this module, you must have a twfy API key, which you can get easy from its website.

Then, let's start

var twfyAPI = require('theyworkforyou-api');

var twfyClient = twfyAPI('YOUR API KEY');

var promise = twfyClient.getMPs();

promise.then(
  function (data) {
    console.info('Awesome, it succeeded');
    console.info('There is ' + data.length + ' MPs');
  },

  function (err) {
    console.error('Sucks, something was wrong');
    console.error('Error message:' + err.message);
  }
);

Launch the test

To launch the tests is as pretty much straightforward as install the module, so

  • install the dev-dependencies
  • add your API key in the file config/api.json

launch the test:

make test

About the development

I developed this module with livescript so if you only are interested in the javascript code you have to compile it doing:

make build

Then you will have the javascript code in build directory

What does it need?

  1. Create a more thorough tests for all the APIs
  2. ... Fork an add your thoughts

LICENSE

Just MIT, in details in LICENSE file

About

Node module for the They Work For You API (http://theyworkforyou.com/api)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published