Badges
This documentation explains how badges can be used to visually identify notable attributes about authors or content.
Introduction
Badges are icons and labels that call attention to certain contributors or reviews so that people viewing your site can easily identify content that may be important to them. Badges can be used to call attention people who are affiliated with your organization, top content contributors and product experts, reviews that were verified as written by someone who purchased the product or service and reviews written by someone who received the product or service for free in exchange for a review.
Getting a list of badges
Badges will be returned as an array with the UGC response objects that include them, (i.e. Review, Question, Answer, Comment).
Image links are not returned from the Conversations API. The display for Conversation API clients is left up to your creative interpretation.
if (response.getHasErrors()) {
// handle it
return;
}
final List<Review> reviews = response.getResults();
final Review review = reviews.get(position);
final List<Badge> badgeList = review.getBadgeList();
for (Badge badge : badgeList) {
// id that can be used to obtain the related ContextDataValues that can
// also be returned in the API response when configured
final String badgeId = badge.getId();
// The specific item the badge is meant for. Typical values are
// 'REVIEWS', 'QUESTIONS', or 'ANSWERS'.
final String contentType = badge.getContentType();
}
Updated 10 months ago