/**
 * 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 Checkins API provides methods to create and manage checkins to a Place or an Event.
 * The REST object of this class contains the following fields:<ul>
 * <li>created_at (NSString): Message creation date.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields. </li>
 * <li>event (APSEvents): The event object associated with the checkin.</li>
 * <li>id (NSString): Generated unique ID for this checkin.</li>
 * <li>message (NSString): Checkin message.</li>
 * <li>photo (APSPhotos): The primary photo for the checkin.</li>
 * <li>place (APSPlaces): The place object associated with the checkin.</li>
 * <li>tags (NSString): Comma-separated list of tags associated with this checkin.</li>
 * <li>updated_at (NSString): Message update date.</li>
 * <li>user (APSUsers): Checkin owner.</li>
 * </ul>
 * For more details about the underlying REST object, see the [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Checkins).
 */

@interface APSCheckins : NSObject




/**
 * Creates a checkin to a place or an event. 
 *
 * 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/Checkins-method-create).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>place_id (NSString): ID of the Places to check in to.</li>
 * <li>event_id (NSString): ID of the Events to check in to.</li>
 * <li>message (NSString): Message to attach to the checkin.</li>
 * <li>photo (APSPhotos): New photo to attach as the primary photo for the checkin.</li>
 * <li>photo_id (NSString): ID of an existing photo to attach as the primary photo for the checkin.</li>
 * <li>tags (NSString): Comma separated list of tags for this checkin.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields.</li>
 * <li>acl_name (NSString): Name of an ACLs to associate with this checkin object.</li>
 * <li>acl_id (NSString): ID of an ACLs to associate with this checkin object.</li>
 * <li>user_id (NSString): User ID to create the checkin on behalf of.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 */

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


/**
 * Creates a checkin to a place or an event. 
 *
 * 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/Checkins-method-create).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>place_id (NSString): ID of the Places to check in to.</li>
 * <li>event_id (NSString): ID of the Events to check in to.</li>
 * <li>message (NSString): Message to attach to the checkin.</li>
 * <li>photo (APSPhotos): New photo to attach as the primary photo for the checkin.</li>
 * <li>photo_id (NSString): ID of an existing photo to attach as the primary photo for the checkin.</li>
 * <li>tags (NSString): Comma separated list of tags for this checkin.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields.</li>
 * <li>acl_name (NSString): Name of an ACLs to associate with this checkin object.</li>
 * <li>acl_id (NSString): ID of an ACLs to associate with this checkin object.</li>
 * <li>user_id (NSString): User ID to create the checkin on behalf of.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 * @param progressHandler Callback to handle the progress of the request. See the Callback section in APSClient.
 */

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




/**
 * Performs a custom query of checkins with sorting and pagination. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Checkins-method-query).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <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 Checkin 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 response json.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 */

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




/**
 * Returns the contents of the identified checkin. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Checkins-method-show).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>checkin_id (NSString): ID of the checkin to show. (required)</li>
 * <li>response_json_depth: Nested object depth level counts in response json.</li>
 * <li>show_user_like (NSBoolean): If set to true the Checkin object in the response will include "current_user_liked: true" if the current user has liked the object.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 */

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




/**
 * Deletes a checkin. 
 *
 * 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/Checkins-method-delete).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>checkin_id (NSString): ID of the checkin to delete.</li>
 * <li>user_id (NSString): User to delete the Checkin object on behalf of.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 */

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



@end
