Exemple #1
0
 public static void GetUser(UserId userId, Action <User> success, Action <GetSocialError> failure)
 {
     GetUsers(UserIdList.CreateWithProvider(userId.Provider, userId.Id), result =>
     {
         if (result.ContainsKey(userId.Id))
         {
             success(result[userId.Id]);
         }
         else
         {
             failure(new GetSocialError(ErrorCodes.IllegalArgument, $"User does not exist: {userId}"));
         }
     }, failure);
 }
Exemple #2
0
 public static void GetUsers(UserIdList list, Action <Dictionary <string, User> > success, Action <GetSocialError> failure)
 {
     GetSocialFactory.Bridge.GetUsers(list, success, failure);
 }
Exemple #3
0
 public static void RemoveFriends(UserIdList userIds, Action <int> success, Action <GetSocialError> failure)
 {
     GetSocialFactory.Bridge.RemoveFriends(userIds, success, failure);
 }
Exemple #4
0
 public static void AreFriends(UserIdList userIds, Action <Dictionary <string, bool> > success, Action <GetSocialError> failure)
 {
     GetSocialFactory.Bridge.AreFriends(userIds, success, failure);
 }
Exemple #5
0
 public void SetFriends(UserIdList userIds, Action <int> success, Action <GetSocialError> failure)
 {
     CallAsync("Communities.setFriends", GSJson.Serialize(userIds), success, failure);
 }
Exemple #6
0
 public void AreGroupMembers(string groupId, UserIdList userIdList, Action <Dictionary <string, MembershipRole> > success, Action <GetSocialError> failure)
 {
     CallAsync("Communities.areGroupMembers", GSJson.Serialize(new AreGroupMembersBody {
         GroupId = groupId, UserIdList = userIdList
     }), success, failure);
 }
Exemple #7
0
 public void GetUsers(UserIdList list, Action <Dictionary <string, User> > onSuccess, Action <GetSocialError> onFailure)
 {
     CallAsync("Communities.getUsersByIds", GSJson.Serialize(list), onSuccess, onFailure);
 }
Exemple #8
0
 public void AreFriends(UserIdList userIds, Action <Dictionary <string, bool> > success, Action <GetSocialError> failure)
 {
     CallAsync("Communities.areFriends", GSJson.Serialize(userIds), success, failure);
 }
Exemple #9
0
 public static RemoveGroupMembersQuery Users(UserIdList userIdList, string groupId)
 {
     return(new RemoveGroupMembersQuery(userIdList, groupId));
 }
 public UpdateGroupMembersQuery(string groupId, UserIdList userIdList, MembershipStatus status)
 {
     this.UserIdList = userIdList;
     this.GroupId    = groupId;
     this.Status     = status;
 }
Exemple #11
0
 RemoveGroupMembersQuery(UserIdList userIdList, string groupId)
 {
     this.UserIdList = userIdList;
     this.GroupId    = groupId;
 }
Exemple #12
0
 /// <summary>
 /// Follow users in the list.
 /// </summary>
 /// <param name="userIdList">User IDs.</param>
 /// <returns>new query.</returns>
 public static FollowQuery Users(UserIdList userIdList)
 {
     return(new FollowQuery(CommunitiesIds.Users(userIdList)));
 }
 public static CommunitiesIds Users(UserIdList userIdList)
 {
     return(new CommunitiesIds(CommunitiesEntityType.User, userIdList.AsString()));
 }
Exemple #14
0
 public static SendNotificationTarget Users(UserIdList userIdList)
 {
     return(new SendNotificationTarget(userIdList));
 }
Exemple #15
0
 internal SendNotificationTarget(UserIdList userIdList)
 {
     UserIdList     = userIdList;
     PlaceholderIds = new List <string>();
 }