Show / Hide Table of Contents

Class CommentsResource

The "comments" collection of methods.

Inheritance
System.Object
CommentsResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.YouTube.v3
Assembly: Google.Apis.YouTube.v3.dll
Syntax
public class CommentsResource

Constructors

CommentsResource(IClientService)

Constructs a new resource.

Declaration
public CommentsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Delete(String)

Deletes a comment.

Declaration
public virtual CommentsResource.DeleteRequest Delete(string id)
Parameters
Type Name Description
System.String id

The id parameter specifies the comment ID for the resource that is being deleted.

Returns
Type Description
CommentsResource.DeleteRequest

Insert(Comment, String)

Creates a reply to an existing comment. Note: To create a top-level comment, use the commentThreads.insert method.

Declaration
public virtual CommentsResource.InsertRequest Insert(Comment body, string part)
Parameters
Type Name Description
Comment body

The body of the request.

System.String part

The part parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units.

Returns
Type Description
CommentsResource.InsertRequest

List(String)

Returns a list of comments that match the API request parameters.

Declaration
public virtual CommentsResource.ListRequest List(string part)
Parameters
Type Name Description
System.String part

The part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include.

Returns
Type Description
CommentsResource.ListRequest

MarkAsSpam(String)

Expresses the caller's opinion that one or more comments should be flagged as spam.

Declaration
public virtual CommentsResource.MarkAsSpamRequest MarkAsSpam(string id)
Parameters
Type Name Description
System.String id

The id parameter specifies a comma-separated list of IDs of comments that the caller believes should be classified as spam.

Returns
Type Description
CommentsResource.MarkAsSpamRequest

SetModerationStatus(String, CommentsResource.SetModerationStatusRequest.ModerationStatusEnum)

Sets the moderation status of one or more comments. The API request must be authorized by the owner of the channel or video associated with the comments.

Declaration
public virtual CommentsResource.SetModerationStatusRequest SetModerationStatus(string id, CommentsResource.SetModerationStatusRequest.ModerationStatusEnum moderationStatus)
Parameters
Type Name Description
System.String id

The id parameter specifies a comma-separated list of IDs that identify the comments for which you are updating the moderation status.

CommentsResource.SetModerationStatusRequest.ModerationStatusEnum moderationStatus

Identifies the new moderation status of the specified comments.

Returns
Type Description
CommentsResource.SetModerationStatusRequest

Update(Comment, String)

Modifies a comment.

Declaration
public virtual CommentsResource.UpdateRequest Update(Comment body, string part)
Parameters
Type Name Description
Comment body

The body of the request.

System.String part

The part parameter identifies the properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update.

Returns
Type Description
CommentsResource.UpdateRequest
Back to top