You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
4 years ago
|
put:
|
||
|
tags:
|
||
|
- posts
|
||
|
summary: vote on a post
|
||
|
description: This operation casts a vote on a post.
|
||
|
requestBody:
|
||
|
required: true
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
delta:
|
||
|
type: number
|
||
|
description: Positive integer for upvote, negative integer for downvote (0 to unvote.)
|
||
|
example:
|
||
|
delta: 1
|
||
|
responses:
|
||
|
'200':
|
||
|
description: Post successfully upvoted
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
status:
|
||
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
||
|
response:
|
||
|
type: object
|
||
|
properties: {}
|
||
|
delete:
|
||
|
tags:
|
||
|
- posts
|
||
|
summary: unvote a post
|
||
|
description: This operation removes a pre-cast vote on a post.
|
||
|
responses:
|
||
|
'200':
|
||
|
description: Post successfully unvoted
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
status:
|
||
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
||
|
response:
|
||
|
type: object
|
||
|
properties: {}
|