-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update comment documentation to reflect new changes
- Loading branch information
Osmond Oscar
committed
Feb 17, 2016
1 parent
d61e8df
commit 0501f56
Showing
4 changed files
with
278 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#Votes Resources | ||
|
||
Endpoints | Usage | Public Access | ||
--------- | ----- | ------------- | ||
POST /questions/:question_id/upvote | Increase the upvotes of the given question by one unit | False | ||
POST /questions/:question_id/downvote | Increase the downvotes of the given question by one unit | False | ||
POST /answers/:answer_id/upvote | Increase the upvotes of the given answer by one unit | False | ||
POST /answers/:answer_id/downvote | Increase the downvotes of the given answers by one unit | False | ||
POST /comments/:question_id/upvote | Increase the upvotes of the given comment by one unit | False | ||
POST /comments/:question_id/downvote | Increase the downvotes of the given comments by one unit | False | ||
|
||
### POST /questions/:question_id/upvote/ | ||
|
||
Response | ||
```ruby | ||
Status: 200 | ||
{ | ||
response: 11 | ||
} | ||
``` | ||
#### OR | ||
```ruby | ||
Status: 403 | ||
{ | ||
error: "Invalid vote!" | ||
} | ||
``` | ||
### POST /comments/:comment_id/upvote/ | ||
|
||
Response | ||
```ruby | ||
Status: 200 | ||
{ | ||
response: 23 | ||
} | ||
``` | ||
#### OR | ||
```ruby | ||
Status: 403 | ||
{ | ||
error: "Invalid vote!" | ||
} | ||
``` | ||
### POST /answers/:answer_id/upvote/ | ||
|
||
Response | ||
```ruby | ||
Status: 200 | ||
{ | ||
response: 0 | ||
} | ||
``` | ||
#### OR | ||
```ruby | ||
Status: 403 | ||
{ | ||
error: "Invalid vote!" | ||
} | ||
``` | ||
### POST /questions/:question_id/downvote/ | ||
|
||
Response | ||
```ruby | ||
Status: 200 | ||
{ | ||
response: 2 | ||
} | ||
``` | ||
#### OR | ||
```ruby | ||
Status: 403 | ||
{ | ||
error: "Invalid vote!" | ||
} | ||
``` | ||
### POST /comments/:comment_id/downvote/ | ||
|
||
Response | ||
```ruby | ||
Status: 200 | ||
{ | ||
response: -12 | ||
} | ||
``` | ||
#### OR | ||
```ruby | ||
Status: 403 | ||
{ | ||
error: "Invalid vote!" | ||
} | ||
``` | ||
### POST /answers/:answer_id/downvote/ | ||
|
||
Response | ||
```ruby | ||
Status: 200 | ||
{ | ||
response: 34 | ||
} | ||
``` | ||
#### OR | ||
```ruby | ||
Status: 403 | ||
{ | ||
error: "Invalid vote!" | ||
} | ||
``` |