Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
Google_Service_YouTube_Comments_Resource Class Reference

The "comments" collection of methods. More...

Inheritance diagram for Google_Service_YouTube_Comments_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 delete ($id, $optParams=array())
 Deletes a comment.
 
 insert ($part, Google_Service_YouTube_Comment $postBody, $optParams=array())
 Creates a reply to an existing comment.
 
 listComments ($part, $optParams=array())
 Returns a list of comments that match the API request parameters.
 
 markAsSpam ($id, $optParams=array())
 Expresses the caller's opinion that one or more comments should be flagged as spam.
 
 setModerationStatus ($id, $moderationStatus, $optParams=array())
 Sets the moderation status of one or more comments.
 
 update ($part, Google_Service_YouTube_Comment $postBody, $optParams=array())
 Modifies a comment.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "comments" collection of methods.

Typical usage is: $youtubeService = new Google_Service_YouTube(...); $comments = $youtubeService->comments;

Member Function Documentation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ delete()

Google_Service_YouTube_Comments_Resource::delete ( $id,
$optParams = array() )

Deletes a comment.

(comments.delete)

Parameters
string$idThe id parameter specifies the comment ID for the resource that is being deleted.
array$optParamsOptional parameters.

◆ insert()

Google_Service_YouTube_Comments_Resource::insert ( $part,
Google_Service_YouTube_Comment $postBody,
$optParams = array() )

Creates a reply to an existing comment.

Note: To create a top-level comment, use the commentThreads.insert method. (comments.insert)

Parameters
string$partThe 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.
Google_Comment$postBody
array$optParamsOptional parameters.
Return values
Google_Service_YouTube_Comment

◆ listComments()

Google_Service_YouTube_Comments_Resource::listComments ( $part,
$optParams = array() )

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

(comments.listComments)

Parameters
string$partThe part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include.
array$optParamsOptional parameters.

@opt_param string maxResults The maxResults parameter specifies the maximum number of items that should be returned in the result set.

Note: This parameter is not supported for use in conjunction with the id parameter. @opt_param string pageToken The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identifies the next page of the result that can be retrieved.

Note: This parameter is not supported for use in conjunction with the id parameter. @opt_param string parentId The parentId parameter specifies the ID of the comment for which replies should be retrieved.

Note: YouTube currently supports replies only for top-level comments. However, replies to replies may be supported in the future. @opt_param string textFormat This parameter indicates whether the API should return comments formatted as HTML or as plain text. @opt_param string id The id parameter specifies a comma-separated list of comment IDs for the resources that are being retrieved. In a comment resource, the id property specifies the comment's ID.

Return values
Google_Service_YouTube_CommentListResponse

◆ markAsSpam()

Google_Service_YouTube_Comments_Resource::markAsSpam ( $id,
$optParams = array() )

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

(comments.markAsSpam)

Parameters
string$idThe id parameter specifies a comma-separated list of IDs of comments that the caller believes should be classified as spam.
array$optParamsOptional parameters.

◆ setModerationStatus()

Google_Service_YouTube_Comments_Resource::setModerationStatus ( $id,
$moderationStatus,
$optParams = array() )

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. (comments.setModerationStatus)

Parameters
string$idThe id parameter specifies a comma-separated list of IDs that identify the comments for which you are updating the moderation status.
string$moderationStatusIdentifies the new moderation status of the specified comments.
array$optParamsOptional parameters.

@opt_param bool banAuthor The banAuthor parameter lets you indicate that you want to automatically reject any additional comments written by the comment's author. Set the parameter value to true to ban the author.

Note: This parameter is only valid if the moderationStatus parameter is also set to rejected.

◆ update()

Google_Service_YouTube_Comments_Resource::update ( $part,
Google_Service_YouTube_Comment $postBody,
$optParams = array() )

Modifies a comment.

(comments.update)

Parameters
string$partThe 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.
Google_Comment$postBody
array$optParamsOptional parameters.
Return values
Google_Service_YouTube_Comment

The documentation for this class was generated from the following file: