GMSPlaceReview
@interface GMSPlaceReview : NSObjectThis class represents a single place review.
-
-initWithPublishDate:relativePublishDateDescription:text:textLanguageCode:originalText:originalTextLanguageCode:rating:authorAttribution:
Instantiates a
GMSPlaceReviewwith detail properties.Declaration
Swift
init(publishDate: Date, relativePublishDateDescription: String?, text: String?, textLanguageCode: String?, originalText: String?, originalTextLanguageCode: String?, rating: Float, authorAttribution: GMSPlaceAuthorAttribution?)Objective-C
- (nonnull instancetype) initWithPublishDate:(nonnull NSDate *)publishDate relativePublishDateDescription: (nullable NSString *)relativePublishDateDescription text:(nullable NSString *)text textLanguageCode:(nullable NSString *)textLanguageCode originalText:(nullable NSString *)originalText originalTextLanguageCode:(nullable NSString *)originalTextLanguageCode rating:(float)rating authorAttribution: (nullable GMSPlaceAuthorAttribution *)authorAttribution;Parameters
publishDateThe
NSDatethe review was published.relativePublishDateDescriptionThe description of the publish date relative to the time of the request.
textThe localized text of the review.
textLanguageCodeThe language code of the localized review text.
originalTextThe review text in its original language.
originalTextLanguageCodeThe language code the review was originally written in.
ratingThe 0.0 - 5.0 rating associated with the review.
authorAttributionThe
GMSPlaceAuthorAttributionof the review’s author. -
-initWithPublishDate:relativePublishDateDescription:text:textLanguageCode:originalText:originalTextLanguageCode:rating:authorAttribution:visitYear:visitMonth:
Instantiates a
GMSPlaceReviewwith detail properties.Declaration
Swift
init(publishDate: Date, relativePublishDateDescription: String?, text: String?, textLanguageCode: String?, originalText: String?, originalTextLanguageCode: String?, rating: Float, authorAttribution: GMSPlaceAuthorAttribution?, visitYear: UInt, visitMonth: UInt)Objective-C
- (nonnull instancetype) initWithPublishDate:(nonnull NSDate *)publishDate relativePublishDateDescription: (nullable NSString *)relativePublishDateDescription text:(nullable NSString *)text textLanguageCode:(nullable NSString *)textLanguageCode originalText:(nullable NSString *)originalText originalTextLanguageCode:(nullable NSString *)originalTextLanguageCode rating:(float)rating authorAttribution: (nullable GMSPlaceAuthorAttribution *)authorAttribution visitYear:(NSUInteger)visitYear visitMonth:(NSUInteger)visitMonth;Parameters
publishDateThe
NSDatethe review was published.relativePublishDateDescriptionThe description of the publish date relative to the time of the request.
textThe localized text of the review.
textLanguageCodeThe language code of the localized review text.
originalTextThe review text in its original language.
originalTextLanguageCodeThe language code the review was originally written in.
ratingThe 0.0 - 5.0 rating associated with the review.
authorAttributionThe
GMSPlaceAuthorAttributionof the review’s author.visitYearThe year the user visited the place.
visitMonthThe month the user visited the place.
-
The
NSDatethe review was published.Declaration
Swift
var publishDate: Date { get }Objective-C
@property (nonatomic, copy, readonly) NSDate *_Nonnull publishDate; -
A formatted string expressing the review date/time to the current time. Specific to the language and country (e.g. “6 months ago”).
Declaration
Swift
var relativePublishDateDescription: String? { get }Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *relativePublishDateDescription; -
The text of the review.
Declaration
Swift
var text: String? { get }Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *text; -
The language code of the text of the review.
Declaration
Swift
var textLanguageCode: String? { get }Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *textLanguageCode; -
The text of the review in its original language.
Declaration
Swift
var originalText: String? { get }Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *originalText; -
The language code of the original text of the review.
Declaration
Swift
var originalTextLanguageCode: String? { get }Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *originalTextLanguageCode; -
A whole number between 1.0 and 5.0, a.k.a. the number of stars.
Declaration
Swift
var rating: Double { get }Objective-C
@property (nonatomic, readonly) double rating; -
The attribution that must be shown to the user if this review is displayed.
See Other Attribution Requirements for more details.
Declaration
Swift
var authorAttribution: GMSPlaceAuthorAttribution? { get }Objective-C
@property (nonatomic, readonly, nullable) GMSPlaceAuthorAttribution *authorAttribution; -
The year when the user visited the place. 0 is unset.
Declaration
Swift
var visitYear: UInt { get }Objective-C
@property (nonatomic, readonly) NSUInteger visitYear; -
The month when the review author visited the place. This value is 1-based, so 1 is January and 12 is December. 0 is unset.
Declaration
Swift
var visitMonth: UInt { get }Objective-C
@property (nonatomic, readonly) NSUInteger visitMonth;