Skip to content

DataAPI SDK japanese MT.DataAPI Endpoint method listCommentsForEntry

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

listCommentsForEntry

指定したブログ記事のコメント一覧を取得します

GET 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
params Object オプション
callback Function

戻り値

XMLHttpRequest: XMLHttpRequestオブジェクト

api.listCommentsForEntry(siteId, entryId, function(response) {
  if (response.error) {
    // エラー処理
    return;
  }

  // レスポンスデータを使った処理
});

Or

var params = {
  fields: "date,body,parent"
};
api.listCommentsForEntry(siteId, entryId, params, function(response) {
  if (response.error) {
    // エラー処理
    return;
  }

  // レスポンスデータを使った処理
});
Clone this wiki locally