Class: Infostrada::TeamRequest

Inherits:
BaseRequest show all
Defined in:
lib/infostrada/team_request.rb

Constant Summary collapse

URLS =
{
  list: '/GetTeamList'
}

Constants inherited from BaseRequest

BaseRequest::RETRIES

Class Method Summary collapse

Methods inherited from BaseRequest

get!

Class Method Details

.get_edition(edition_id) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/infostrada/team_request.rb', line 9

def self.get_edition(edition_id)
  list = get!(URLS[:list], query: { editionid: edition_id.to_i })

  list.map do |team_hash|
    Team.new(team_hash.merge('edition_id' => edition_id.to_i), '')
  end
end