Class Review

A user-created review of an item.

1public class Review
2extends java.lang.Object

Fields 

FieldDescriptionModifier and Type
contentThe text content of the review.java.lang.String
dateDate and time when the review was submitted.java.util.Date
itemIdThe ID of the item being reviewed.java.lang.String
purchasedWhether the product was purchased by this user before being reviewed.java.lang.Boolean
ratingScore given to the item in this review, must be normalized to the range 1-100 inclusive.java.lang.Integer
titleThe title of the review.java.lang.String
userDisplayNameName to be displayed along with review, may have no relation to actual user ID.java.lang.String

itemId 

1public java.lang.String itemId

The ID of the item being reviewed.

See also

date 

1public java.util.Date date

Date and time when the review was submitted.

rating 

1public java.lang.Integer rating

Score given to the item in this review, must be normalized to the range 1-100 inclusive.

title 

1public java.lang.String title

The title of the review.

content 

1public java.lang.String content

The text content of the review.

userDisplayName 

1public java.lang.String userDisplayName

Name to be displayed along with review, may have no relation to actual user ID.

purchased 

1public java.lang.Boolean purchased

Whether the product was purchased by this user before being reviewed.

Constructors 

Review 

1public Review(java.lang.String itemId,
2              java.util.Date date,
3              java.lang.Integer rating,
4              java.lang.String title,
5              java.lang.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).

Parameters 

ParameterDescriptionRequired?
itemIdThe Item.id of the item being reviewedYes
dateSee dateNo
ratingSee rating. Should be a value from 1 to 100.No
titleSee titleNo
purchasedSee purchasedNo

Methods 

MethodModifier and Type
fromJSONObject(org.json.JSONObject json)static Review

fromJSONObject 

1public static Review fromJSONObject(org.json.JSONObject json)