Class: NBA::VideoEventAsset

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

Overview

Represents a video event asset with additional asset information

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aspect_ratioString

Returns the video aspect ratio

Examples:

asset.aspect_ratio #=> "16:9"

Returns:

  • (String)

    the aspect ratio



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

attribute :aspect_ratio, Shale::Type::String

#file_sizeInteger

Returns the file size in bytes

Examples:

asset.file_size #=> 1024000

Returns:

  • (Integer)

    the file size



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

attribute :file_size, Shale::Type::Integer

#game_event_idInteger

Returns the game event ID

Examples:

asset.game_event_id #=> 1

Returns:

  • (Integer)

    the game event ID



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

attribute :game_event_id, Shale::Type::Integer

#game_idString

Returns the game ID

Examples:

asset.game_id #=> "0022300001"

Returns:

  • (String)

    the game ID



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

attribute :game_id, Shale::Type::String

#uuidString

Returns the unique identifier

Examples:

asset.uuid #=> "abc123"

Returns:

  • (String)

    the unique identifier



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

attribute :uuid, Shale::Type::String

#video_availableInteger

Returns the video availability flag

Examples:

asset.video_available #=> 1

Returns:

  • (Integer)

    the video availability flag



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

attribute :video_available, Shale::Type::Integer

#video_descriptionString

Returns the video description

Examples:

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

Returns:

  • (String)

    the video description



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

attribute :video_description, Shale::Type::String

#video_durationInteger

Returns the video duration in seconds

Examples:

asset.video_duration #=> 15

Returns:

  • (Integer)

    the video duration



79
# File 'lib/nba/video_event_asset.rb', line 79

attribute :video_duration, Shale::Type::Integer

#video_urlString

Returns the video URL

Examples:

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

Returns:

  • (String)

    the video URL



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

attribute :video_url, Shale::Type::String

Instance Method Details

#video_available?Boolean

Returns whether video is available

Examples:

asset.video_available? #=> true

Returns:

  • (Boolean)

    true if video is available



87
88
89
# File 'lib/nba/video_event_asset.rb', line 87

def video_available?
  video_available.eql?(1)
end