Code Monkey home page Code Monkey logo

yfsapi-oauth2-test-sandbox's Introduction

NodeJS sample app for Yahoo OAuth 2.0 + yfsapi-without-auth

This is a NodeJS sample application which uses Yahoo OAuth 2.0 and yfsapi-without-auth, to access Yahoo Fantasy Sports API easily. I've created a customized version of sahat/yahoo-oauth2-tutorial. To keep it simple, I tested yfsapi's user.games API only. You can experience it on my sandbox site. If you would like to test it locally, please follow next steps.

This application was tested on Ubuntu 15.10.

Prerequisites

Go to https://developer.apps.yahoo.com and create new Yahoo app.

  • Application Name : anyone you want
  • Application Type : Web Application
  • Callback Domain : myapp.com
  • API Permissions : Fantasy Sports [Read/Write]

Record your application's Client ID(Consumer Key) and Client Secret(Consumer Secret) given by Yahoo.

Setup

1. Install node.js dependencies
$ npm install
2. Edit /ets/hosts
$ sudo vi /ets/hosts
Add `127.0.0.1 myapp.com`.
3. Create new file, conf.js
module.exports = {
  'APP_CLIENT_ID': 'YOUR_CLIENT_ID_HERE',
  'APP_CLIENT_SECRET': 'YOUR_CLIENT_SECRET_HERE'
}

Test

1. Run the application
$ sudo node server.js
2. Open http://myapp.com in your browser
3. Log-in Yahoo by clicking right-top Sign in with Yahoo button.

License

This module is available under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.