/**
 * 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 Clients API lets you lookup a user location based on IP address if the user's device fails to provide location information.
 * For more details about the underlying REST object, see the [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Clients).
 */

@interface APSClients : NSObject




/**
 * Provides location data about the mobile device or computer your app is running on based on its IP address. 
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/Clients-method-geolocate).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>ip_address: Alternate IP address to lookup instead of using the device's own address.</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>ip_address (NSString): Device IP address.</li>
 * <li>location (NSDictionary): Device's approximate location, represented as an object with the following properties:   latitude : Number longitude : Number city : String state : String postal_code : String country_code : String   .</li>
 * </ul>
 */

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



@end
