Class: Google::Apis::YoutubeV3::CommentSnippet
- Inherits:
-
Object
- Object
- Google::Apis::YoutubeV3::CommentSnippet
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/youtube_v3/classes.rb,
lib/google/apis/youtube_v3/representations.rb,
lib/google/apis/youtube_v3/representations.rb
Overview
Basic details about a comment, such as its author and text.
Instance Attribute Summary collapse
-
#author_channel_id ⇒ Google::Apis::YoutubeV3::CommentSnippetAuthorChannelId
Contains the id of the author's YouTube channel, if any.
-
#author_channel_url ⇒ String
Link to the author's YouTube channel, if any.
-
#author_display_name ⇒ String
The name of the user who posted the comment.
-
#author_profile_image_url ⇒ String
The URL for the avatar of the user who posted the comment.
-
#can_rate ⇒ Boolean
(also: #can_rate?)
Whether the current viewer can rate this comment.
-
#channel_id ⇒ String
The id of the corresponding YouTube channel.
-
#like_count ⇒ Fixnum
The total number of likes this comment has received.
-
#moderation_status ⇒ String
The comment's moderation status.
-
#parent_id ⇒ String
The unique id of the top-level comment, only set for replies.
-
#post_id ⇒ String
The ID of the post the comment refers to, if any.
-
#published_at ⇒ DateTime
The date and time when the comment was originally published.
-
#text_display ⇒ String
The comment's text.
-
#text_original ⇒ String
The comment's original raw text as initially posted or last updated.
-
#updated_at ⇒ DateTime
The date and time when the comment was last updated.
-
#video_id ⇒ String
The ID of the video the comment refers to, if any.
-
#viewer_rating ⇒ String
The rating the viewer has given to this comment.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CommentSnippet
constructor
A new instance of CommentSnippet.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CommentSnippet
Returns a new instance of CommentSnippet.
2429 2430 2431 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2429 def initialize(**args) update!(**args) end |
Instance Attribute Details
#author_channel_id ⇒ Google::Apis::YoutubeV3::CommentSnippetAuthorChannelId
Contains the id of the author's YouTube channel, if any.
Corresponds to the JSON property authorChannelId
2341 2342 2343 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2341 def @author_channel_id end |
#author_channel_url ⇒ String
Link to the author's YouTube channel, if any.
Corresponds to the JSON property authorChannelUrl
2346 2347 2348 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2346 def @author_channel_url end |
#author_display_name ⇒ String
The name of the user who posted the comment.
Corresponds to the JSON property authorDisplayName
2351 2352 2353 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2351 def @author_display_name end |
#author_profile_image_url ⇒ String
The URL for the avatar of the user who posted the comment.
Corresponds to the JSON property authorProfileImageUrl
2356 2357 2358 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2356 def @author_profile_image_url end |
#can_rate ⇒ Boolean Also known as: can_rate?
Whether the current viewer can rate this comment.
Corresponds to the JSON property canRate
2361 2362 2363 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2361 def can_rate @can_rate end |
#channel_id ⇒ String
The id of the corresponding YouTube channel. In case of a channel comment this
is the channel the comment refers to. In case of a video or post comment it's
the video/post's channel.
Corresponds to the JSON property channelId
2369 2370 2371 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2369 def channel_id @channel_id end |
#like_count ⇒ Fixnum
The total number of likes this comment has received.
Corresponds to the JSON property likeCount
2374 2375 2376 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2374 def like_count @like_count end |
#moderation_status ⇒ String
The comment's moderation status. Will not be set if the comments were
requested through the id filter.
Corresponds to the JSON property moderationStatus
2380 2381 2382 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2380 def moderation_status @moderation_status end |
#parent_id ⇒ String
The unique id of the top-level comment, only set for replies.
Corresponds to the JSON property parentId
2385 2386 2387 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2385 def parent_id @parent_id end |
#post_id ⇒ String
The ID of the post the comment refers to, if any.
Corresponds to the JSON property postId
2390 2391 2392 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2390 def post_id @post_id end |
#published_at ⇒ DateTime
The date and time when the comment was originally published.
Corresponds to the JSON property publishedAt
2395 2396 2397 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2395 def published_at @published_at end |
#text_display ⇒ String
The comment's text. The format is either plain text or HTML dependent on what
has been requested. Even the plain text representation may differ from the
text originally posted in that it may replace video links with video titles
etc.
Corresponds to the JSON property textDisplay
2403 2404 2405 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2403 def text_display @text_display end |
#text_original ⇒ String
The comment's original raw text as initially posted or last updated. The
original text will only be returned if it is accessible to the viewer, which
is only guaranteed if the viewer is the comment's author.
Corresponds to the JSON property textOriginal
2410 2411 2412 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2410 def text_original @text_original end |
#updated_at ⇒ DateTime
The date and time when the comment was last updated.
Corresponds to the JSON property updatedAt
2415 2416 2417 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2415 def updated_at @updated_at end |
#video_id ⇒ String
The ID of the video the comment refers to, if any.
Corresponds to the JSON property videoId
2420 2421 2422 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2420 def video_id @video_id end |
#viewer_rating ⇒ String
The rating the viewer has given to this comment. For the time being this will
never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may
change in the future.
Corresponds to the JSON property viewerRating
2427 2428 2429 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2427 def @viewer_rating end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 2434 def update!(**args) @author_channel_id = args[:author_channel_id] if args.key?(:author_channel_id) @author_channel_url = args[:author_channel_url] if args.key?(:author_channel_url) @author_display_name = args[:author_display_name] if args.key?(:author_display_name) @author_profile_image_url = args[:author_profile_image_url] if args.key?(:author_profile_image_url) @can_rate = args[:can_rate] if args.key?(:can_rate) @channel_id = args[:channel_id] if args.key?(:channel_id) @like_count = args[:like_count] if args.key?(:like_count) @moderation_status = args[:moderation_status] if args.key?(:moderation_status) @parent_id = args[:parent_id] if args.key?(:parent_id) @post_id = args[:post_id] if args.key?(:post_id) @published_at = args[:published_at] if args.key?(:published_at) @text_display = args[:text_display] if args.key?(:text_display) @text_original = args[:text_original] if args.key?(:text_original) @updated_at = args[:updated_at] if args.key?(:updated_at) @video_id = args[:video_id] if args.key?(:video_id) @viewer_rating = args[:viewer_rating] if args.key?(:viewer_rating) end |