Class: Google::Apis::YoutubeV3::PlaylistItemSnippet

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/google/apis/youtube_v3/representations.rb

Overview

Basic details about a playlist, including title, description and thumbnails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ PlaylistItemSnippet

Returns a new instance of PlaylistItemSnippet



5751
5752
5753
# File 'generated/google/apis/youtube_v3/classes.rb', line 5751

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#channel_idString

The ID that YouTube uses to uniquely identify the user that added the item to the playlist. Corresponds to the JSON property channelId

Returns:

  • (String)


5705
5706
5707
# File 'generated/google/apis/youtube_v3/classes.rb', line 5705

def channel_id
  @channel_id
end

#channel_titleString

Channel title for the channel that the playlist item belongs to. Corresponds to the JSON property channelTitle

Returns:

  • (String)


5710
5711
5712
# File 'generated/google/apis/youtube_v3/classes.rb', line 5710

def channel_title
  @channel_title
end

#descriptionString

The item's description. Corresponds to the JSON property description

Returns:

  • (String)


5715
5716
5717
# File 'generated/google/apis/youtube_v3/classes.rb', line 5715

def description
  @description
end

#playlist_idString

The ID that YouTube uses to uniquely identify the playlist that the playlist item is in. Corresponds to the JSON property playlistId

Returns:

  • (String)


5721
5722
5723
# File 'generated/google/apis/youtube_v3/classes.rb', line 5721

def playlist_id
  @playlist_id
end

#positionFixnum

The order in which the item appears in the playlist. The value uses a zero- based index, so the first item has a position of 0, the second item has a position of 1, and so forth. Corresponds to the JSON property position

Returns:

  • (Fixnum)


5728
5729
5730
# File 'generated/google/apis/youtube_v3/classes.rb', line 5728

def position
  @position
end

#published_atDateTime

The date and time that the item was added to the playlist. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. Corresponds to the JSON property publishedAt

Returns:

  • (DateTime)


5734
5735
5736
# File 'generated/google/apis/youtube_v3/classes.rb', line 5734

def published_at
  @published_at
end

#resource_idGoogle::Apis::YoutubeV3::ResourceId

A resource id is a generic reference that points to another YouTube resource. Corresponds to the JSON property resourceId



5739
5740
5741
# File 'generated/google/apis/youtube_v3/classes.rb', line 5739

def resource_id
  @resource_id
end

#thumbnailsGoogle::Apis::YoutubeV3::ThumbnailDetails

Internal representation of thumbnails for a YouTube resource. Corresponds to the JSON property thumbnails



5744
5745
5746
# File 'generated/google/apis/youtube_v3/classes.rb', line 5744

def thumbnails
  @thumbnails
end

#titleString

The item's title. Corresponds to the JSON property title

Returns:

  • (String)


5749
5750
5751
# File 'generated/google/apis/youtube_v3/classes.rb', line 5749

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
# File 'generated/google/apis/youtube_v3/classes.rb', line 5756

def update!(**args)
  @channel_id = args[:channel_id] if args.key?(:channel_id)
  @channel_title = args[:channel_title] if args.key?(:channel_title)
  @description = args[:description] if args.key?(:description)
  @playlist_id = args[:playlist_id] if args.key?(:playlist_id)
  @position = args[:position] if args.key?(:position)
  @published_at = args[:published_at] if args.key?(:published_at)
  @resource_id = args[:resource_id] if args.key?(:resource_id)
  @thumbnails = args[:thumbnails] if args.key?(:thumbnails)
  @title = args[:title] if args.key?(:title)
end