Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
The "comments" collection of methods. More...
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) | |
The "comments" collection of methods.
Typical usage is: $youtubeService = new Google_Service_YouTube(...); $comments = $youtubeService->comments;
|
inherited |
TODO: This function needs simplifying.
$name | |
$arguments | |
$expected_class | - optional, the expected class name |
Google_Http_Request|expected_class |
Google_Exception |
Google_Service_YouTube_Comments_Resource::delete | ( | $id, | |
$optParams = array() ) |
Deletes a comment.
(comments.delete)
string | $id | The id parameter specifies the comment ID for the resource that is being deleted. |
array | $optParams | Optional parameters. |
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)
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. |
Google_Comment | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_YouTube_Comment |
Google_Service_YouTube_Comments_Resource::listComments | ( | $part, | |
$optParams = array() ) |
Returns a list of comments that match the API request parameters.
(comments.listComments)
string | $part | The part parameter specifies a comma-separated list of one or more comment resource properties that the API response will include. |
array | $optParams | Optional 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.
Google_Service_YouTube_CommentListResponse |
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)
string | $id | The id parameter specifies a comma-separated list of IDs of comments that the caller believes should be classified as spam. |
array | $optParams | Optional parameters. |
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)
string | $id | The id parameter specifies a comma-separated list of IDs that identify the comments for which you are updating the moderation status. |
string | $moderationStatus | Identifies the new moderation status of the specified comments. |
array | $optParams | Optional 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.
Google_Service_YouTube_Comments_Resource::update | ( | $part, | |
Google_Service_YouTube_Comment | $postBody, | ||
$optParams = array() ) |
Modifies a comment.
(comments.update)
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. |
Google_Comment | $postBody | |
array | $optParams | Optional parameters. |
Google_Service_YouTube_Comment |