Created
December 6, 2013 15:35
-
-
Save corynissen/7826650 to your computer and use it in GitHub Desktop.
yahoo fantasy football API auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(httr) | |
| # saved my yahoo keys to a file, now, read them in... | |
| creds <- read.table("~/cn/personal/keys/yahoo.txt", stringsAsFactors=F) | |
| consumer.key <- creds[1,1] | |
| consumer.secret <- creds[2,1] | |
| token.url <- "https://api.login.yahoo.com/oauth/v2/" | |
| yahoo <- oauth_endpoint("get_request_token", "request_auth", "get_token", | |
| base_url = token.url) | |
| myapp <- oauth_app("yahoo", key = consumer.key, secret= consumer.secret) | |
| token <- oauth1.0_token(yahoo, myapp) | |
| sig <- sign_oauth1.0(myapp, token$oauth_token, token$oauth_token_secret) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment