Sha256: 894e8db4ca8e4ae9a69a2950d4447fe629ce45a8ab1ab3bd126c98678dfbf9bc

Contents?: true

Size: 630 Bytes

Versions: 1

Compression:

Stored size: 630 Bytes

Contents

module FootStats
  class RoundMatch < FootStats::Match
    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

    # Return the resource name to request to FootStats.
    #
    # @return [String]
    #
    def self.resource_name
      'ListaPartidasRodada'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foot_stats-0.1.0 lib/foot_stats/round_match.rb