Skip to content

DataAPI SDK japanese MT.DataAPI Endpoint method createComment

Taku AMANO edited this page Jul 5, 2013 · 8 revisions

createComment

Create a new comment.

POST https://your-host/your-mt-api.cgi/v1/sites/:site_id/entries/:entry_id/comments

パラメータ

パラメータ名 タイプ 必須 説明
siteId Number | Object | Function * Site ID
entryId Number | Object | Function * Entry ID
commentData Object | HTMLFormElement * A comment data
callback Function no

Returns

XMLHttpRequest: A XMLHttpRequest object

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

  // Do stuff
});
Clone this wiki locally