Skip to content

Instantly share code, notes, and snippets.

View mhagerty's full-sized avatar

Mike Hagerty mhagerty

View GitHub Profile
@mhagerty
mhagerty / yahooOauth
Created December 5, 2012 19:39
A sample Ruby script utilizing Mechanize to navigate Oauth authentication for Yahoo Sports API
# Author: Mike Hagerty, 11/28/2012
# The purpose of this script is to pull data from the Yahoo Sports API. I tried to document the steps as thoroughly as possible, as I had a
# tough time navigating this process
# Yahoo Sports requires Oauth authentication for personal team-related data. This requirement complicates the automation of pulling data, as Oauth in general requires user interaction to complete the authentication process.
# Mechanize is used to automate the user interaction steps required to authenticated via Oauth.
# This script also has example code for storing the data in a mongodb at the end
#!/usr/bin/ruby