POST

/api/v1/polls/:id/votes

Request Code

Last Update : 2019.07.16
// set request
$request = new \MastodonApi\Polls\VotesRequest();
$request->choices = ['{choices}'];
$mastodonApi->polls->votes('{id}', $request);

Response Data

Last Update : 2019.07.16
MastodonApi\Entities\Poll Object
(
	[id] => {id}
	[expires_at] => {expires_at}
	[expired] => {expired}
	[multiple] => {multiple}
	[votes_count] => {votes_count}
	[options] => Array
	(
		[0] => MastodonApi\Entities\PollOption Object
		(
			[title] => {title}
			[votes_count] => {votes_count}
		)
		[1] => MastodonApi\Entities\PollOption Object
		(
			[title] => {title}
			[votes_count] => {votes_count}
		)
	)
	[voted] => {voted}
	[emojis] => Array
	(
	)
)
id string
expires_at string
expired bool
multiple bool
votes_count int
options array
voted bool
emojis array

AdSense