コード例 #1
0
 public static void Delete(Setting setting, User user)
 {
     Fallball.Call <User>(setting, HttpMethod.Delete,
                          string.Format("resellers/{0}/clients/{1}/users/{2}",
                                        FbReseller.GetId(user.Tenant.App),
                                        FbClient.GetId(user.Tenant),
                                        GetId(user)));
 }
コード例 #2
0
 public static string GetUserLogin(Setting setting, User user)
 {
     return(Fallball.Call <String>(setting, HttpMethod.Get, string.Format("resellers/{0}/clients/{1}/users/{2}/link",
                                                                          FbReseller.GetId(user.Tenant.App),
                                                                          FbClient.GetId(user.Tenant),
                                                                          GetId(user)
                                                                          )));
 }
コード例 #3
0
        public static string Create(Setting setting, User user)
        {
            var u = new FbUser {
                Email = user.Email, Admin = true, Storage = new Storage {
                    Limit = UsersStorage
                }
            };

            var fbUser = Fallball.Call <FbUser>(setting, HttpMethod.Post,
                                                string.Format("resellers/{0}/clients/{1}/users/",
                                                              FbReseller.GetId(user.Tenant.App),
                                                              FbClient.GetId(user.Tenant)),
                                                JsonConvert.SerializeObject(u));

            return(fbUser.UserId);
        }