The method retrieves the comments in a specified comments stream. The comments that are retrieved are approved comments as well as ones that have approved replies.
us1.gigya.com- For the US data center.
eu1- For the European data center.
au1- For the Australian data center.
ru1- For the Russian data center.
cn1- For the Chinese data center.
If you are not sure of your site's data center, see Finding Your Data Center.
|||categoryID||string||The identifier of the comments category from which to retrieve the comments.|
|||streamID||string||The identifier of the comments stream from which to retrieve the comments.|
|||dataFormat||string||The format of the response. The valid values are 'html' and 'json'.|
|||includeNote||Boolean||Indicates whether to add the note custom object to the response. Only moderators will be able to use this parameter to receive the note in the response.|
|||includeUID||Boolean||Indicates whether the UID of the commenter will be included in the returned object per comment. The default value is 'false'.|
|||includeUserComments||Boolean||Indicates whether all the comments posted by the user to this stream will be included in the returned response. In reviews mode the default value of this parameter is true, in comments mode the default is false.|
|||includeUserHighlighting||Boolean||Indicates whether the user highlighting groups of the logged-in user will be included in the returned response. The default value is 'false'.|
|||includeUserOptions||Boolean||This parameter specifies whether to include a user options object in the response. The default is 'false'. When set to 'true' the response to the method will include the UserOptions object.|
|||includeStreamInfo||Boolean||This parameter specifies whether to include a stream information object in the response. The default is 'false . When set to 'true' the response to the method will include the StreamInfo object.|
|||lang||string||The language to which comment placeholder texts, such as "This comment has been deleted", should be translated. If this parameter is not passed, the language for translation is detected automatically based on the language in which the other comments are written.|
|||markupType||string||The 'markupType' parameter is only valid when 'dataFormat' is set to 'html'.|
When dataFormat is set to HTML, the response is designed support microformat for web reviews.
Accepted values are:
For more information go the the microformat section
|||pinnedCommentID||string||A comment ID from the stream specified by streamID. This parameter will assure that the comment thread will be included in the response, at the beginning of the comments array, followed by the other comments in natural order. |
Note: the pinned comment thread is not counted by the threadLimit.
|||sort||string||The comments may be sorted in one of the following orders:|
|||start||string||Defines the starting point of the comments to retrieve. The purpose of this parameter is pagination of the comments. Use the threadLimit parameter to define the number of comments returned per page. For the first page don't set the start parameter. The response includes a next field, which is a pointer to the starting point of the next page. Set the start parameter with the value of the next field received in the response of the previous getComments request.|
|||tags||array||This parameter is a strings array representing a list of tags, e.g.: ["tag_a","tag_b"]. The tags are used to filter comments. Only comments that match the tags are retrieved.|
|||threadDepth||integer||The maximum depth of replies per comments thread to retrieve.|
Note: With pinnedCommentID, if the pinned thread is bigger than the limit, it will not be returned even though pinned.
|||threaded||Boolean||Indicates whether the comments are threaded. The default value is true.|
|||threadLimit||integer||The maximum number of comment threads to retrieve. If you don't give this parameter a value, the value will be taken from the comment category thread limit that is set in the Comments Settings page of Gigya's site (defaults to 25). You can change the comment category thread limit in the Comments Settings page or override it by using this parameter.|
|||UID||string||A unique user ID. Including this parameter add the 'isSelf=true' indication to each of the comments posted by the user in the response.|
Each REST API request must contain identification and authorization parameters.
Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as client-side calls and all client-side rate limits will apply. In order to not reach client-side rate limits that may impact your implementation when using server-to-server REST calls, it is Recommended Best Practice to always sign the request or use a secret. A non-exhaustive list of REST APIs that this may apply to are as follows:
Please refer to the Authorization Parameters section for details.
|An array listing the comments. Each comment is represented by a JSON Comment object.|
|userComments||Array of |
Comment object s
|When includeUserComments is true, the response includes an array of all the comments posted by the user to this stream; each comment is represented by a JSON Comment object. In addition to the regular fields of the Comment object, the following fields are returned in the response of this method:|
|commentCount||integer||The number of returned comments.|
|threadCount||integer||The number of returned comments threads.|
|hasMore||Boolean||Specifies whether there are more comments that were not returned within this response.|
|next||string||A pointer to the starting point of the next comments page. The purpose of this field is pagination of the comments. Use this field as the value of the 'start' parameter of the next getComments request, thus retrieving the next comments and avoid retrieving the same comments again.|
|streamInfo||StreamInfo object||A JSON object containing meta information of the requested commenting stream. This object is available in the response only if the "includeStreamInfo" parameter is set to 'true' in the request.|
A JSON object containing meta information of a comments user. This object is available in the response only if the " includeUserOptions" parameter is set to 'true' in the request.
The object includes the following fields:
A field that does not contain data will not appear in the response.
The microformats are a standardized way to display data on the web. Specifically, hreview is a microformat to display review data.
For more on hreview visit the microformats hreview page.
When calling comments.getComments with dataFormat set to "html", the response returned is according to hreview standards.
The following markup illustrates the 'microformat_haggregate' and the 'microformat' response structure.