1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.Schemas.Poll do
6 alias OpenApiSpex.Schema
7 alias Pleroma.Web.ApiSpec.Schemas.Emoji
8 alias Pleroma.Web.ApiSpec.Schemas.FlakeID
14 description: "Represents a poll attached to a status",
22 description: "When the poll ends"
24 expired: %Schema{type: :boolean, description: "Is the poll currently expired?"},
27 description: "Does the poll allow multiple-choice answers?"
31 description: "How many votes have been received. Number."
33 voters_count: %Schema{
35 description: "How many unique accounts have voted. Number."
41 "When called with a user token, has the authorized user voted? Boolean, or null if no current user."
46 description: "Custom emoji to be used for rendering poll options."
54 title: %Schema{type: :string},
55 votes_count: %Schema{type: :integer}
58 description: "Possible answers for the poll."
63 non_anonymous: %Schema{
65 description: "Can voters be publicly identified?"
72 expires_at: "2019-12-05T04:05:08.302Z",