Newer Version Available
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
A user-created review of an item.
1public class Review
2extends java.lang.Object| Field | Description | Modifier and Type |
|---|---|---|
content | The text content of the review. | java.lang.String |
date | Date and time when the review was submitted. | java.util.Date |
itemId | The ID of the item being reviewed. | java.lang.String |
purchased | Whether the product was purchased by this user before being reviewed. | java.lang.Boolean |
rating | Score given to the item in this review, must be normalized to the range 1-100 inclusive. | java.lang.Integer |
title | The title of the review. | java.lang.String |
userDisplayName | Name to be displayed along with review, may have no relation to actual user ID. | java.lang.String |
1@NonNull
2public String itemIdThe ID of the item being reviewed.
See also
1@Nullable
2public Date dateDate and time when the review was submitted.
1@Nullable
2@IntRange(from=1L,
3 to=100L)
4public Integer ratingThe score given to the item in this review. You must normalize the score to a value between, and including, 1 and 100.
1@Nullable
2public String titleThe title of the review.
1@Nullable
2public String contentThe text content of the review.
1@Nullable
2public String userDisplayNameName to be displayed along with review. The name may have no relation to the actual user ID.
1@Nullable
2public Boolean purchasedWhether the product was purchased by this user before being reviewed.
1public Review(@NonNull
2 String itemId,
3 @Nullable
4 Date date,
5 @Nullable @IntRange(from=1L,to=100L)
6 Integer rating,
7 @Nullable
8 String title,
9 @Nullable
10 Boolean purchased)Builds item review details, which can then be further modified. This method only builds a data object. To use it, pass it to one of the tracking methods like Context.review(Item, Review).
| Parameter | Description | Required? |
|---|---|---|
itemId | The Item.id of the item being reviewed. | Yes |
date | See date. | No |
rating | See rating. The value must be from 1 to 100. | No |
title | See title. | No |
purchased | See purchased. | No |
| Method | Modifier and Type |
|---|---|
fromJSONObject(org.json.JSONObject json) | static Review |
1public static Review fromJSONObject(org.json.JSONObject json)Newer Version Available