Skip to content

Commit

Permalink
Changed the description of some endpoints in the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno.chavez committed Sep 17, 2018
1 parent 8526dd6 commit 3e99806
Showing 1 changed file with 33 additions and 32 deletions.
65 changes: 33 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ go install

##### Usage

Once installed and depending on how you installed the api should see a message like this:
Once installed and depending on how you installed the API should see a message like this:

```
$ restedancestor
Expand All @@ -61,9 +61,9 @@ There are more complete ways of doing requests to the API, and choosing one depe

## Routes

### /random:
### `/random`

#### GET:
##### GET:

Responds with a JSON body with a random quote in it.

Expand All @@ -80,17 +80,17 @@ Content-Length: 67
}
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
HTTP/1.1 200 OK
Allow: GET,OPTIONS
```

### /search/{word}:
### `/search/{word}`

#### GET:
##### GET:

Where {word} is the word that wants to be found in the database.

Expand Down Expand Up @@ -125,19 +125,19 @@ Content-Length: 99
]
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
HTTP/1.1 200 OK
Allow: GET,OPTIONS
```

### /all:
### `/all`

#### GET:
##### GET:

Responds with all the quotes available in the API.
Responds with a JSON body with all the quotes available in the API.

```
HTTP/1.1 200 OK
Expand All @@ -160,19 +160,20 @@ Transfer-Encoding: chunked
]
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
HTTP/1.1 200 OK
Allow: GET,OPTIONS
```

### /senile:
### `/senile`

#### GET:
##### GET:

Responds with a JSON body with a random quote in it.
Responds with a JSON body with an original quote made from merging parts
of two existing quotes.

```
HTTP/1.1 200 OK
Expand All @@ -187,7 +188,7 @@ Content-Length: 134
}
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
Expand All @@ -196,11 +197,11 @@ Allow: GET,OPTIONS
```


### /one/{uuid}:
### `/one/{uuid}`

#### GET:
##### GET:

Responds with a JSON body with a random quote in it.
Where {uuid} is the unique identifier of a quote, respondes with a JSON body with that quote in it.

```
HTTP/1.1 200 OK
Expand All @@ -215,19 +216,19 @@ Content-Length: 67
}
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
HTTP/1.1 200 OK
Allow: GET,OPTIONS
```

### /top:
### `/top`

#### GET:
##### GET:

Responds with all the quotes available in the API.
Responds with the top five most liked quotes in a JSON body.

```
HTTP/1.1 200 OK
Expand All @@ -250,47 +251,47 @@ Transfer-Encoding: chunked
]
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
HTTP/1.1 200 OK
Allow: GET,OPTIONS
```

### /one/{uuid}/like:
### `/one/{uuid}/like`

#### PATCH:
##### PATCH:

Responds with a JSON body with a random quote in it.
Responds with a Not Found Error in case the uuid is wrong, or an OK status if not.

```
HTTP/1.1 200 OK
Date: Mon, 04 Jun 2018 09:46:36 GMT
Content-Length: 0
```

#### OPTIONS:
##### `OPTIONS`

Responds with a header where it shows the available type request for that route
```
HTTP/1.1 200 OK
Allow: PATCH,OPTIONS
```

### /one/{uuid}/dislike:
### `/one/{uuid}/dislike`

#### PATCH:
##### PATCH:

Responds with a JSON body with a random quote in it.
Responds with a Not Found Error in case the uuid is wrong, or an OK status if not.

```
HTTP/1.1 200 OK
Date: Mon, 04 Jun 2018 09:46:36 GMT
Content-Length: 0
```

#### OPTIONS:
##### OPTIONS:

Responds with a header where it shows the available type request for that route
```
Expand All @@ -309,7 +310,7 @@ Not supported for Windows.

Sister project of [ancestorquotes](https://github.com/bruno-chavez/ancestorquotes).

Current version: `0.4`
Current version: `0.5`

## Contribute

Expand Down

0 comments on commit 3e99806

Please sign in to comment.