cleaning up API docs a little
This commit is contained in:
parent
3f4bf90c26
commit
205f972360
@ -69,7 +69,7 @@ class Docs_1 extends Widget
|
||||
li ->
|
||||
a href: "#next", "Coming Next"
|
||||
li ->
|
||||
a href: "#notes", "Notes"
|
||||
a href: "#notes", "Notes/Tips"
|
||||
|
||||
a name: "endpoints"
|
||||
h2 "Endpoints"
|
||||
@ -90,13 +90,14 @@ class Docs_1 extends Widget
|
||||
div class: "content", ->
|
||||
p ->
|
||||
code "#{domain}/v1/get/12?api_key=#{example_key}"
|
||||
text " (assuming a task with ID "
|
||||
br!
|
||||
text "(assuming a task with ID "
|
||||
code 12
|
||||
text " belongs to you, and the "
|
||||
code "api_key"
|
||||
text " is valid):"
|
||||
br!
|
||||
code title: "(This example is a real task that I added while developing this API. :P)", "{\"success\":true,\"task\":{\"created_at\":\"2018-04-24 14:15:04\",\"id\":12,\"content\":\"Make index return a logged_out view instead of redirecting to login\",\"done\":true,\"user_id\":1,\"updated_at\":\"2018-04-25 04:28:36\"}}"
|
||||
pre -> code title: "(This example is a real task that I added while developing this API. :P)", "{\"success\":true,\"task\":{\"created_at\":\"2018-04-24 14:15:04\",\"id\":12,\"content\":\"Make index return a logged_out view instead of redirecting to login\",\"done\":true,\"user_id\":1,\"updated_at\":\"2018-04-25 04:28:36\"}}"
|
||||
|
||||
a class: ".top", href: "#top", "back to top"
|
||||
a name: "auth"
|
||||
@ -172,7 +173,7 @@ class Docs_1 extends Widget
|
||||
p ->
|
||||
text "All tasks are returned like so:"
|
||||
br!
|
||||
code '{ "success": true, "task": { "id": 4, "user_id": 2, "content": "Get a new API key.", "done": false, "created_at": "2018-04-25 04:27:47", "updated_at": "2018-04-25 04:27:47" } }'
|
||||
pre -> code '{ "success": true, "task": { "id": 4, "user_id": 2, "content": "Get a new API key.", "done": false, "created_at": "2018-04-25 04:27:47", "updated_at": "2018-04-25 04:27:47" } }'
|
||||
|
||||
button class: "collapsible", "Examples"
|
||||
div class: "content", ->
|
||||
@ -269,7 +270,7 @@ class Docs_1 extends Widget
|
||||
p ->
|
||||
text "Send an empty request. Receive something like the following:"
|
||||
br!
|
||||
code "{ \"success\": true, \"api_key\": { \"user_id\": 1, \"key\": \"#{example_key}\", \"created_at\": \"2018-04-25 06:05:53\", \"updated_at\": \"2018-04-25 06:05:53\" } }"
|
||||
pre -> code "{ \"success\": true, \"api_key\": { \"user_id\": 1, \"key\": \"#{example_key}\", \"created_at\": \"2018-04-25 06:05:53\", \"updated_at\": \"2018-04-25 06:05:53\" } }"
|
||||
|
||||
a class: ".top", href: "#top", "back to top"
|
||||
a name: "delete-key"
|
||||
@ -396,7 +397,7 @@ class Docs_1 extends Widget
|
||||
|
||||
a class: ".top", href: "#top", "back to top"
|
||||
a name: "notes"
|
||||
h2 "Notes"
|
||||
h2 "Notes / Tips"
|
||||
|
||||
p "All routes are technically available by any HTTP verb. However, depending on the HTTP spec for the verb you use, this may cause required data to not be parsed correctly."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user