Ejemplo n.º 1
0
        public void DeleteUser(string email)
        {
            // TODO: doing this causes a "not logged in" failure when the user
            // doesn't exist, which is kind of misleading.
            var appsHelper = new AppsHelper(ProxyUser, CredentialManager);

            foreach (Application a in appsHelper.GetApplications(email))
            {
                appsHelper.Delete(a.Name);
            }

            var servicesHelper = new ServicesHelper(ProxyUser, CredentialManager);

            foreach (ProvisionedService ps in servicesHelper.GetProvisionedServices())
            {
                servicesHelper.DeleteService(ps.Name);
            }

            VcapJsonRequest r = BuildVcapJsonRequest(Method.DELETE, Constants.UsersResource, email);

            r.Execute();
        }
Ejemplo n.º 2
0
        public IEnumerable <VcapUser> GetUsers()
        {
            VcapJsonRequest r = BuildVcapJsonRequest(Method.GET, Constants.UsersResource);

            return(r.Execute <VcapUser[]>());
        }
Ejemplo n.º 3
0
        public VcapUser GetUser(string email)
        {
            VcapJsonRequest r = BuildVcapJsonRequest(Method.GET, Constants.UsersResource, email);

            return(r.Execute <VcapUser>());
        }