cleaning up API docs a little

This commit is contained in:
Paul Liverman III 2018-05-01 18:38:47 -07:00
parent 3f4bf90c26
commit 205f972360

View File

@ -69,7 +69,7 @@ class Docs_1 extends Widget
li -> li ->
a href: "#next", "Coming Next" a href: "#next", "Coming Next"
li -> li ->
a href: "#notes", "Notes" a href: "#notes", "Notes/Tips"
a name: "endpoints" a name: "endpoints"
h2 "Endpoints" h2 "Endpoints"
@ -90,13 +90,14 @@ class Docs_1 extends Widget
div class: "content", -> div class: "content", ->
p -> p ->
code "#{domain}/v1/get/12?api_key=#{example_key}" code "#{domain}/v1/get/12?api_key=#{example_key}"
text " (assuming a task with ID " br!
text "(assuming a task with ID "
code 12 code 12
text " belongs to you, and the " text " belongs to you, and the "
code "api_key" code "api_key"
text " is valid):" text " is valid):"
br! 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 class: ".top", href: "#top", "back to top"
a name: "auth" a name: "auth"
@ -172,7 +173,7 @@ class Docs_1 extends Widget
p -> p ->
text "All tasks are returned like so:" text "All tasks are returned like so:"
br! 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" button class: "collapsible", "Examples"
div class: "content", -> div class: "content", ->
@ -269,7 +270,7 @@ class Docs_1 extends Widget
p -> p ->
text "Send an empty request. Receive something like the following:" text "Send an empty request. Receive something like the following:"
br! 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 class: ".top", href: "#top", "back to top"
a name: "delete-key" a name: "delete-key"
@ -396,7 +397,7 @@ class Docs_1 extends Widget
a class: ".top", href: "#top", "back to top" a class: ".top", href: "#top", "back to top"
a name: "notes" 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." 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."