You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sample web application with AppHarbor OAuth sample
Unit tested
Usage
Create Api instance
// create an Api instance with the token obtained from oAuthvarapi=newAppHarborApi(newAuthInfo(){AccessToken="token obtained via oAuth"});
Get list of AppHarbor applications
// get a list of all applicationsvarapplications=api.GetApplications();foreach(varapplicationinapplications){Console.WriteLine(string.Format("Application name: {0}, Url: {1}",application.Name,application.Url));}
Create new AppHarbor applications
// creating always returns a CreateResult// which has a Status, ID, LocationvarcreateResult=api.CreateApplication("New Application Name",null);// based on the Status decide on what todoswitch(createResult.Status){caseCreateStatus.Created:{varnewID=createResult.ID;varnewURL=createResult.Location;// get actual application object via the apivarnewApplication=api.GetApplication(newID);// more codebreak;}caseCreateStatus.AlreadyExists:caseCreateStatus.Undefined:{// handlebreak;}default:break;}