Class: NBA::VideoEvent

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/nba/video_event.rb

Overview

Represents a video event

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#game_event_idInteger

Returns the game event ID

Examples:

event.game_event_id #=> 1


23
# File 'lib/nba/video_event.rb', line 23

attribute :game_event_id, Shale::Type::Integer

#game_idString

Returns the game ID

Examples:

event.game_id #=> "0022300001"


15
# File 'lib/nba/video_event.rb', line 15

attribute :game_id, Shale::Type::String

#titleString

Returns the video title

Examples:

event.title #=> "Curry 3PT"


71
# File 'lib/nba/video_event.rb', line 71

attribute :title, Shale::Type::String

#uuidString

Returns the unique identifier

Examples:

event.uuid #=> "abc123"


63
# File 'lib/nba/video_event.rb', line 63

attribute :uuid, Shale::Type::String

#video_availableInteger

Returns the video availability flag

Examples:

event.video_available #=> 1


31
# File 'lib/nba/video_event.rb', line 31

attribute :video_available, Shale::Type::Integer

#video_categoryString

Returns the video category

Examples:

event.video_category #=> "Made Shot"


55
# File 'lib/nba/video_event.rb', line 55

attribute :video_category, Shale::Type::String

#video_descriptionString

Returns the video description

Examples:

event.video_description #=> "Curry makes 3-pt jump shot"


47
# File 'lib/nba/video_event.rb', line 47

attribute :video_description, Shale::Type::String

#video_urlString

Returns the video URL

Examples:

event.video_url #=> "https://videos.nba.com/..."


39
# File 'lib/nba/video_event.rb', line 39

attribute :video_url, Shale::Type::String

Instance Method Details

#video_available?Boolean

Returns whether video is available

Examples:

event.video_available? #=> true


79
80
81
# File 'lib/nba/video_event.rb', line 79

def video_available?
  video_available.eql?(1)
end