Class: Google::Apis::YoutubeV3::Subscription

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

A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.

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

Returns a new instance of Subscription.



6782
6783
6784
# File 'generated/google/apis/youtube_v3/classes.rb', line 6782

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

Instance Attribute Details

#content_detailsGoogle::Apis::YoutubeV3::SubscriptionContentDetails

Details about the content to witch a subscription refers. Corresponds to the JSON property contentDetails



6752
6753
6754
# File 'generated/google/apis/youtube_v3/classes.rb', line 6752

def content_details
  @content_details
end

#etagString

Etag of this resource. Corresponds to the JSON property etag

Returns:

  • (String)


6757
6758
6759
# File 'generated/google/apis/youtube_v3/classes.rb', line 6757

def etag
  @etag
end

#idString

The ID that YouTube uses to uniquely identify the subscription. Corresponds to the JSON property id

Returns:

  • (String)


6762
6763
6764
# File 'generated/google/apis/youtube_v3/classes.rb', line 6762

def id
  @id
end

#kindString

Identifies what kind of resource this is. Value: the fixed string "youtube# subscription". Corresponds to the JSON property kind

Returns:

  • (String)


6768
6769
6770
# File 'generated/google/apis/youtube_v3/classes.rb', line 6768

def kind
  @kind
end

#snippetGoogle::Apis::YoutubeV3::SubscriptionSnippet

Basic details about a subscription, including title, description and thumbnails of the subscribed item. Corresponds to the JSON property snippet



6774
6775
6776
# File 'generated/google/apis/youtube_v3/classes.rb', line 6774

def snippet
  @snippet
end

#subscriber_snippetGoogle::Apis::YoutubeV3::SubscriptionSubscriberSnippet

Basic details about a subscription's subscriber including title, description, channel ID and thumbnails. Corresponds to the JSON property subscriberSnippet



6780
6781
6782
# File 'generated/google/apis/youtube_v3/classes.rb', line 6780

def subscriber_snippet
  @subscriber_snippet
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6787
6788
6789
6790
6791
6792
6793
6794
# File 'generated/google/apis/youtube_v3/classes.rb', line 6787

def update!(**args)
  @content_details = args[:content_details] if args.key?(:content_details)
  @etag = args[:etag] if args.key?(:etag)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @snippet = args[:snippet] if args.key?(:snippet)
  @subscriber_snippet = args[:subscriber_snippet] if args.key?(:subscriber_snippet)
end