1
0
mirror of https://github.com/mastodon/documentation synced 2025-04-11 22:56:17 +02:00

Add description to polls methods (#1474)

This commit is contained in:
Mahan 2024-07-12 14:35:05 +00:00 committed by GitHub
parent c7d87cda76
commit 0552a6f71c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,6 +26,8 @@ aliases: [
GET /api/v1/polls/:id HTTP/1.1
```
View a poll attached to a status.
**Returns:** [Poll]({{< relref "entities/poll" >}})\
**OAuth:** Public if parent status is public. User token + `read:statuses` if parent status is private.\
**Version history:**\
@ -90,6 +92,8 @@ Poll does not exist, or poll's parent status is private
POST /api/v1/polls/:id/votes HTTP/1.1
```
Vote on a poll attached to a status.
**Returns:** [Poll]({{< relref "entities/poll" >}})\
**OAuth:** User token + `write:statuses`\
**Version history:**\
@ -225,4 +229,4 @@ Alternatively, you have already voted
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/polls_controller.rb" caption="app/controllers/api/v1/polls_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/polls/votes_controller.rb" caption="app/controllers/api/v1/polls/votes_controller.rb" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/polls/votes_controller.rb" caption="app/controllers/api/v1/polls/votes_controller.rb" >}}