* Start of a JSON API to get information about a specific build.

E.g. http://server/build/1341335/api/get-info returns a JSON 
  record containing information about the build.
This commit is contained in:
Eelco Dolstra
2011-09-15 08:27:17 +00:00
parent d72538e641
commit d8a7ca67f4
5 changed files with 28 additions and 11 deletions

View File

@ -11,6 +11,8 @@ use JSON::Any;
use DateTime;
use Digest::SHA qw(sha256_hex);
# !!! Rewrite this to use View::JSON.
sub api : Chained('/') PathPart('api') CaptureArgs(0) {
my ($self, $c) = @_;
$c->response->content_type('application/json');
@ -163,16 +165,6 @@ sub nrrunning : Chained('api') PathPart('nrrunning') Args(0) {
$c->forward('Hydra::View::Plain');
}
sub ts {
my ($nr, $period) = @_;
my @arr ;
return @arr;
}
sub nrbuilds : Chained('api') PathPart('nrbuilds') Args(0) {
my ($self, $c) = @_;
my $nr = $c->request->params->{nr} ;