Class: NBA::VideoDetailsAssetEntry

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

Overview

Represents a video details asset entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aspect_ratioString

Returns the aspect ratio

Examples:

entry.aspect_ratio #=> "16:9"

Returns:

  • (String)

    the aspect ratio



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

attribute :aspect_ratio, Shale::Type::String

#file_sizeInteger

Returns the file size in bytes

Examples:

entry.file_size #=> 1024000

Returns:

  • (Integer)

    the file size in bytes



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

attribute :file_size, Shale::Type::Integer

#game_event_idInteger

Returns the game event ID

Examples:

entry.game_event_id #=> 1

Returns:

  • (Integer)

    the game event ID



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

attribute :game_event_id, Shale::Type::Integer

#game_idString

Returns the game ID

Examples:

entry.game_id #=> "0022300001"

Returns:

  • (String)

    the game ID



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

attribute :game_id, Shale::Type::String

#uuidString

Returns the unique identifier

Examples:

entry.uuid #=> "abc123def456"

Returns:

  • (String)

    the unique identifier



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

attribute :uuid, Shale::Type::String

#video_availableInteger

Returns the video availability flag

Examples:

entry.video_available #=> 1

Returns:

  • (Integer)

    the video availability flag



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

attribute :video_available, Shale::Type::Integer

#video_descriptionString

Returns the video description

Examples:

entry.video_description #=> "3PT Jump Shot by Player"

Returns:

  • (String)

    the video description



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

attribute :video_description, Shale::Type::String

#video_durationFloat

Returns the video duration in seconds

Examples:

entry.video_duration #=> 12.5

Returns:

  • (Float)

    the video duration in seconds



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

attribute :video_duration, Shale::Type::Float

#video_urlString

Returns the video URL

Examples:

entry.video_url #=> "https://videos.nba.com/video.mp4"

Returns:

  • (String)

    the video URL



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

attribute :video_url, Shale::Type::String

Instance Method Details

#available?Boolean

Returns whether video is available

Examples:

entry.available? #=> true

Returns:

  • (Boolean)

    true if video is available



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

def available?
  video_available.eql?(1)
end