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](required) - The IDs of the teams. date: [String](optional) - A valid date (= YYYY-MM-DD). league: [Integer](optional) - The league ID. season: [Integer](optional) - The season year of the league (= YYYY). last: [Integer](optional) - For the X last fixtures. next: [Integer](optional) - For the X next fixtures. from: [String](optional) - A valid date (= YYYY-MM-DD). to: [String](optional) - A valid date (= YYYY-MM-DD). status: [String](optional) - One or more fixture status short [“NS”, “NS-PST-FT”]. venue: [Integer](optional) - The venue ID of the fixture. timezone: [String](optional) - 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