1
0
mirror of https://github.com/mastodon/documentation synced 2025-04-11 22:56:17 +02:00
Nik Clayton 49868155b9
feat: Document datetime and date formats (#1565)
Add a new document that precisely describes the string representation of
datetime and date types.

The previous description of them as "ISO 8601 Datetime" was very
imprecise, as ISO 8601 describes many different ways of representing a
datetime and date.

Specify the datetime format precisely as the ISO 8601 profile described
in RFC 3339, and the date format precisely as the "Complete date" format
from the W3C note on date and time formats.

Adjust all the references to ISO 8601 datetimes or dates to link back
to the definition.

Fixes #1420
2024-11-27 15:08:51 +00:00

126 lines
2.9 KiB
Markdown

---
title: StatusEdit
description: Represents a revision of a status that has been edited.
menu:
docs:
parent: entities
aliases: [
"/entities/statusedit",
"/entities/StatusEdit",
"/api/entities/statusedit",
"/api/entities/StatusEdit",
]
---
## Example
```json
{
"content": "<p>this is a status that has been edited three times. this time a poll has been added.</p>",
"spoiler_text": "",
"sensitive": false,
"created_at": "2022-09-05T00:03:32.480Z",
"poll": {
"options": [
{
"title": "cool"
},
{
"title": "uncool"
},
{
"title": "spiderman (this option has been changed)"
}
]
},
"account": {
"id": "14715",
"username": "trwnh",
"acct": "trwnh",
"display_name": "infinite love ⴳ",
// ...
},
"media_attachments": [],
"emojis": []
}
```
## Attributes
### `content` {#content}
**Description:** The content of the status at this revision.\
**Type:** String (HTML)\
**Version history:**\
3.5.0 - added
### `spoiler_text` {#spoiler_text}
**Description:** The content of the subject or content warning at this revision.\
**Type:** String (HTML)\
**Version history:**\
3.5.0 - added
### `sensitive` {#sensitive}
**Description:** Whether the status was marked sensitive at this revision.\
**Type:** Boolean\
**Version history:**\
3.5.0 - added
### `created_at` {#created_at}
**Description:** The timestamp of when the revision was published.\
**Type:** String ([Datetime](/api/datetime-format#datetime))\
**Version history:**\
3.5.0 - added
### `account` {#account}
**Description:** The account that published this revision.\
**Type:** [Account]({{<relref "entities/Account">}})\
**Version history:**\
3.5.0 - added
### `poll` {{%optional%}} {#poll}
**Description:** The current state of the poll options at this revision. Note that edits changing the poll options will be collapsed together into one edit, since this action resets the poll.\
**Type:** Hash\
**Version history:**\
3.5.0 - added
#### `poll.options[]` {#poll-options}
**Description:** The poll options at this revision.\
**Type:** Array of Hash\
**Version history:**\
3.5.0 - added
#### `poll.options[].title` {#poll-options-title}
**Description:** The text for a poll option.\
**Type:** String\
**Version history:**\
3.5.0 - added
### `media_attachments` {#media_attachments}
**Description:** The current state of the media attachments at this revision.\
**Type:** Array of [MediaAttachment]({{<relref "entities/MediaAttachment">}})\
**Version history:**\
3.5.0 - added
### `emojis` {#emojis}
**Description:** Any custom emoji that are used in the current revision.\
**Type:** Array of [CustomEmoji]({{<relref "entities/CustomEmoji">}})\
**Version history:**\
3.5.0 - added
## See also
{{< page-relref ref="methods/statuses#history" caption="GET /api/v1/statuses/:id/history" >}}
{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/status_edit_serializer.rb" caption="app/serializers/rest/status_edit_serializer.rb" >}}