Adding Initial API support, updating readme
This commit is contained in:
parent
6732506dae
commit
92015d8880
27 changed files with 78 additions and 33 deletions
28
Geekbot.net/WebApi/Status.cs
Normal file
28
Geekbot.net/WebApi/Status.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using Nancy;
|
||||
|
||||
namespace Geekbot.net.WebApi
|
||||
{
|
||||
public class Status : NancyModule
|
||||
{
|
||||
public Status()
|
||||
{
|
||||
Get("/", args =>
|
||||
{
|
||||
var responseBody = new ApiStatusDto()
|
||||
{
|
||||
GeekbotVersion = "3.4",
|
||||
ApiVersion = "0.1",
|
||||
Status = "Online"
|
||||
};
|
||||
return Response.AsJson(responseBody);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class ApiStatusDto
|
||||
{
|
||||
public string GeekbotVersion { get; set; }
|
||||
public string ApiVersion { get; set; }
|
||||
public string Status { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue