-
Couldn't load subscription status.
- Fork 5
DataAPI SDK english MT.DataAPI Endpoint method getComment
Taku AMANO edited this page Aug 28, 2013
·
2 revisions
Retrieve a comment.
GET https://your-host/your-mt-api.cgi/v1/sites/:site_id/comments/:comment_id Detail
| Name | Type | Required | Description |
|---|---|---|---|
| siteId | Number | Object | Function | yes | Site ID |
| commentId | Number | Object | Function | yes | Comment ID |
| params | Object | no | Options |
| callback | Function | no |
XMLHttpRequest: A XMLHttpRequest object
api.getComment(siteId, commentId, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});Or
api.getComment(siteId, commentId, {fields: "date,body,parent"}, function(response) {
if (response.error) {
// Handle error
return;
}
// Do stuff
});