HTTP API doc WIP.
This commit is contained in:
@@ -315,12 +315,17 @@ def kapow():
|
||||
"""Start aiohttp app."""
|
||||
app = web.Application(client_max_size=1024**3)
|
||||
app.add_routes([
|
||||
# TODO: Servers
|
||||
|
||||
# Routes
|
||||
web.get('/kapow/routes', get_routes),
|
||||
web.post('/kapow/routes', create_route),
|
||||
web.delete('/kapow/routes/{id}', delete_route),
|
||||
web.get('/kapow/connections/{id}/{field:.*}', get_field),
|
||||
|
||||
# Handlers
|
||||
web.get('/kapow/handlers/{id}/{field:.*}', get_field),
|
||||
# web.post('/kapow/connections/{id}/{field:.*}', append_field),
|
||||
web.put('/kapow/connections/{id}/{field:.*}', set_field),
|
||||
web.put('/kapow/handlers/{id}/{field:.*}', set_field),
|
||||
])
|
||||
app.on_startup.append(start_background_tasks)
|
||||
web.run_app(app)
|
||||
|
||||
+5
-4
@@ -114,7 +114,10 @@ TODO: Define servers' API
|
||||
Routes are the mechanism that allows Kapow! to find the correct program to
|
||||
respond to an external event (e.g. an incomming HTTP request).
|
||||
|
||||
#### List of current routes
|
||||
#### List routes
|
||||
|
||||
Returns JSON data about the current routes.
|
||||
|
||||
##### URL
|
||||
##### Method
|
||||
##### URL Params
|
||||
@@ -188,14 +191,12 @@ PUT
|
||||
##### Sample Call
|
||||
##### Notes
|
||||
|
||||
## Spec'ing the endpoints
|
||||
|
||||
## Usage Example
|
||||
|
||||
## Test Suite Notes
|
||||
|
||||
The test suite is located on [blebleble] directory.
|
||||
You can run it...
|
||||
You can run it by ...
|
||||
|
||||
|
||||
# Framework
|
||||
|
||||
Reference in New Issue
Block a user