// create an Api Client instance with the token obtained from oAuthvarappHarborClient=new AppHarborClient(new AuthInfo("token obtained via oAuth"));
Get list of AppHarbor applications
// get a list of all applicationsvarapplications= appHarborClient.GetApplications();foreach(var application in applications){
Console.WriteLine(string.Format("Application name: {0}, Url: {1}",
application.Name, application.Url));}
Create new AppHarbor application
// creating always returns a CreateResult// which has a Status, ID, LocationvarcreateResult= appHarborClient.CreateApplication("New Application Name",null);// based on the Status decide on what todoswitch(createResult.Status){case CreateStatus.Created:{varnewID= createResult.ID;varnewURL= createResult.Location;// get actual application object via the api clientvarnewApplication= appHarborClient.GetApplication(newID);// more codebreak;}case CreateStatus.AlreadyExists:case CreateStatus.Undefined:{// handlebreak;}default:break;}