Update the message of a comment.
12345
The ID of the comment.
id,type,name
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
Review completed!
The text of the comment to update
Returns the updated comment object.
An unexpected client error.
curl -X PUT https://api.box.com/2.0/comments/12345 \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json" '
-d '{
"message": "My New Message"
}'
var requestParams = new BoxCommentRequest()
{
Message = "New message"
};
BoxComment updatedComment = await client.CommentsManager.UpdateAsync(id: "11111", requestParams);
BoxComment comment = new BoxComment(api, "id");
comment.changeMessage("An edited message.");
edited_comment = client.comment(comment_id='98765').edit('If possible, please finish this by Friday!')
client.comments.update('11111', {message: 'New message'})
.then(comment => {
/* comment -> {
type: 'comment',
id: '11111',
is_reply_comment: false,
message: 'New message',
created_by:
{ type: 'user',
id: '22222',
name: 'Example User',
login: 'user@example.com' },
created_at: '2012-12-12T11:25:01-08:00',
item: { id: '33333', type: 'file' },
modified_at: '2012-12-12T11:25:01-08:00' }
*/
});
client.comments.update(
commentId: "55555",
message: "Updated message"
) { (result: Result<Comment, BoxSDKError>) in
guard case let .success(comment) = result else {
print("Error updating comment")
return
}
print("Comment message updated")
}