Sha256: 325cf986b459232068236e95f30d3017a4f10bd1ed901f948c7f7dc03304c875

Contents?: true

Size: 991 Bytes

Versions: 67

Compression:

Stored size: 991 Bytes

Contents

module Sportradar
  module Api
    module Football
      class Event < Data
        attr_accessor :response, :id, :sequence, :reference, :clock, :type, :event_type, :description, :alt_description

        def initialize(data, **opts)
          @response         = data
          @id               = data["id"]
          update(data, **opts)
        end
        def update(data, **opts)
          @sequence         = data["sequence"]
          @reference        = data["reference"]
          @clock            = data["clock"]
          @type             = data["type"]
          @event_type       = data["event_type"]
          @description      = data["description"] || data["summary"]
          @alt_description  = data["alt_description"]

          self
        end
        def plays
          []
        end
        def events
          [self]
        end
        def over?
          false # TODO
        end
        def halftime?
          false
        end
      end

    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/football/event.rb
sportradar-api-0.20.1 lib/sportradar/api/football/event.rb
sportradar-api-0.20.0 lib/sportradar/api/football/event.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/football/event.rb
sportradar-api-0.20.0.pre lib/sportradar/api/football/event.rb
sportradar-api-0.19.6 lib/sportradar/api/football/event.rb
sportradar-api-0.19.5 lib/sportradar/api/football/event.rb
sportradar-api-0.19.4 lib/sportradar/api/football/event.rb
sportradar-api-0.19.3 lib/sportradar/api/football/event.rb
sportradar-api-0.19.2 lib/sportradar/api/football/event.rb
sportradar-api-0.19.1 lib/sportradar/api/football/event.rb
sportradar-api-0.19.0 lib/sportradar/api/football/event.rb
sportradar-api-0.18.1 lib/sportradar/api/football/event.rb
sportradar-api-0.18.0 lib/sportradar/api/football/event.rb
sportradar-api-0.17.6 lib/sportradar/api/football/event.rb
sportradar-api-0.17.5 lib/sportradar/api/football/event.rb
sportradar-api-0.17.5.pre lib/sportradar/api/football/event.rb
sportradar-api-0.17.4 lib/sportradar/api/football/event.rb
sportradar-api-0.17.3 lib/sportradar/api/football/event.rb
sportradar-api-0.17.2 lib/sportradar/api/football/event.rb