示例#1
0
        public async Task<UserListItem> AddUserAsync(User user, BuddyGeoLocation location, string tag = null)
        {
            var c = new UserListItem(this.GetObjectPath() + PlatformAccess.GetCustomAttribute<BuddyObjectPathAttribute>(typeof(UserListItem)).Path, this.Client)
            {
                UserID = user.ID,
                Location = location,
                Tag = tag
            };

            var r = await c.SaveAsync();

            return r.Convert<UserListItem>(b => c).Value;
        }
示例#2
0
 public Task<BuddyResult<bool>> RemoveUserAsync(User user)
 {
     return Client.CallServiceMethod<bool>("DELETE", GetObjectPath() + "/items/" + user.ID);
 }
 public CurrentUserChangedEventArgs(AuthenticatedUser newUser, User previousUser = null)
 {
     PreviousUser = previousUser;
     NewUser = newUser;
 }