comments.setCategoryInfo REST

Skip to end of metadata
Go to start of metadata

Description

Sets or creates a comment's category with all the category's information.

 

Note: This method is available for moderators only.

 

 

Request URL

 

Where <Data_Center_ID> is:
  • us1 - For the US data center.
  • eu1 - For the European data center.
  • au1 - For the Australian data center.
  • ru1 - For the Russian data center.

If you are not sure of your site's data center, see Finding Your Site's Data Center.

Parameters

RequiredNameTypeDescription
categoryIDstringThe identifier of the comments category to update or create.
categorySettingsJSONThe object includes the following fields:
  • blockedWords - aomments containing a restricted word (or phrase) will be filtered and will not be displayed.
  • displayGuestName - indicates whether to display the name of a guest user.
  • userEditComment - boolean indicating whether a user can edit a comment or review after posting it. Default is 'false'.
    When activated, users can edit the commentText, commentTitle, mediteItems, ratings, taggedUsers fields via the comments.updateComment API.
  • moderatorEditComment - indicates whether to a
  • newCommentNotificationEnabled - indicates whether to email moderator when a new comment is posted. 
  • notificationEvents - a comma separated list of events which will cause a notification to be posted to a specified URL. Possible values: newComment, commentStatusChanged, commentEdited. Notifications will only be triggered if a notificationURL has been set. The notification event is sent as a post request to the notificationURL. For details of the notification callback's fields see Comment Notifications. Notifications can also be set from the platform, see Comments.
  • notificationURL - the URL to which notification data is posted when a notification event is triggered (see notificationEvents).
  • publishToGoogleActivityStream - indicates whether to publish to Google activity stream.
  • useAkismet - indicates whether to use Akismet for spam protection.
  • globalModeratorName - the global configuration for the moderator name.
  • globalModeratorPhotoURL - the global configuration for the moderator photo URL.
  • moderatorNameMode - can be either "global" (default), or "profile", and indicates whether the moderator name is taken from the global configuration or the moderators profile.
  • moderatorPhotoModer - can be either "profile" (default), or "global", and indicates whether the moderator photo URL is taken from the moderator's profile or from the global configuration.
clientSettingsJSONThe object includes the following fields:
  • disableCommentsCount - indicates whether to disable comments count.
  • disableRSS - indicates whether to disable RSS and Subscribe.
  • displayPosNegVotes - indicates whether to show the positive and negative votes separately.
  • enableDirectCommentLinking - when set to 'true', shared comments links will link directly to the comment, rather than the page of the comment.
  • enableFBComments - indicates whether to display Facebook comments.
  • enableMediaItems - indicates whether to enable embedding media items. 
  • enableRichTextEditing - indicates whether to enable rich text editing.
  • enableUserTagging - indicates whether to enable user tagging.
  • enableUserSorting - indicates whether to enable user sorting.
  • enableLinks - when set to 'true', URLs that are included in the comment text will be displayed as clickable links in the published comment. When set to 'false', URLs will be displayed as regular text. Default is 'false'. For the purpose of this feature, URLs are strings that begin with "http://", "https://" or "www.".
  • maxCommentLength - the maximum comment length.
  • mode - may be "reviews", "ratingsOnly", or "comments".
  • newCommentPosition - the position of a new comment, either "top" or "bottom".
  • repliesCollapsed - indicates whether to display the replies in collapsed or expanded form.
  • refreshInterval - the refresh interval in seconds.
  • refreshMode - indicates whether to show newly added comments; can be "off" with value 0, "show only new comments count" with value "CountOnly" , or "automatically show new comments" with value "Full".
  • requireGuestName - indicates whether a guest name is required.
  • shareToSNCheckboxChecked - indicates whether to enable sharing to social networks.
  • useSiteLogin - indicates whether to enable user site login.
emailNotificationsJSONGigya supplies email notifications in all supported languages. Use this parameter to set customized templates for specific languages, note that languages for which no customized template is submitted will be set to use the default emails
This object includes the following fields:
  • commentReply - The format for emails notifying the user of a reply to a comment. Contains one field, emailTemplates, which is a JSON object containing customized email templates for different languages, separated by commas in the format "commentReply":{ "emailTemplates": {"en": "",  "fr":"" , "ch":""} } .
  • streamSubscription - The format for emails notifying the user that they have subscribed to a comment stream. Contains one field, emailTemplates, which is a JSON object containing customized email templates for different languages, separated by commas in the format "streamSubscription":{ "emailTemplates": {"en": "",  "fr":"" , "ch":""} } .
highlightSettingsJSONThe object includes an array of one or more groups, and each group is an object with the following fields:
  • name - the group name. The name is case-sensitive, and is limited to 20 characters. The permitted characters are ASCII, or "-", or "_".
  • showBadge - indicates whether to show the badge that represents the group.
  • badgeText - the text to be shown. The text is limited to 20 characters. 
  • badgeColor - the color of the badge in hex representation.
  • badgeFrame - the frame around the badge text. The possible values are either "rectangle" or "none" (default).
  • badgeImageURL - the URL of an image to add to the badge.
  • commenterNameColor - the color of the commenter name, in hex representation.
  • commentBackgroundColor - the color of comment background, in hex representation.
  • type - the type of the group, where the possible values are "user", "comment", or "moderator".
  • enabled - indicates whether the group is enabled or not. 

Note: there can be only one "moderator" group. 

ratingDimsarray of objectsThe object includes the following fields:
  • id - the unique identifier of the rating dimension
  • name - the name of the rating dimension
streamSettingsJSONThe object includes the following fields:
  • allowCommentDeletion - indicates whether to enable deleting comments.
  • allowGuest - indicates whether to allow guest users to post comments.
  • allowNegativeVoting - indicates whether to allow negative voting.
  • enableCommentBody - indicates whether to enable comment bodies.
  • enableCommentTitles - indicates whether to enable comment titles.
  • enableFlagging - indicates whether to enable flagging of comments.
  • enableRatings - indicates whether ratings are enabled.
  • enableVoting - indicates whether to enable voting.
  • flaggingEmailAfter - the number of flags before sending an email to the moderator.
  • flaggingPendingAfter - the number of flags before automatic blocking of comments.
  • isGuestEmailRequired - indicates whether an email address is required for guest users.
  • moderationModes - an object that specifies the moderation mode for various comments according to their content type (see Moderation Modes for more information). When using this field, it is not necessary to set the moderation mode for all content types. Content types that are not referred to will retain their previous moderation state.
{
    "text": "post|pre|guest",
    "image": "post|pre|guest",
    "video": "post|pre|guest",
    "url": "post|pre|guest",
    "other": "post|pre|guest"
}
  • pageSize - indicates the default page size.
  • readOnly - indicates whether the stream is read only.
  • sortBy - according to what order the comments are sorted by: most recent on top, most recent on bottom, or most relevant on top. The possible values are "DateDesc", "DateAsc", "LastReply", "RatingAsc", "RatingDesc", "VotesAsc", and "VotesDesc".
  • threadingDepth - the depth of the threading (replies).
  • allowAnonymous - indicates whether logged-in users are allowed anonymous posting.
  • moderationState - Deprecated. Use moderationModes instead.
useMollombooleanIndicate whether to use Mollom as a spam detector. The default is 'false'.
format string Determines the format of the response. The options are:
  • json (default)
  • jsonp - if the format is jsonp then you are required to define a callback method (see parameter below).
callback string This parameter is required only when the format parameter is set to jsonp (see above). In such cases this parameter should define the name of the callback method to be called in the response, along with the jsonp response data.
httpStatusCodes Boolean The default value of this parameter is false, which means that the HTTP status code in Gigya's response is always 200 (OK), even if an error occurs. The error code and message is given within the response data (see below). If this parameter is set to true, the HTTP status code in Gigya's response would reflect an error, if one occurred.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Please refer to the Authorization Parameters section for details. 

 

Response Data

FieldTypeDescription
 
statusCode integer The HTTP response code of the operation. Code '200' indicates success.
errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
statusReason string A brief explanation of the status code.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
callId string Unique identifier of the transaction, for debugging purposes.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or

 

Response Example

{
        "statusCode": 200,
        "errorCode": 0,
        "statusReason": "OK",
        "callId": "31ba039fb8d340ceb2f43d52c89bf187",
}