This is a node module created to wrap the Yahoo! Fantasy Sports API (link). At the moment, not all subresources are available, nor are any of the 'collection' elements. I do hope to add them, and they have been added to the code. If the token expires, the module will return a 'token_expired' error.
The API is designed to act as a helper for those interacting with the Y! Fantasy API. The goal is for ease of use for the user, both in terms of querying endpoints and parsing responses. I've noticed that in working with the API, the data is not always the easiest to understand, so hopefully what I have created here will help people out.
You can install the module via npm by running:
$ npm install yahoo-fantasy
In version 2.0, OAuth2.0 became the only way to communicate with the Yahoo! API. This was done for a number of reasons, but I do believe this will make it a better module in terms of both security, and should make it easier to use. The OAuth token from Yahoo! lasts for only an hour, so if the response returned from Yahoo! is an error, you'll have to refresh the authentication token from within your app.
You can view the source code for this project on Github. At the very least it will give you an idea of how you can use this module.
This module is available under the MIT Licence
This project will always very much be a work in progress, and I'm not perfect. It's a labour of love and there will most certainly be bugs. Please report any issues via the GitHub issues page.