Class: MLB::Highlight

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/mlb/game_content.rb

Overview

Represents a game highlight

Instance Attribute Summary collapse

Instance Attribute Details

#descriptionString

Returns the description

Examples:

highlight.description #=> "Player crushes a 3-run homer"

Returns:

  • (String)

    the description



128
# File 'lib/mlb/game_content.rb', line 128

attribute :description, Shale::Type::String

#durationString

Returns the duration in seconds

Examples:

highlight.duration #=> "00:00:45"

Returns:

  • (String)

    the duration



136
# File 'lib/mlb/game_content.rb', line 136

attribute :duration, Shale::Type::String

#headlineString

Returns the headline

Examples:

highlight.headline #=> "Player hits home run"

Returns:

  • (String)

    the headline



120
# File 'lib/mlb/game_content.rb', line 120

attribute :headline, Shale::Type::String

#idString

Returns the highlight ID

Examples:

highlight.id #=> "12345"

Returns:

  • (String)

    the ID



104
# File 'lib/mlb/game_content.rb', line 104

attribute :id, Shale::Type::String

#imageMediaImage

Returns the thumbnail image

Examples:

highlight.image #=> #<MLB::MediaImage>

Returns:



152
# File 'lib/mlb/game_content.rb', line 152

attribute :image, MediaImage

#playbacksArray<MediaPlayback>

Returns the playback options

Examples:

highlight.playbacks #=> [#<MLB::MediaPlayback>, ...]

Returns:



144
# File 'lib/mlb/game_content.rb', line 144

attribute :playbacks, MediaPlayback, collection: true

#typeString

Returns the content type

Examples:

highlight.type #=> "video"

Returns:

  • (String)

    the type



112
# File 'lib/mlb/game_content.rb', line 112

attribute :type, Shale::Type::String