/**
 * 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 SocialIntegrations object lets users link their existing APS accounts to their social network accounts (Facebook or Twitter, for example) and login to APS using their social network account credentials.
 * For more details about the underlying REST object, see the [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/SocialIntegrations).
 */

@interface APSSocialIntegrations : NSObject




/**
 * Users can login using an external account such as Facebook, Twitter, Linkedin, etc without creating an account with A
 *
 * For more details about the underlying REST method, see the
 * [ACS API Docs](http://docs.appcelerator.com/cloud/latest/#!/api/SocialIntegrations-method-external_account_login).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>id (NSString): External account's user ID. (required)</li>
 * <li>type (NSString): Type of the external account, for example, "facebook", "linkedin", or "twitter". (required)</li>
 * <li>token: Token provided by the external account. (required)</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>users (APSUsers[]): Single-element array containing the updated user record.</li>
 * </ul>
 */

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




/**
 * Associates an external account with an existing Appcelerator Cloud Services user account. 
 *
 * 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/SocialIntegrations-method-external_account_link).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>id (NSString): External account's user ID. (required)</li>
 * <li>type (NSString): Type of the external account, for example, "facebook", "linkedin", or "twitter". (required)</li>
 * <li>token: Token provided by the external account. (required)</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>users (APSUsers[]): Single-element array containing the updated user record.</li>
 * </ul>
 */

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




/**
 * Disassociate an external account from a Appcelerator Cloud Services user account. 
 *
 * 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/SocialIntegrations-method-external_account_unlink).
 * @param data Method parameters specified as an NSDictionary with the following key-value pairs:<ul> 
 * <li>id (NSString): External account's user ID. (required)</li>
 * <li>type (NSString): Type of the external account, for example, "facebook", "linkedin", or "twitter". (required)</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>users (APSUsers[]): Single-element array containing the updated user record.</li>
 * </ul>
 */

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




/**
 * Find the current user's Facebook Friends who also registered in the same App.
 *
 * 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/SocialIntegrations-method-facebook_search_friends).
 * @param data Unused.
 * @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>users (APSUsers[]): List of friends.</li>
 * </ul>
 */

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



@end
