Class: FootStats::RoundMatch

Inherits:
Match show all
Defined in:
lib/foot_stats/round_match.rb

Class Method Summary collapse

Methods inherited from Match

#live, #live=, #live?, #narrations, parse_response, resource_key

Methods inherited from Resource

#initialize, parse_response, resource_key, updated_response

Methods included from AttributeAccessor

#attributes, included

Constructor Details

This class inherits a constructor from FootStats::Resource

Class Method Details

.all(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/foot_stats/round_match.rb', line 3

def self.all(options={})
  championship_id = options.fetch(:championship)
  round           = options.fetch(:round)

  request  = Request.new self, :Campeonato => championship_id, :Rodada => round
  response = request.parse stream_key: "championship-#{championship_id}-round-matches-#{round}"

  return response.error if response.error?

  updated_response response, options
end

.resource_nameString

Return the resource name to request to FootStats.

Returns:

  • (String)


19
20
21
# File 'lib/foot_stats/round_match.rb', line 19

def self.resource_name
  'ListaPartidasRodada'
end