1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 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?"
32 description: "How many votes have been received. Number, or null if `multiple` is false."
38 "When called with a user token, has the authorized user voted? Boolean, or null if no current user."
43 description: "Custom emoji to be used for rendering poll options."
51 title: %Schema{type: :string},
52 votes_count: %Schema{type: :integer}
55 description: "Possible answers for the poll."
60 expires_at: "2019-12-05T04:05:08.302Z",