Project

mlb_gd2

0.0
No commit activity in last 3 years
No release in over 3 years
A simple wrapper for MLB's GD2 API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 1.6
 Project Readme

MLB Gameday API

This is a Ruby wrapper for the MLB Gameday API.

Installation

$ gem install 'mlb_gd2'

Usage

To get an array of Games for a specific day:

require 'mlb_gd2'
gd = Gameday.new(2015, 10, 13)

To get a specific game given a team name:

game = gd.game_from_team("Cubs")

To get specific teams out of a game:

cubs = game.home_team
cards = game.away_team

To get batters/pitchers out of a team:

batters = cubs.batters
pitchers = cubs.pitchers

Check out the documentation for more methods and functionality.