DataAPI SDK japanese MT.DataAPI Endpoint method createComment - movabletype/mt-data-api-sdk-js GitHub Wiki
コメントを新規作成します
POST https://your-host/your-mt-api.cgi/v1/sites/:site_id/entries/:entry_id/comments 詳細
| パラメータ名 | タイプ | 必須 | 説明 |
|---|---|---|---|
| siteId | Number | Object | Function | * | ブログID |
| entryId | Number | Object | Function | * | ブログ記事ID |
| commentData | Object | HTMLFormElement | * | 作成するコメントデータ |
| callback | Function |
XMLHttpRequest: XMLHttpRequestオブジェクト
api.createComment(siteId, entryId, commentData, function(response) {
if (response.error) {
// エラー処理
return;
}
// レスポンスデータを使った処理
});