/// <summary> /// Retrieves a list of user and friend platform information for all friends of the current user. /// </summary> /// <remarks> /// Service Name - Friend /// Service Operation - LIST_FRIENDS /// </remarks> /// <param name="friendPlatform">Friend platform to query.</param> /// <param name="includeSummaryData">True if including summary data; false otherwise.</param> /// <param name="success"> The success callback. </param> /// <param name="failure"> The failure callback. </param> /// <param name="cbObject"> The user object sent to the callback. </param> public void ListFriends( FriendPlatform friendPlatform, bool includeSummaryData, SuccessCallback success = null, FailureCallback failure = null, object cbObject = null) { Dictionary <string, object> data = new Dictionary <string, object>(); data[OperationParam.FriendServiceFriendPlatform.Value] = friendPlatform.ToString(); data[OperationParam.FriendServiceIncludeSummaryData.Value] = includeSummaryData; ServerCallback callback = BrainCloudClient.CreateServerCallback(success, failure, cbObject); ServerCall sc = new ServerCall(ServiceName.Friend, ServiceOperation.ListFriends, data, callback); _client.SendRequest(sc); }
/// <summary> /// Links the profiles for the specified externalIds for the given friend platform as internal friends. /// </summary> /// <remarks> /// Service Name - Friend /// Service Operation - ADD_FRIENDS_FROM_PLATFORM /// </remarks> /// <param name="friendPlatform">Platform to add from (i.e: FriendPlatform:Facebook)</param> /// <param name="mode">ADD or SYNC</param> /// <param name="externalIds">Collection of external ID's from the friend platform</param> /// <param name="success"> The success callback. </param> /// <param name="failure"> The failure callback. </param> /// <param name="cbObject"> The user object sent to the callback. </param> public void AddFriendsFromPlatform( FriendPlatform friendPlatform, string mode, IList <string> externalIds, SuccessCallback success = null, FailureCallback failure = null, object cbObject = null) { Dictionary <string, object> data = new Dictionary <string, object>(); data[OperationParam.FriendServiceFriendPlatform.Value] = friendPlatform.ToString(); data[OperationParam.FriendServiceMode.Value] = mode; data[OperationParam.FriendServiceExternalIds.Value] = externalIds; ServerCallback callback = BrainCloudClient.CreateServerCallback(success, failure, cbObject); ServerCall serverCall = new ServerCall(ServiceName.Friend, ServiceOperation.AddFriendsFromPlatform, data, callback); _client.SendRequest(serverCall); }
public bool Equals(PlatformFriend input) { if (input == null) { return(false); } return (( PlatformDisplayName == input.PlatformDisplayName || (PlatformDisplayName != null && PlatformDisplayName.Equals(input.PlatformDisplayName)) ) && ( FriendPlatform == input.FriendPlatform || (FriendPlatform != null && FriendPlatform.Equals(input.FriendPlatform)) ) && ( DestinyMembershipId == input.DestinyMembershipId || (DestinyMembershipId.Equals(input.DestinyMembershipId)) ) && ( DestinyMembershipType == input.DestinyMembershipType || (DestinyMembershipType.Equals(input.DestinyMembershipType)) ) && ( BungieNetMembershipId == input.BungieNetMembershipId || (BungieNetMembershipId.Equals(input.BungieNetMembershipId)) ) && ( BungieGlobalDisplayName == input.BungieGlobalDisplayName || (BungieGlobalDisplayName != null && BungieGlobalDisplayName.Equals(input.BungieGlobalDisplayName)) ) && ( BungieGlobalDisplayNameCode == input.BungieGlobalDisplayNameCode || (BungieGlobalDisplayNameCode.Equals(input.BungieGlobalDisplayNameCode)) )); }