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


/**
 * This feature requires an Appcelerator Platform subscription, and the current user must be an application admin to use the API.
 * The REST object of this class contains the following fields:<ul>
 * <li>id (NSString): Generated unique ID for this scheduled push.</li>
 * <li>name (NSString): Arbitrary name for the scheduled push notification.</li>
 * <li>push_notification (NSDictionary): Push notification to send for scheduled pushes. </li>
 * <li>recurrence (NSDictionary): Schedules the recurrence of the push notification. </li>
 * <li>start_time (NSString): Datetime to start the scheduled push notification in ISO 8601 format.</li>
 * </ul>
 * For more details about the underlying REST object, see the [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/PushSchedules).
 */

@interface APSPushSchedules : NSObject




/**
 * Creates a scheduled push notification. 
 *
 * 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/PushSchedules-method-create).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>schedule (NSDictionary): Push notification to schedule. (required)</li>
 * <li>where (NSDictionary): A JSON-encoded object that defines a location query used to select the devices that will receive the scheduled notification.</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>push_schedules (APSPushSchedules[]): A single-element array containing the newly-created scheduled push object.</li>
 * </ul>
 */

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




/**
 * Queries the list of scheduled push notifications. 
 *
 * 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/PushSchedules-method-query).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>name (NSString): Name given to the scheduled push notification.</li>
 * <li>page (NSNumber): Request page number, default is 1.</li>
 * <li>per_page (NSNumber): Number of results per page, default is 10.</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>push_schedules (APSPushSchedules[]): A list of scheduled push notifications matching the query.</li>
 * </ul>
 */

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




/**
 * Deletes a scheduled push notification. 
 *
 * 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/PushSchedules-method-delete).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>ids (NSString[]): Array of push schedule IDs to delete.</li>
 * </ul>
 * @param handler Callback to handle the server response. See the Callback section in APSClient.
 */

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



@end
