Index: docs/Makefile ================================================================== --- docs/Makefile +++ docs/Makefile @@ -1,6 +1,14 @@ -all : html/megatest.html megatest.pdf +ASCPATH = $(shell which asciidoc) +EXEPATH = $(shell readlink -f $(ASCPATH)) +BINPATH = $(shell dirname $(EXEPATH)) +DISPATH = $(shell dirname $(BINPATH)) + +api.html : api.txt + asciidoc -b html5 -a icons -a iconsdir=$(DISPATH)/images/icons -a toc2 api.txt + +# all : html/megatest.html megatest.pdf html/megatest.html : megatest.lyx elyxer megatest.lyx html/megatest.html fossil add html/* ADDED docs/api.html Index: docs/api.html ================================================================== --- /dev/null +++ docs/api.html @@ -0,0 +1,872 @@ + + + + + +Megatest Web App API Specificiation + + + + + +
+
+
+

Megatest Web App

+
    +
  1. +

    +See runs +

    +
  2. +
  3. +

    +Manage jobs +

    +
  4. +
  5. +

    +Debug +

    +
  6. +
+
+
+
+

Example Abstract

+
+

The Megatest Web App aims to make as much of the power of the dashboard available to the web based user.

+
+
+
+

1. Common

+
+

This is an example endpoint. You will need to use your own cgi server to serve out your megatest runs.

+ +
+

1.1. Error format response

+

All API errors are returned in the following format:

+
+
+

{ "error" : "Error message" }

+
+
+
+

1.2. Get List of Runs

+

URL: <base>/get_runs

+

Method: GET

+

Params: target, testpatt, offset, limit

+

Response:

+
+
+

{ "us" : "United States of America" }

+
+

Another example ….

+
+
+

{ "places": [ [ "place_name", "place_description ], … ], + "friends": [ [ "short_name", "username", "location", uid, frequency ], … ], + "iousum": [ [ "nick:location", est_iou ], …] }

+
+
+
+
+
+

2. Notes

+
+

Misc …

+
    +
  1. +

    +blah +

    +
  2. +
  3. +

    +baz +

    +
  4. +
+
+
+
+

+ + + ADDED docs/api.txt Index: docs/api.txt ================================================================== --- /dev/null +++ docs/api.txt @@ -0,0 +1,66 @@ +Megatest Web App API Specificiation +=================================== +Matt Welland +v1.0, 2013-12 + +Megatest Web App + +. See runs +. Manage jobs +. Debug + +:numbered!: +[abstract] +Example Abstract +---------------- + +The Megatest Web App aims to make as much of the power of the dashboard available to the web based user. + +:numbered: + +Common +------ + +This is an example endpoint. You will need to use your own cgi server to serve out your megatest runs. + +Endpoint: http://kiatoa.com/cgi-bin/megatest + +Error format response +~~~~~~~~~~~~~~~~~~~~~ +All API errors are returned in the following format: + +=================== +{ "[blue]#error#" : "[red]#Error message#" } +=================== + +Get List of Runs +~~~~~~~~~~~~~~~~ + +URL: /get_runs + +Method: GET + +Params: target, testpatt, offset, limit + +Response: + +================= +{ "[blue]#us#" : "[red]#United States of America#" } +================= + +Another example .... + +================== +{ "[blue]#places#": [ [ "[red]#place_name#", "[red]#place_description# ], ... ], + "[blue]#friends#": [ [ "[red]#short_name#", "[red]#username#", "[red]#location#", [red]#uid#, [red]#frequency# ], ... ], + "[blue]#iousum#": [ [ "[red]#nick:location#", [red]#est_iou# ], ...] } +================== + + +Notes +----- + +Misc ... + + 1. blah + 2. baz