Class: Cricketer::API
Constant Summary collapse
- URL_BASE =
"http://www.espncricinfo.com/matches/engine/match"
Instance Method Summary collapse
Instance Method Details
#content ⇒ Object
15 16 17 |
# File 'lib/api.rb', line 15 def content @content ||= JSON.parse(open(url).read) end |
#url ⇒ Object
11 12 13 |
# File 'lib/api.rb', line 11 def url [URL_BASE, "#{ match_id }.json"].join("/") end |