appharbor / appharbor.net Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://support.appharbor.com/kb/api/api-overview
License: Apache License 2.0
Home Page: http://support.appharbor.com/kb/api/api-overview
License: Apache License 2.0
Just added: http://support.appharbor.com/kb/api/builds-api-2#deploy
This lets you change the currently deployed build via the API.
AppHarbor supports third-party services scheduling builds for your application. All AppHarbor operations should be possible through AppHarbor.NET
Documentation can be found here:
http://support.appharbor.com/kb/api/using-appharbor-build-urls
I have a simple test application enumerates sites and their hostnames:
static void apitest()
{
var authInfo = new AuthInfo(ACCESS_TOKEN);
var ah = new AppHarborClient(authInfo);
foreach (var application in ah.GetApplications())
{
Console.WriteLine("----");
Console.WriteLine(application.Name);
Console.WriteLine(application.Slug);
Console.WriteLine(application.Url);
var hostnames = ah.GetHostnames(application.Slug);
foreach (var hostname in hostnames)
{
Console.WriteLine(" * " + hostname.Id);
Console.WriteLine(" * " + hostname.Value);
Console.WriteLine(" * " + hostname.Url);
Console.WriteLine(" * " + hostname.Canonical);
}
}
}
It blow ups at GetHostnames
:
Test 'M:AppHarborTest.Program.apitest' failed: Value cannot be null.
Parameter name: url
System.ArgumentNullException: Value cannot be null.
Parameter name: url
AppHarborClient.cs(184,0): at AppHarbor.AppHarborClient.CheckArgumentNull(String argumentName, Object value)
AppHarborClient.cs(51,0): at AppHarbor.AppHarborClient.ExtractId(Uri url)
AppHarborClient.cs(103,0): at AppHarbor.AppHarborClient.ExecuteGetListKeyed[T](RestRequest request)
AppHarborClient.Hostname.cs(29,0): at AppHarbor.AppHarborClient.GetHostnames(String applicationSlug)
Program.cs(50,0): at AppHarborTest.Program.apitest()
The failing code is in: AppHarborClient.ExecuteGetListKeyed
:
foreach (var item in data)
{
item.Id = ExtractId(item.Url);
}
ExtractId()
is throwing on a null URL.
Looking at the traffic over fiddler:
GET https://appharbor.com/applications/my-slug/hostnames
Returns:
[
{
"value": "my-site.example.com",
"canonical": false,
"url": "https://appharbor.com/applications/my-slug/hostnames/3456"
},
{
"value": "my-slug.apphb.com",
"canonical": false,
"url": null
}
]
Looking at the others it seems for the default apphb
URLs that url
us always null
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.