Class: Google::Apis::YoutubeV3::CommentSnippet

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 comment, such as its author and text.

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

Returns a new instance of CommentSnippet.


2216
2217
2218
# File 'generated/google/apis/youtube_v3/classes.rb', line 2216

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

Instance Attribute Details

#author_channel_idGoogle::Apis::YoutubeV3::CommentSnippetAuthorChannelId

The id of the author's YouTube channel, if any. Corresponds to the JSON property authorChannelId


2131
2132
2133
# File 'generated/google/apis/youtube_v3/classes.rb', line 2131

def author_channel_id
  @author_channel_id
end

#author_channel_urlString

Link to the author's YouTube channel, if any. Corresponds to the JSON property authorChannelUrl

Returns:

  • (String)

2136
2137
2138
# File 'generated/google/apis/youtube_v3/classes.rb', line 2136

def author_channel_url
  @author_channel_url
end

#author_display_nameString

The name of the user who posted the comment. Corresponds to the JSON property authorDisplayName

Returns:

  • (String)

2141
2142
2143
# File 'generated/google/apis/youtube_v3/classes.rb', line 2141

def author_display_name
  @author_display_name
end

#author_profile_image_urlString

The URL for the avatar of the user who posted the comment. Corresponds to the JSON property authorProfileImageUrl

Returns:

  • (String)

2146
2147
2148
# File 'generated/google/apis/youtube_v3/classes.rb', line 2146

def author_profile_image_url
  @author_profile_image_url
end

#can_rateBoolean Also known as: can_rate?

Whether the current viewer can rate this comment. Corresponds to the JSON property canRate

Returns:

  • (Boolean)

2151
2152
2153
# File 'generated/google/apis/youtube_v3/classes.rb', line 2151

def can_rate
  @can_rate
end

#channel_idString

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 comment it's the video's channel. Corresponds to the JSON property channelId

Returns:

  • (String)

2159
2160
2161
# File 'generated/google/apis/youtube_v3/classes.rb', line 2159

def channel_id
  @channel_id
end

#like_countFixnum

The total number of likes this comment has received. Corresponds to the JSON property likeCount

Returns:

  • (Fixnum)

2164
2165
2166
# File 'generated/google/apis/youtube_v3/classes.rb', line 2164

def like_count
  @like_count
end

#moderation_statusString

The comment's moderation status. Will not be set if the comments were requested through the id filter. Corresponds to the JSON property moderationStatus

Returns:

  • (String)

2170
2171
2172
# File 'generated/google/apis/youtube_v3/classes.rb', line 2170

def moderation_status
  @moderation_status
end

#parent_idString

The unique id of the parent comment, only set for replies. Corresponds to the JSON property parentId

Returns:

  • (String)

2175
2176
2177
# File 'generated/google/apis/youtube_v3/classes.rb', line 2175

def parent_id
  @parent_id
end

#published_atString

The date and time when the comment was orignally published. The value is specified in ISO 8601 format. Corresponds to the JSON property publishedAt

Returns:

  • (String)

2181
2182
2183
# File 'generated/google/apis/youtube_v3/classes.rb', line 2181

def published_at
  @published_at
end

#text_displayString

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

Returns:

  • (String)

2189
2190
2191
# File 'generated/google/apis/youtube_v3/classes.rb', line 2189

def text_display
  @text_display
end

#text_originalString

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

Returns:

  • (String)

2196
2197
2198
# File 'generated/google/apis/youtube_v3/classes.rb', line 2196

def text_original
  @text_original
end

#updated_atString

The date and time when was last updated . The value is specified in ISO 8601 format. Corresponds to the JSON property updatedAt

Returns:

  • (String)

2202
2203
2204
# File 'generated/google/apis/youtube_v3/classes.rb', line 2202

def updated_at
  @updated_at
end

#video_idString

The ID of the video the comment refers to, if any. Corresponds to the JSON property videoId

Returns:

  • (String)

2207
2208
2209
# File 'generated/google/apis/youtube_v3/classes.rb', line 2207

def video_id
  @video_id
end

#viewer_ratingString

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

Returns:

  • (String)

2214
2215
2216
# File 'generated/google/apis/youtube_v3/classes.rb', line 2214

def viewer_rating
  @viewer_rating
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
# File 'generated/google/apis/youtube_v3/classes.rb', line 2221

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