Class: SportsApi::Football::FixtureHeadToHeadResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/sports_api/football/resources/fixtures/fixture_head_to_head.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#get_request, #initialize

Constructor Details

This class inherits a constructor from SportsApi::Resource

Instance Method Details

#list(h2h:, **params) ⇒ Object

Arguments: h2h: String - The IDs of the teams. date: String - A valid date (= YYYY-MM-DD). league: Integer - The league ID. season: Integer - The season year of the league (= YYYY). last: Integer - For the X last fixtures. next: Integer - For the X next fixtures. from: String - A valid date (= YYYY-MM-DD). to: String - A valid date (= YYYY-MM-DD). status: String - One or more fixture status short ["NS", "NS-PST-FT"]. venue: Integer - The venue ID of the fixture. timezone: String - A valid timezone from the endpoint Timezone.



18
19
20
21
# File 'lib/sports_api/football/resources/fixtures/fixture_head_to_head.rb', line 18

def list(h2h:, **params)
  response = get_request('fixtures/headtohead', params: { h2h:, **params })
  Collection.from_response(response, type: SportsApi::Football::FixtureHeadToHead)
end