Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/withsmilo/yfsapi-without-auth
NodeJS wrapper for the Yahoo! Fantasy Sports API (This repo was forked from https://github.com/whatadewitt/yfsapi and the OAuth 1.0 flows were removed)
https://github.com/withsmilo/yfsapi-without-auth
Last synced: 5 days ago
JSON representation
NodeJS wrapper for the Yahoo! Fantasy Sports API (This repo was forked from https://github.com/whatadewitt/yfsapi and the OAuth 1.0 flows were removed)
- Host: GitHub
- URL: https://github.com/withsmilo/yfsapi-without-auth
- Owner: withsmilo
- License: mit
- Created: 2016-04-25T23:41:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-19T23:45:24.000Z (about 8 years ago)
- Last Synced: 2024-10-07T08:07:25.206Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 168 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Notice
This repository was forked from [whatadewitt/yfsapi](https://github.com/whatadewitt/yfsapi). I would like to use the [Yahoo Fantasy Sports API](https://developer.yahoo.com/fantasysports/guide) with the [Yahoo OAuth 2.0](https://developer.yahoo.com/oauth2/guide), but yfsapi contains the Yahoo OAuth 1.0 flows internally. So I removed them from yfsapi. If you have the aim to use this module, `yahoo-fantasy-without-auth`, **you must implement the Yahoo OAuth 2.0 flows in your own NodeJS app and handle the refresh token on session expired.** This module needs your access token only.
## Installation
```bash
$ npm install yahoo-fantasy-without-auth
```## How to use
```javascript
var FantasySports = require('yahoo-fantasy-without-auth');var yf = new FantasySports();
// Set your access token given by Yahoo OAuth 2.0.
yf.setUserToken(ACCESS_TOKEN_GIVEN_BY_YAHOO);// query a resource/subresource.
yf.{resource}.{subresource} (
{possible argument(s)},
function cb(err, data) {
// handle error
// callback function
// do your thing
}
);
```
Refer to [api.md](https://github.com/withsmilo/yfsapi-without-auth/blob/master/docs/api.md) if you would like to know APIs in detail.## License
This module is available under the [MIT License](http://opensource.org/licenses/MIT).
## Sample
Refer to [yfsapi-oauth2-test-sandbox](https://github.com/withsmilo/yfsapi-oauth2-test-sandbox).
## Changed logs
#### 1.0.2
* Merged with yfsapi v1.0.2.#### 0.5.0
* Merged with yfsapi v0.5.0.#### 0.3.2
* Implement transactions' add/drop player APIs.
* Create api.md for documentation.#### 0.3.1
* Remove the Yahoo OAuth 1.0 flows from [yfsapi 0.3.1](https://github.com/whatadewitt/yfsapi#031).