API.fetchBookComments

This action allows you to get the comments of a publication.

Request

The API key must have the commons access right.
Name Type Description
apikey[required] string API public key
signature[required] string Signature of the request. See how to sign your requests.
expires timestamp UNIX timestamp for request expiration.
output string Format of the response. Either XML (default), JSON or PHP.
book_id[required] string ID of the publication.
order string String of characters used to define the organization criteria of the comments. Only Date is available for now.
way string String of characters used to define the sort order. Either UP (default) or DOWN.
start integer Start position of the range of comments. Default is 0.
step integer Number of comments to be sent from the start position (max: 50).

Response

Returns an array of comments:

Name Type Description
PosterID integer ID of the comment poster.
PosterName string Name of the comment poster.
PosterPublicUrl string Absolute URL for the comment poster’s page.
PosterThumbUrl string Absolute URL for the comment poster’s thumbnail.
Date date Date of the comment.
Text string Text of the comment.

Example responses

<response> <requestid>...</requestid> <requests>...</requests> <status>ok</status> <content> <total>...</total> <start>...</start> <step>...</step> <items> <item> <PosterID>...</PosterID> <PosterName>...</PosterName> <PosterPublicUrl>...</PosterPublicUrl> <PosterThumbUrl>...</PosterThumbUrl> <Date>...</Date> <Text>...</Text> </item> </items> </content> </response>
{ "response": { "requestid": ..., "requests": ..., "status": "ok", "content": { "total": ..., "start": ..., "step": ..., "items": [ { "PosterID": ..., "PosterName": ..., "PosterPublicUrl": ..., "PosterThumbUrl": ..., "Date": ..., "Text": ... } ] } } }
[ "response" => [ "requestid" => ..., "requests" => ..., "status" => "ok", "content" => [ "total" => ..., "start" => ..., "step" => ..., "items" => [ [ "PosterID" => ..., "PosterName" => ..., "PosterPublicUrl" => ..., "PosterThumbUrl" => ..., "Date" => ..., "Text" => ... ] ] ] ] ]

Error codes

See the error code section.