Class: Statium::Opta::Resource::Match
- Inherits:
-
CommonResource
- Object
- CommonResource
- Statium::Opta::Resource::Match
- Defined in:
- lib/statium/opta/resource/match.rb
Instance Attribute Summary collapse
-
#page_number ⇒ Object
Returns the value of attribute page_number.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#tournament_calendar_uuid ⇒ Object
Returns the value of attribute tournament_calendar_uuid.
Instance Method Summary collapse
-
#initialize(tournament_calendar_uuid, page_number = 1, page_size = 500) ⇒ Match
constructor
A new instance of Match.
- #parse(response_body) ⇒ Object
- #uri(auth_key, lang = 'en') ⇒ Object
Methods inherited from CommonResource
#build_uri, #common_url_options
Constructor Details
#initialize(tournament_calendar_uuid, page_number = 1, page_size = 500) ⇒ Match
Returns a new instance of Match
9 10 11 12 13 |
# File 'lib/statium/opta/resource/match.rb', line 9 def initialize(tournament_calendar_uuid, page_number = 1, page_size = 500) @tournament_calendar_uuid = tournament_calendar_uuid @page_number = page_number @page_size = page_size end |
Instance Attribute Details
#page_number ⇒ Object
Returns the value of attribute page_number
6 7 8 |
# File 'lib/statium/opta/resource/match.rb', line 6 def page_number @page_number end |
#page_size ⇒ Object
Returns the value of attribute page_size
7 8 9 |
# File 'lib/statium/opta/resource/match.rb', line 7 def page_size @page_size end |
#tournament_calendar_uuid ⇒ Object
Returns the value of attribute tournament_calendar_uuid
5 6 7 |
# File 'lib/statium/opta/resource/match.rb', line 5 def tournament_calendar_uuid @tournament_calendar_uuid end |
Instance Method Details
#parse(response_body) ⇒ Object
25 26 27 |
# File 'lib/statium/opta/resource/match.rb', line 25 def parse response_body Statium::Opta::Model::Match.build response_body end |
#uri(auth_key, lang = 'en') ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/statium/opta/resource/match.rb', line 15 def uri(auth_key, lang = 'en') = { tmcl: @tournament_calendar_uuid, live: 'yes', lineups: 'yes', _pgSz: @page_size, } build_uri('match', auth_key, nil, (lang).merge()) end |