/**
 * Appcelerator Platform SDK
 * Copyright (c) 2014 by Appcelerator, Inc. All Rights Reserved.
 * Proprietary and Confidential - This source code is not for redistribution
 */

#import <Foundation/Foundation.h>
#import "APSCloud.h"


/**
 * The Reviews API lets you associate user reviews and ratings with an APS object.
 * The REST object of this class contains the following fields:<ul>
 * <li>checkin (APSCheckins): Checkin object associated with this review.</li>
 * <li>content (NSString): Review or comment text.</li>
 * <li>created_at (NSString): Creation date for this review object.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields. </li>
 * <li>custom_object (APSObjects): Custom object associated with this review.</li>
 * <li>event (APSEvents): Event object associated with this review.</li>
 * <li>photo (APSPhotos): Photo object associated with this review.</li>
 * <li>place (APSPlaces): Place object associated with this review.</li>
 * <li>post (APSPosts): Post object associated with this review.</li>
 * <li>rating (NSString): Rating associated with review.</li>
 * <li>ratings_average (NSNumber): Average rating for this object. </li>
 * <li>ratings_count (NSNumber): Total number of reviews for this object that include a rating. </li>
 * <li>ratings_summary (NSDictionary): Breakdown of the number of reviews that specified a given rating value. </li>
 * <li>review (APSReviews): Review object associated with this review.</li>
 * <li>reviews (APSReviews[]): List of reviews for this object. </li>
 * <li>reviews_count (NSNumber): Total number of reviews for this object. </li>
 * <li>status (APSStatuses): Status object associated with this review.</li>
 * <li>tags (NSString[]): List of tags for this review.</li>
 * <li>updated_at (NSString): Last update time for this review object.</li>
 * <li>user (APSUsers): User who created the review.</li>
 * </ul>
 * For more details about the underlying REST object, see the [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Reviews).
 */

@interface APSReviews : NSObject




/**
 * Adds a review with an optional integer rating. 
 *
 * To use this method, **a user must be logged in before calling this method.**
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Reviews-method-create).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): Post object to review.</li>
 * <li>photo_id (NSString): Photo object to review.</li>
 * <li>user_id (NSString): User object to review.</li>
 * <li>event_id (NSString): Event object to review.</li>
 * <li>place_id (NSString): Place object to review.</li>
 * <li>checkin_id (NSString): Checkin object to review.</li>
 * <li>review_id (NSString): Review object to review.</li>
 * <li>custom_object_id (NSString): Custom object to review.</li>
 * <li>content (NSString): Review or comment text.</li>
 * <li>rating (NSString): Rating to be associated with review.</li>
 * <li>allow_duplicate (NSBoolean): By default, the same user can only submit one review/comment per object.</li>
 * <li>tags (NSString): Comma separated list of tags for this review.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields.</li>
 * <li>acl_name (NSString): Name of an ACLs to associate with this object.</li>
 * <li>acl_id (NSString): ID of an ACLs to associate with this object.</li>
 * <li>user_id (NSString): User ID to create the review on behalf of.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 * The response data returns the following method-specific properties:<ul>
 * <li>reviews (APSReviews[]): Single-element array containing the newly-created review.</li>
 * </ul>
 */

+ (void)create:(NSDictionary *)data withBlock:(APSResponseHandler)handler;




/**
 * Shows the review with the given id. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Reviews-method-show).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): Post object associated with this review.</li>
 * <li>photo_id (NSString): Photo object associated with this review.</li>
 * <li>user_id (NSString): User object associated with this review.</li>
 * <li>event_id (NSString): Event object associated with this review.</li>
 * <li>place_id (NSString): Place object associated with this review.</li>
 * <li>checkin_id (NSString): Checkin object associated with this review.</li>
 * <li>custom_object_id (NSString): Custom object associated with this review.</li>
 * <li>show_user_like (NSBoolean): If set to true the Review object in the response will include "current_user_liked: true" if the current user has liked the object.</li>
 * <li>review_id (NSString): Review object to show. (required)</li>
 * <li>review_object_id (NSString): Review object associated with this review.</li>
 * <li>response_json_depth (NSNumber): Nested object depth level counts in response JSON.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 * The response data returns the following method-specific properties:<ul>
 * <li>reviews (APSReviews[]): Single-element array containing the identified review.</li>
 * </ul>
 */

+ (void)show:(NSDictionary *)data withBlock:(APSResponseHandler)handler;




/**
 * Perform custom query of reviews with sorting and paginating. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Reviews-method-query).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): Limit query to reviews on the identified Post object.</li>
 * <li>photo_id (NSString): Limit query to reviews on the identified Photo object.</li>
 * <li>user_id (NSString): Limit query to reviews on the identified User object.</li>
 * <li>event_id (NSString): Limit query to reviews on the identified Event object.</li>
 * <li>place_id (NSString): Limit query to reviews on the identified Place object.</li>
 * <li>checkin_id (NSString): Limit query to reviews on the identified Checkin object.</li>
 * <li>review_id (NSString): Limit query to reviews on the identified Review object.</li>
 * <li>custom_object_id (NSString): Limit query to reviews on the identified Custom object.</li>
 * <li>owner_id: Limit query results to reviews submitted by the identified  user.</li>
 * <li>page (NSNumber): Request page number, default is 1.</li>
 * <li>per_page (NSNumber): Number of results per page, default is 10.</li>
 * <li>limit (NSNumber): Instead of using page and per_page for pagination, you can use limit and skip to do your own pagination.</li>
 * <li>skip (NSNumber): Number of records to skip.</li>
 * <li>where (NSDictionary): Constraint values for fields.</li>
 * <li>order (NSString): Sort results by one or more fields.</li>
 * <li>sel (NSDictionary): Selects the object fields to display.</li>
 * <li>show_user_like (NSBoolean): If set to true, each Review object in the response includes "current_user_liked: true"  if the current user has liked the object.</li>
 * <li>unsel (NSDictionary): Selects the object fields NOT to display.</li>
 * <li>response_json_depth (NSNumber): Nested object depth level counts in the response JSON.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 * The response data returns the following method-specific properties:<ul>
 * <li>reviews (APSReviews[]): List of reviews matching the query parameters.</li>
 * </ul>
 */

+ (void)query:(NSDictionary *)data withBlock:(APSResponseHandler)handler;




/**
 * Updates the review with the given id. 
 *
 * To use this method, **a user must be logged in before calling this method.**
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Reviews-method-update).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): Post object associated with this review.</li>
 * <li>photo_id (NSString): Photo object associated with this review.</li>
 * <li>user_id (NSString): User object associated with this review.</li>
 * <li>event_id (NSString): Event object associated with this review.</li>
 * <li>place_id (NSString): Place object associated with this review.</li>
 * <li>checkin_id (NSString): Checkin object associated with this review.</li>
 * <li>review_object_id (NSString): Review object associated with this review.</li>
 * <li>custom_object_id (NSString): Custom object associated with this review.</li>
 * <li>review_id (NSString): Review object to update. (required)</li>
 * <li>content (NSString): Review or comment text.</li>
 * <li>rating (NSString): Rating to be associated with review.</li>
 * <li>allow_duplicate (NSBoolean): By default, the same user can only submit one review/comment per object.</li>
 * <li>tags (NSString): Comma separated list of tags for this review.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields.</li>
 * <li>acl_name (NSString): Name of an ACLs to associate with this object.</li>
 * <li>acl_id (NSString): ID of an ACLs to associate with this object.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 * The response data returns the following method-specific properties:<ul>
 * <li>reviews (APSReviews[]): Single-element array containing the updated review.</li>
 * </ul>
 */

+ (void)update:(NSDictionary *)data withBlock:(APSResponseHandler)handler;




/**
 * Delete the review (comment) with the given id. 
 *
 * To use this method, **a user must be logged in before calling this method.**
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Reviews-method-delete).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): Post object associated with this review.</li>
 * <li>photo_id (NSString): Photo object associated with this review.</li>
 * <li>user_id (NSString): User object associated with this review.</li>
 * <li>event_id (NSString): Event object associated with this review.</li>
 * <li>place_id (NSString): Place object associated with this review.</li>
 * <li>checkin_id (NSString): Checkin object associated with this review.</li>
 * <li>review_object_id (NSString): Review object associated with this review.</li>
 * <li>custom_object_id (NSString): Custom object associated with this review.</li>
 * <li>review_id (NSString): Review object to delete. (required)</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 */

+ (void)remove:(NSDictionary *)data withBlock:(APSResponseHandler)handler;



@end
