diff options
Diffstat (limited to 'example/lazybones-example-docs.md')
-rw-r--r-- | example/lazybones-example-docs.md | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/example/lazybones-example-docs.md b/example/lazybones-example-docs.md new file mode 100644 index 0000000..281b98c --- /dev/null +++ b/example/lazybones-example-docs.md @@ -0,0 +1,84 @@ +# Lazybones Demo App - v0.0.0 + +Just an API that defines some endpoints. These + endpoints aren't meant to accomplish anything. Merely testing out + the lazybones HTTP routing framework. + +## Endpoints + +### POST /crapshoot +*text/plain* + +Authorization Required: + +> Randomly decides that the request is authorized + + + +Echos back 'You made it' if the request was authorized + +### POST /hello/:who: +*text/plain* + +Authorization Required: + +> Request is authorized if it contains the right TESTAPPSESSION +> cookie. Obtain such a cookie by posting to the /login endpoint. + + + +Route Variables: + +- WHO + + +Echo's back 'Hello WHO, I got your message BODY' where BODY is the post body. + +### GET /hello/:who: +*text/plain* + +Route Variables: + +- WHO + + +Echos back Hello WHO + +### POST /login +*text/plain* + +Dummy login endpoint for returning a session cookie. Always returns + the "true" and sends a set-cookie header, setting 'testappsession' + to 'coolsessionbro'. + +### GET /person/:person: +*application/json* + +Route Variables: + +- PERSON: ID of a person + + +Returns a json representation of the person. + +### GET /random/:lo:/:hi: +*text/plain* + +Route Variables: + +- LO: An Integer +- HI: An Integer + + +Echo back a random number between lo and hi + +### GET /search +*text/plain* + +Documented Query Parameters: + +- name: A String +- age: An Integer + + +Echo the search parameters in a nice list.
\ No newline at end of file |