Sha256: 876c6afb1c9e7e0564e20d63b951d47aef6db79ec55ccbe0a6d32fb9e3a723e2

Contents?: true

Size: 1.37 KB

Versions: 127

Compression:

Stored size: 1.37 KB

Contents

# Sportradar Baseball

![API Reference](http://developer.sportradar.com/files/MLBv6SVG.svg)

*Currently, only MLB is supported.*

## MLB

Get started with official MLB api v6:

```ruby
mlb = Sportradar::Api::Baseball::Mlb::Hierarchy.new
res = mlb.get_daily_summary # => res is the raw response from Sportradar. `mlb` now has game summaries to interact with
res = mlb.get_hierarchy     # => res is the raw response from Sportradar. `mlb` now has leagues/divisions/teams to interact with
mlb.leagues.count           # => 2
mlb.divisions.count         # => 6
mlb.teams.count             # => 30
res = mlb.get_schedule      # => res is the raw response from Sportradar. `mlb` now has games to interact with
mlb.games.count             # => 2430 

game = mlb.games.sample     # => Sportradar::Api::Baseball::Game
data = game.get_pbp         # => data is raw response from Sportradar. `game` now has innings/half innings/atbats/pitches to interact with
game.innings.count          # => 10 (Sportradar has an inning #0, representing starting lineups)
game.half_innings.count     # => 20 (if the game went the full 9 innings)
data = game.get_summary     # => data is raw response from Sportradar. `game` now statistical information to interact with
game.count                  # `count` contains information about the current game state, such as balls/strikes to current batter, current inning, and outs
```

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
sportradar-api-0.11.28 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.27 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.26 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.25 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.24 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.23 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.22 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.21 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.20 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.19 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.18 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.17 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.16 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.15 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.14 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.13 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.12 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.11 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.10 lib/sportradar/api/baseball/README.md
sportradar-api-0.11.9 lib/sportradar/api/baseball/README.md