Installation
npm install uwaterloo-api
Usage
First, obtain a key from http://api.uwaterloo.ca to use the API
//Require the module var uwaterlooApi = ; //Instantiate the client var uwclient = API_KEY : 'YOUR_KEY_HERE'; //Use the API uwclient; uwclient;
A list of all available endpoints can be found here.
Passing parameters
In order to pass query parameters, you can either put them directly in the path provided
uwclient;
Or, if you prefer, add them as dynamic parameters
uwclient;
Any additional parameters provided are automatically added to the QueryString
.
Testing
Running the tests requires an API_KEY as mentioned above. Once a key is obtained, set the following variable :
# In ~/.bash_profile export uwApiToken=SOME_TOKEN
and run
npm install
npm test
Contributing
- Fork the repo
- Create a feature branch
- Add test cases if necessary
- Push your changes and create a PR
License
MIT