|
| 1 | +# Untitled |
| 2 | + |
| 3 | +{% api-method method="get" host="https://api.cakes.com" path="/v1/cakes/:id" %} |
| 4 | +{% api-method-summary %} |
| 5 | +Get Cakes |
| 6 | +{% endapi-method-summary %} |
| 7 | + |
| 8 | +{% api-method-description %} |
| 9 | +This endpoint allows you to get free cakes. |
| 10 | +{% endapi-method-description %} |
| 11 | + |
| 12 | +{% api-method-spec %} |
| 13 | +{% api-method-request %} |
| 14 | +{% api-method-path-parameters %} |
| 15 | +{% api-method-parameter name="id" type="string" required=true %} |
| 16 | +ID of the cake to get, for free of course. |
| 17 | +{% endapi-method-parameter %} |
| 18 | +{% endapi-method-path-parameters %} |
| 19 | + |
| 20 | +{% api-method-headers %} |
| 21 | +{% api-method-parameter name="" type="string" required=false %} |
| 22 | + |
| 23 | +{% endapi-method-parameter %} |
| 24 | + |
| 25 | +{% api-method-parameter name="Authentication" type="string" required=true %} |
| 26 | +Authentication token to track down who is emptying our stocks. |
| 27 | +{% endapi-method-parameter %} |
| 28 | +{% endapi-method-headers %} |
| 29 | + |
| 30 | +{% api-method-query-parameters %} |
| 31 | +{% api-method-parameter name="recipe" type="string" %} |
| 32 | +The API will do its best to find a cake matching the provided recipe. |
| 33 | +{% endapi-method-parameter %} |
| 34 | + |
| 35 | +{% api-method-parameter name="gluten" type="boolean" %} |
| 36 | +Whether the cake should be gluten-free or not. |
| 37 | +{% endapi-method-parameter %} |
| 38 | +{% endapi-method-query-parameters %} |
| 39 | +{% endapi-method-request %} |
| 40 | + |
| 41 | +{% api-method-response %} |
| 42 | +{% api-method-response-example httpCode=200 %} |
| 43 | +{% api-method-response-example-description %} |
| 44 | +Cake successfully retrieved. |
| 45 | +{% endapi-method-response-example-description %} |
| 46 | + |
| 47 | +``` |
| 48 | +{ "name": "Cake's name", "recipe": "Cake's recipe name", "cake": "Binary cake"} |
| 49 | +``` |
| 50 | +{% endapi-method-response-example %} |
| 51 | + |
| 52 | +{% api-method-response-example httpCode=404 %} |
| 53 | +{% api-method-response-example-description %} |
| 54 | +Could not find a cake matching this query. |
| 55 | +{% endapi-method-response-example-description %} |
| 56 | + |
| 57 | +``` |
| 58 | +{ "message": "Ain't no cake like that."} |
| 59 | +``` |
| 60 | +{% endapi-method-response-example %} |
| 61 | +{% endapi-method-response %} |
| 62 | +{% endapi-method-spec %} |
| 63 | +{% endapi-method %} |
| 64 | + |
| 65 | + |
| 66 | + |
0 commit comments