Module: ESPN::Client::Notes
- Included in:
- ESPN::Client
- Defined in:
- lib/espn/client/notes.rb
Overview
Instance Method Summary collapse
-
#note(id, opts = {}) ⇒ Object
Public: Get a specific note from the ESPN developer API.
-
#notes(*args) ⇒ Object
Public: Get Exclusive factoids produced by ESPN’s Stats and Information Group from the ESPN API.
Instance Method Details
#note(id, opts = {}) ⇒ Object
Public: Get a specific note from the ESPN developer API.
id - The id of a specific note. opts - Hash options used to refine the selection. You can find a full
list of options on the ESPN developer API website (default: {}).
Returns a Hashie::Mash.
20 21 22 |
# File 'lib/espn/client/notes.rb', line 20 def note(id, opts={}) get("sports/news/notes/#{id}", opts).notes.first end |
#notes(*args) ⇒ Object
Public: Get Exclusive factoids produced by ESPN’s Stats and Information Group from the ESPN API.
sport - A Symbol or String of the sport (optional). league - A Symbol or String of the league. If a league is passed, but
not a sport, an attempt will be made to map the league to a
sport (required).
opts - Hash options used to refine the selection. If sport and/or
league are passed in, they will override the mapped values
You can find a full list of options on the ESPN developer API
website (default: {}).
Returns an Array of Hashie::Mash.
37 38 39 40 41 |
# File 'lib/espn/client/notes.rb', line 37 def notes(*args) arguments = ESPN::Arguments.new(args) pattern = "sports/:sport/:league/news/notes" get(pattern, arguments.).notes end |