Class: Statium::Opta::Resource::LiveMatch
- Inherits:
-
CommonResource
- Object
- CommonResource
- Statium::Opta::Resource::LiveMatch
- Defined in:
- lib/statium/opta/resource/live_match.rb
Instance Attribute Summary collapse
-
#tournament_calendar_uuid ⇒ Object
Returns the value of attribute tournament_calendar_uuid.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(tournament_calendar_uuid, page_number = 1, page_size = 500) ⇒ LiveMatch
constructor
A new instance of LiveMatch.
- #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) ⇒ LiveMatch
Returns a new instance of LiveMatch
7 8 9 10 11 |
# File 'lib/statium/opta/resource/live_match.rb', line 7 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
#tournament_calendar_uuid ⇒ Object
Returns the value of attribute tournament_calendar_uuid
5 6 7 |
# File 'lib/statium/opta/resource/live_match.rb', line 5 def tournament_calendar_uuid @tournament_calendar_uuid end |
Class Method Details
Instance Method Details
#parse(response_body) ⇒ Object
24 25 26 |
# File 'lib/statium/opta/resource/live_match.rb', line 24 def parse response_body self.class.parse response_body end |
#uri(auth_key, lang = 'en') ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/statium/opta/resource/live_match.rb', line 13 def uri(auth_key, lang = 'en') = { tmcl: @tournament_calendar_uuid, live: 'yes', lineups: 'yes', status: 'playing', _pgSz: @page_size, } build_uri('match', auth_key, nil, (lang).merge()) end |