/**
 * 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"


/**
 * A Post represents a wall post or similar social media content.
 * The REST object of this class contains the following fields:<ul>
 * <li>acls (APSACLs[]): Single-element array containing the object's ACL, if any.</li>
 * <li>content (NSString): Text content of the post.</li>
 * <li>created_at (NSString): Creation date for this object.</li>
 * <li>custom_fields (NSString/NSDictionary): User defined fields. </li>
 * <li>event (NSString): Event this post belongs to.</li>
 * <li>id (NSString): Generated ID for this object.</li>
 * <li>photo (APSPhotos): Primary photo for this post.</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>reviews (APSReviews[]): List of reviews for this object. </li>
 * <li>reviews_count (NSNumber): Total number of reviews for this object. </li>
 * <li>tags (NSString[]): List of tags for this object.</li>
 * <li>title (NSString): Title of the post.</li>
 * <li>updated_at (NSString): Last update time for this object.</li>
 * <li>user (NSString): User who created this post.</li>
 * </ul>
 * For more details about the underlying REST object, see the [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Posts).
 */

@interface APSPosts : NSObject




/**
 * Create a post, which can be a Facebook-style wall post or Digg-style submission with content. 
 *
 * 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/Posts-method-create).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>content (NSString): Text content of the post. (required)</li>
 * <li>title (NSString): Title of the post.</li>
 * <li>event_id (NSString): ID of the Events this post belongs to.</li>
 * <li>photo (APSPhotos): New photo to attach as the primary photo for this object.</li>
 * <li>photo_id (NSString): ID of an existing photo to attach as the primary photo for this object.</li>
 * <li>tags (NSString): Comma separated list of tags for this object.</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 object 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;


/**
 * Create a post, which can be a Facebook-style wall post or Digg-style submission with content. 
 *
 * 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/Posts-method-create).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>content (NSString): Text content of the post. (required)</li>
 * <li>title (NSString): Title of the post.</li>
 * <li>event_id (NSString): ID of the Events this post belongs to.</li>
 * <li>photo (APSPhotos): New photo to attach as the primary photo for this object.</li>
 * <li>photo_id (NSString): ID of an existing photo to attach as the primary photo for this object.</li>
 * <li>tags (NSString): Comma separated list of tags for this object.</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 object 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;




/**
 * Returns  the post with the given id. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Posts-method-show).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): Post ID to show.</li>
 * <li>post_ids (NSString[]): Comma-separated list of post IDs.</li>
 * <li>response_json_depth (NSNumber): Nested object depth level counts in response JSON.</li>
 * <li>show_user_like (NSBoolean): If set to true the Post 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.
 * The response data returns the following method-specific properties:<ul>
 * <li>posts (APSPosts[]): List of identified posts.</li>
 * </ul>
 */

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




/**
 * Performs custom query of posts with sorting and pagination. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Posts-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 Post 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>posts (APSPosts[]): List of posts matching the query parameters.</li>
 * </ul>
 */

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




/**
 * Updates the identified post. 
 *
 * 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/Posts-method-update).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): ID of the post to update. (required)</li>
 * <li>content (NSString): Text content of the post. (required)</li>
 * <li>title (NSString): Title of the post.</li>
 * <li>event_id (NSString): ID of the Events this post belongs to.</li>
 * <li>photo (APSPhotos): New photo to attach as the primary photo for this object.</li>
 * <li>photo_id (NSString): ID of an existing photo to attach as the primary photo for this object.</li>
 * <li>tags (NSString): Comma separated list of tags for this object.</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 update the Post object 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>posts (APSPosts[]): Single-element array containing the updated post.</li>
 * </ul>
 */

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


/**
 * Updates the identified post. 
 *
 * 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/Posts-method-update).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): ID of the post to update. (required)</li>
 * <li>content (NSString): Text content of the post. (required)</li>
 * <li>title (NSString): Title of the post.</li>
 * <li>event_id (NSString): ID of the Events this post belongs to.</li>
 * <li>photo (APSPhotos): New photo to attach as the primary photo for this object.</li>
 * <li>photo_id (NSString): ID of an existing photo to attach as the primary photo for this object.</li>
 * <li>tags (NSString): Comma separated list of tags for this object.</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 update the Post object 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>posts (APSPosts[]): Single-element array containing the updated post.</li>
 * </ul>
 * @param progressHandler Callback to handle the progress of the request. See the Callback section in APSClient.
 */

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




/**
 * Deletes the post 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/Posts-method-delete).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>post_id (NSString): ID of the post to delete.</li>
 * <li>user_id (NSString): User ID to delete the Post 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
