Example #1
0
 public void Stop_App_As_User()
 {
     IVcapClient client = new VcapClient("http://api.ironfoundry.me");
     VcapClientResult rslt = client.Login("*****@*****.**", "password");
     Assert.True(rslt.Success);
     VcapUser user = client.GetUser("otheruser");
     client.ProxyAs(user);
     VcapClientResult stopRslt = client.Stop("appname");
 }
Example #2
0
 public void Get_All_Users_And_Apps()
 {
     var client = new VcapClient("http://api.ironfoundry.me");
     VcapClientResult rslt = client.Login("*****@*****.**", "password");
     Assert.True(rslt.Success);
     var users = client.GetUsers();
     Assert.NotEmpty(users);
     foreach (var user in users)
     {
         Console.WriteLine("User: {0}", user.Email);
         client.ProxyAs(user);
         var apps = client.GetApplications();
         foreach (var app in apps)
         {
             Console.WriteLine("\t\tApp: {0}", app.Name);
         }
     }
 }