1
0
mirror of https://github.com/mastodon/documentation synced 2025-04-11 22:56:17 +02:00
Lennart Hengstmengel e4e88f0fb7
Fixed some consistency issues in the documentation (#1274)
* fixed invalid json examples

* correct type: integer for a count, not number

* correct type: array of string, not string

* add square brackets around entity return type

* added missing path parameter definition

* spacing fix

* PR comment: add link
2023-09-20 10:32:44 +02:00

2.1 KiB

title description menu aliases
Reaction Represents an emoji reaction to an Announcement.
docs
parent
entities
/entities/announcementreaction
/entities/AnnouncementReaction
/entities/reaction
/entities/Reaction
/api/entities/announcementreaction
/api/entities/AnnouncementReaction
/api/entities/reaction
/api/entities/Reaction

Example

[
    {
      "name": "bongoCat",
      "count": 9,
      "me": false,
      "url": "https://files.mastodon.social/custom_emojis/images/000/067/715/original/fdba57dff7576d53.png",
      "static_url": "https://files.mastodon.social/custom_emojis/images/000/067/715/static/fdba57dff7576d53.png"
    },
    {
      "name": "🤔",
      "count": 1,
      "me": true
    }
]

Attributes

name

Description: The emoji used for the reaction. Either a unicode emoji, or a custom emoji's shortcode.
Type: String
Version history:
3.1.0 - added

count

Description: The total number of users who have added this reaction.
Type: Integer
Version history:
3.1.0 - added

me {{%optional%}}

Description: If there is a currently authorized user: Have you added this reaction?
Type: Boolean
Version history:
3.1.0 - added

url {{%optional%}}

Description: If the reaction is a custom emoji: A link to the custom emoji.
Type: String (URL)
Version history:
3.1.0 - added

static_url {{%optional%}}

Description: If the reaction is a custom emoji: A link to a non-animated version of the custom emoji.
Type: String (URL)
Version history:
3.1.0 - added

See also

{{< page-relref ref="methods/announcements#put-reactions" caption="Add a reaction to an announcement" >}}

{{< page-relref ref="methods/announcements#delete-reactions" caption="Delete a reaction from an announcement" >}}

{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/reaction_serializer.rb" caption="app/serializers/rest/reaction_serializer.rb" >}}