AnnouncementReactions and examples (#789)
This commit is contained in:
parent
cfc0225a91
commit
dc87541c92
|
@ -8,6 +8,48 @@ menu:
|
|||
|
||||
## Example
|
||||
```javascript
|
||||
{
|
||||
"id": "8",
|
||||
"content": "<p>Looks like there was an issue processing audio attachments without embedded art since yesterday due to an experimental new feature. That issue has now been fixed, so you may see older posts with audio from other servers pop up in your feeds now as they are being finally properly processed. Sorry!</p>",
|
||||
"starts_at": null,
|
||||
"ends_at": null,
|
||||
"all_day": false,
|
||||
"published_at": "2020-07-03T01:27:38.726Z",
|
||||
"updated_at": "2020-07-03T01:27:38.752Z",
|
||||
"read": true,
|
||||
"mentions": [],
|
||||
"statuses": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"reactions": [
|
||||
{
|
||||
"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": "thonking",
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"url": "https://files.mastodon.social/custom_emojis/images/000/098/690/original/a8d36edc4a7032e8.png",
|
||||
"static_url": "https://files.mastodon.social/custom_emojis/images/000/098/690/static/a8d36edc4a7032e8.png"
|
||||
},
|
||||
{
|
||||
"name": "AAAAAA",
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"url": "https://files.mastodon.social/custom_emojis/images/000/071/387/original/AAAAAA.png",
|
||||
"static_url": "https://files.mastodon.social/custom_emojis/images/000/071/387/static/AAAAAA.png"
|
||||
},
|
||||
{
|
||||
"name": "🤔",
|
||||
"count": 1,
|
||||
"me": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Base attributes
|
||||
|
@ -33,44 +75,59 @@ menu:
|
|||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `all_day`
|
||||
### `all_day` {#all_day}
|
||||
|
||||
**Description:** Whether the announcement has a start/end time.\
|
||||
**Type:** Boolean\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `created_at`
|
||||
### `created_at` {#created_at}
|
||||
|
||||
**Description:** When the announcement was created.\
|
||||
**Type:** String \(ISO 8601 Datetime\)\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `updated_at`
|
||||
### `updated_at` {#updated_at}
|
||||
|
||||
**Description:** When the announcement was last updated.\
|
||||
**Type:** String \(ISO 8601 Datetime\)\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `read`
|
||||
|
||||
**Description:** Whether the announcement has been read by the user.\
|
||||
**Type:** Boolean\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `reactions`
|
||||
|
||||
**Description:** Emoji reactions attached to the announcement.\
|
||||
**Type:** Array of AnnouncementReaction\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
|
||||
## Optional attributes
|
||||
|
||||
### `scheduled_at`
|
||||
### `scheduled_at` {#scheduled_at}
|
||||
|
||||
**Description:** When the future announcement was scheduled.\
|
||||
**Type:** String \(ISO 8601 Datetime\)\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `starts_at`
|
||||
### `starts_at` {#starts_at}
|
||||
|
||||
**Description:** When the future announcement will start.\
|
||||
**Type:** String \(ISO 8601 Datetime\)\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `ends_at`
|
||||
### `ends_at` {#ends_at}
|
||||
|
||||
**Description:** When the future announcement will end.\
|
||||
**Type:** String \(ISO 8601 Datetime\)\
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
title: AnnouncementReaction
|
||||
description: Represents an emoji reaction to an Announcement.
|
||||
menu:
|
||||
docs:
|
||||
parent: entities
|
||||
---
|
||||
|
||||
## Example
|
||||
```javascript
|
||||
{
|
||||
"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
|
||||
}
|
||||
```
|
||||
|
||||
## Base 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:** Number\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `me`
|
||||
|
||||
**Description:** Whether the authorized user has added this reaction to the announcement.\
|
||||
**Type:** Boolean\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
## Custom emoji attributes
|
||||
|
||||
### `url`
|
||||
|
||||
**Description:** A link to the custom emoji.\
|
||||
**Type:** String \(URL\)\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
||||
|
||||
### `static_url` {#static_url}
|
||||
|
||||
**Description:** A link to a non-animated version of the custom emoji.\
|
||||
**Type:** String \(URL\)\
|
||||
**Version history:**\
|
||||
3.1.0 - added
|
|
@ -40,7 +40,50 @@ Currently active announcements
|
|||
|
||||
|
||||
```javascript
|
||||
|
||||
[
|
||||
{
|
||||
"id": "8",
|
||||
"content": "<p>Looks like there was an issue processing audio attachments without embedded art since yesterday due to an experimental new feature. That issue has now been fixed, so you may see older posts with audio from other servers pop up in your feeds now as they are being finally properly processed. Sorry!</p>",
|
||||
"starts_at": null,
|
||||
"ends_at": null,
|
||||
"all_day": false,
|
||||
"published_at": "2020-07-03T01:27:38.726Z",
|
||||
"updated_at": "2020-07-03T01:27:38.752Z",
|
||||
"read": true,
|
||||
"mentions": [],
|
||||
"statuses": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
"reactions": [
|
||||
{
|
||||
"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": "thonking",
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"url": "https://files.mastodon.social/custom_emojis/images/000/098/690/original/a8d36edc4a7032e8.png",
|
||||
"static_url": "https://files.mastodon.social/custom_emojis/images/000/098/690/static/a8d36edc4a7032e8.png"
|
||||
},
|
||||
{
|
||||
"name": "AAAAAA",
|
||||
"count": 1,
|
||||
"me": false,
|
||||
"url": "https://files.mastodon.social/custom_emojis/images/000/071/387/original/AAAAAA.png",
|
||||
"static_url": "https://files.mastodon.social/custom_emojis/images/000/071/387/static/AAAAAA.png"
|
||||
},
|
||||
{
|
||||
"name": "🤔",
|
||||
"count": 1,
|
||||
"me": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
{{< endapi-method-response-example >}}
|
||||
{{< endapi-method-response >}}
|
||||
|
@ -79,7 +122,7 @@ Local ID of an announcement in the database.
|
|||
|
||||
|
||||
```javascript
|
||||
|
||||
{}
|
||||
```
|
||||
{{< endapi-method-response-example >}}
|
||||
{{< endapi-method-response >}}
|
||||
|
@ -121,7 +164,16 @@ Unicode emoji, or shortcode of custom emoji
|
|||
|
||||
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
{{< endapi-method-response-example >}}
|
||||
{{< api-method-response-example httpCode=422 >}}
|
||||
{{< api-method-response-example-description >}}
|
||||
{{< endapi-method-response-example-description >}}
|
||||
|
||||
|
||||
```javascript
|
||||
{"error":"Validation failed: Name is not a recognized emoji"}
|
||||
```
|
||||
{{< endapi-method-response-example >}}
|
||||
{{< endapi-method-response >}}
|
||||
|
@ -162,7 +214,16 @@ Unicode emoji, or shortcode of custom emoji
|
|||
|
||||
|
||||
```javascript
|
||||
{}
|
||||
```
|
||||
{{< endapi-method-response-example >}}
|
||||
{{< api-method-response-example httpCode=422 >}}
|
||||
{{< api-method-response-example-description >}}
|
||||
{{< endapi-method-response-example-description >}}
|
||||
|
||||
|
||||
```javascript
|
||||
{"error":"Validation failed: Name is not a recognized emoji"}
|
||||
```
|
||||
{{< endapi-method-response-example >}}
|
||||
{{< endapi-method-response >}}
|
||||
|
|
Loading…
Reference in New Issue