Skip to content

DataAPI SDK english MT.DataAPI Endpoint method updateComment

Taku AMANO edited this page Aug 28, 2013 · 2 revisions

updateComment

Update a comment.

PUT https://your-host/your-mt-api.cgi/v1/sites/:site_id/comments/:comment_id Detail

Parameters

Name Type Required Description
siteId Number | Object | Function yes Site ID
commentId Number | Object | Function yes Comment ID
commentData Object | HTMLFormElement yes A comment data
callback Function no

Returns

XMLHttpRequest: A XMLHttpRequest object

Example

api.updateComment(siteId, commentId, commentData, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});
Clone this wiki locally