Class: Cricketer::API

Inherits:
Object
  • Object
show all
Extended by:
FastAttributes
Defined in:
lib/api.rb

Constant Summary collapse

URL_BASE =
"http://www.espncricinfo.com/matches/engine/match"

Instance Method Summary collapse

Instance Method Details

#contentObject



15
16
17
# File 'lib/api.rb', line 15

def content
  @content ||= JSON.parse(open(url).read)
end

#urlObject



11
12
13
# File 'lib/api.rb', line 11

def url
  [URL_BASE, "#{ match_id }.json"].join("/")
end