Sha256: e39ffd17040e35163447c2542aead272e1d512ada15325b8b002acc9634db43c

Contents?: true

Size: 941 Bytes

Versions: 60

Compression:

Stored size: 941 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
      end

    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
sportradar-api-0.11.61 lib/sportradar/api/football/event.rb
sportradar-api-0.11.60 lib/sportradar/api/football/event.rb
sportradar-api-0.11.59 lib/sportradar/api/football/event.rb
sportradar-api-0.11.58 lib/sportradar/api/football/event.rb
sportradar-api-0.11.57 lib/sportradar/api/football/event.rb
sportradar-api-0.11.56 lib/sportradar/api/football/event.rb
sportradar-api-0.11.55 lib/sportradar/api/football/event.rb
sportradar-api-0.11.54 lib/sportradar/api/football/event.rb
sportradar-api-0.11.53 lib/sportradar/api/football/event.rb
sportradar-api-0.11.52 lib/sportradar/api/football/event.rb
sportradar-api-0.11.51 lib/sportradar/api/football/event.rb
sportradar-api-0.11.50 lib/sportradar/api/football/event.rb
sportradar-api-0.11.49 lib/sportradar/api/football/event.rb
sportradar-api-0.11.48 lib/sportradar/api/football/event.rb
sportradar-api-0.11.47 lib/sportradar/api/football/event.rb
sportradar-api-0.11.46 lib/sportradar/api/football/event.rb
sportradar-api-0.11.45 lib/sportradar/api/football/event.rb
sportradar-api-0.11.44 lib/sportradar/api/football/event.rb
sportradar-api-0.11.43 lib/sportradar/api/football/event.rb
sportradar-api-0.11.42 lib/sportradar/api/football/event.rb