Class: Google::Apis::YoutubeV3::SubscriptionSnippet

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 subscription, including title, description and thumbnails of the subscribed item.

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) ⇒ SubscriptionSnippet

Returns a new instance of SubscriptionSnippet



6656
6657
6658
# File 'generated/google/apis/youtube_v3/classes.rb', line 6656

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

Instance Attribute Details

#channel_idString

The ID that YouTube uses to uniquely identify the subscriber's channel. Corresponds to the JSON property channelId

Returns:

  • (String)


6623
6624
6625
# File 'generated/google/apis/youtube_v3/classes.rb', line 6623

def channel_id
  @channel_id
end

#channel_titleString

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

Returns:

  • (String)


6628
6629
6630
# File 'generated/google/apis/youtube_v3/classes.rb', line 6628

def channel_title
  @channel_title
end

#descriptionString

The subscription's details. Corresponds to the JSON property description

Returns:

  • (String)


6633
6634
6635
# File 'generated/google/apis/youtube_v3/classes.rb', line 6633

def description
  @description
end

#published_atDateTime

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

Returns:

  • (DateTime)


6639
6640
6641
# File 'generated/google/apis/youtube_v3/classes.rb', line 6639

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



6644
6645
6646
# File 'generated/google/apis/youtube_v3/classes.rb', line 6644

def resource_id
  @resource_id
end

#thumbnailsGoogle::Apis::YoutubeV3::ThumbnailDetails

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



6649
6650
6651
# File 'generated/google/apis/youtube_v3/classes.rb', line 6649

def thumbnails
  @thumbnails
end

#titleString

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

Returns:

  • (String)


6654
6655
6656
# File 'generated/google/apis/youtube_v3/classes.rb', line 6654

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6661
6662
6663
6664
6665
6666
6667
6668
6669
# File 'generated/google/apis/youtube_v3/classes.rb', line 6661

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)
  @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