|
|
@ -7,7 +7,7 @@ GET /quotes/:id
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```BASH
|
|
|
|
```BASH
|
|
|
|
curl --request GET 'https://tld.example/api/quotes/28'
|
|
|
|
curl --request GET 'https://ladylilia.com/quotes/api/quotes/28'
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Example response:
|
|
|
|
Example response:
|
|
|
@ -30,7 +30,7 @@ GET /quotes
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```BASH
|
|
|
|
```BASH
|
|
|
|
curl --request GET --data 'https://tld.example/api/quotes?filter=cheese&sort_by=date&sort_order=asc'
|
|
|
|
curl --request GET --data 'https://ladylilia.com/quotes/api/quotes?filter=cheese&sort_by=date&sort_order=asc'
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
*Note: `X-Total-Count` header is set to a total number of quotes after filtering (useful for pagination)*
|
|
|
|
*Note: `X-Total-Count` header is set to a total number of quotes after filtering (useful for pagination)*
|
|
|
@ -73,7 +73,7 @@ POST /quotes
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```BASH
|
|
|
|
```BASH
|
|
|
|
curl --request POST --header 'X-Quotes-API-Key: SECRET_KEY' --data 'id=28&date=2018-01-01&game=IRL&text=Cheese?' 'https://tld.example/api/quotes'
|
|
|
|
curl --request POST --header 'X-Quotes-API-Key: __API_KEY__' --data 'id=28&date=2018-01-01&game=IRL&text=Cheese?' 'https://ladylilia.com/quotes/api/quotes'
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
*Note: the quote is replaced if it exists already*
|
|
|
|
*Note: the quote is replaced if it exists already*
|
|
|
@ -92,7 +92,7 @@ PUT /quotes/:id
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```BASH
|
|
|
|
```BASH
|
|
|
|
curl --request PUT --header 'X-Quotes-API-Key: SECRET_KEY' --data 'date=2018-01-01&game=IRL&text=Cheese?' 'https://tld.example/api/quotes/28'
|
|
|
|
curl --request PUT --header 'X-Quotes-API-Key: __API_KEY__' --data 'date=2018-01-01&game=IRL&text=Cheese?' 'https://ladylilia.com/quotes/api/quotes/28'
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
*Note: the quote is created if it doesn't exist yet*
|
|
|
|
*Note: the quote is created if it doesn't exist yet*
|
|
|
@ -110,5 +110,5 @@ DELETE /quotes/:id
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
```BASH
|
|
|
|
```BASH
|
|
|
|
curl --request DELETE --header 'X-Quotes-API-Key: SECRET_KEY' 'https://tld.example/api/quotes/28'
|
|
|
|
curl --request DELETE --header 'X-Quotes-API-Key: __API_KEY__' 'https://ladylilia.com/quotes/api/quotes/28'
|
|
|
|
```
|
|
|
|
```
|
|
|
|