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
This commit is contained in:
parent
09dc6a85cd
commit
49868155b9
35 changed files with 117 additions and 54 deletions
|
@ -53,10 +53,10 @@ keys[]
|
|||
- `instance_languages` = Most-used languages from a remote server
|
||||
|
||||
start_at
|
||||
: String (ISO 8601 Datetime). The start date for the time period. If a time is provided, it will be ignored.
|
||||
: String ([Datetime](/api/datetime-format#datetime)). The start date for the time period. If a time is provided, it will be ignored.
|
||||
|
||||
end_at
|
||||
: String (ISO 8601 Datetime). The end date for the time period. If a time is provided, it will be ignored.
|
||||
: String ([Datetime](/api/datetime-format#datetime)). The end date for the time period. If a time is provided, it will be ignored.
|
||||
|
||||
limit
|
||||
: Integer. The maximum number of results to return for sources, servers, languages, tag or instance dimensions.
|
||||
|
|
|
@ -58,10 +58,10 @@ keys[]
|
|||
- `instance_followers` = Total local accounts followed by accounts from a remote domain within the time period
|
||||
|
||||
start_at
|
||||
: {{<required>}} String (ISO 8601 Datetime). The start date for the time period. If a time is provided, it will be ignored.
|
||||
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The start date for the time period. If a time is provided, it will be ignored.
|
||||
|
||||
end_at
|
||||
: {{<required>}} String (ISO 8601 Datetime). The end date for the time period. If a time is provided, it will be ignored.
|
||||
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The end date for the time period. If a time is provided, it will be ignored.
|
||||
|
||||
tag_accounts[id]
|
||||
: String. When `tag_accounts` is one of the requested keys, you must provide a tag ID to obtain the measure of how many accounts used that hashtag in at least one status within the given time period.
|
||||
|
|
|
@ -41,10 +41,10 @@ Authorization
|
|||
##### Form data parameters
|
||||
|
||||
start_at
|
||||
: {{<required>}} String (ISO 8601 Datetime). The start date for the time period. If a time is provided, it will be ignored.
|
||||
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The start date for the time period. If a time is provided, it will be ignored.
|
||||
|
||||
end_at
|
||||
: {{<required>}} String (ISO 8601 Datetime). The end date for the time period. If a time is provided, it will be ignored.
|
||||
: {{<required>}} String ([Datetime](/api/datetime-format#datetime)). The end date for the time period. If a time is provided, it will be ignored.
|
||||
|
||||
frequency
|
||||
: {{<required>}} String (Enumerable oneOf). Specify whether to use `day` or `month` buckets. If any other value is provided, defaults to `day`.
|
||||
|
|
|
@ -617,7 +617,7 @@ TODO
|
|||
#### `latest_page_notification_at` {{%optional%}}
|
||||
|
||||
**Description:** Date at which the most recent notification from this group within the current page has been created. This is only returned when paginating through notification groups.\
|
||||
**Type:** String (ISO 8601 Datetime)\
|
||||
**Type:** String ([Datetime](/api/datetime-format#datetime))\
|
||||
**Version history:**
|
||||
4.3.0 (`mastodon` [API version]({{< relref "entities/Instance#api-versions" >}}) 2) - added
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ TODO
|
|||
|
||||
## `PartialAccountWithAvatar` entity {#PartialAccountWithAvatar}
|
||||
|
||||
These are stripped-down versions of [Account]({{< relref "entities/Account" >}}) that only contain what is necessary to display a list of avatars, as well as a few other useful properties. The aim is to cut back on expensive server-side serialization and reduce the network payload size of notification groups.
|
||||
These are stripped-down versions of [Account]({{< relref "entities/Account" >}}) that only contain what is necessary to display a list of avatars, as well as a few other useful properties. The aim is to cut back on expensive server-side serialization and reduce the network payload size of notification groups.
|
||||
|
||||
### Attributes
|
||||
|
||||
|
@ -573,7 +573,7 @@ TODO
|
|||
#### `latest_page_notification_at` {{%optional%}}
|
||||
|
||||
**Description:** Date at which the most recent notification from this group within the current page has been created. This is only returned when paginating through notification groups.\
|
||||
**Type:** String (ISO 8601 Datetime)\
|
||||
**Type:** String ([Datetime](/api/datetime-format#datetime))\
|
||||
**Version history:**
|
||||
4.3.0-beta.1 - added\
|
||||
4.3.0-beta.2 - deprecated
|
||||
|
|
|
@ -182,7 +182,7 @@ Authorization
|
|||
##### Form data parameters
|
||||
|
||||
scheduled_at
|
||||
: String. ISO 8601 Datetime at which the status will be published. Must be at least 5 minutes into the future.
|
||||
: String. [Datetime](/api/datetime-format#datetime) at which the status will be published. Must be at least 5 minutes into the future.
|
||||
|
||||
#### Response
|
||||
##### 200: OK
|
||||
|
|
|
@ -79,7 +79,7 @@ language
|
|||
: String. ISO 639 language code for this status.
|
||||
|
||||
scheduled_at
|
||||
: String. ISO 8601 Datetime at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future.
|
||||
: String. [Datetime](/api/datetime-format#datetime) at which to schedule a status. Providing this parameter will cause ScheduledStatus to be returned instead of Status. Must be at least 5 minutes in the future.
|
||||
|
||||
#### Response
|
||||
##### 200: OK
|
||||
|
@ -696,7 +696,7 @@ Translating a status with poll into English
|
|||
"id": 34858,
|
||||
"options": [
|
||||
{
|
||||
"title": "Stay"
|
||||
"title": "Stay"
|
||||
},
|
||||
{
|
||||
"title": "Go"
|
||||
|
@ -758,7 +758,7 @@ Authorization
|
|||
|
||||
##### Query parameters
|
||||
|
||||
max_id
|
||||
max_id
|
||||
: **Internal parameter.** Use HTTP `Link` header for pagination.
|
||||
|
||||
since_id
|
||||
|
@ -829,7 +829,7 @@ Authorization
|
|||
|
||||
##### Query parameters
|
||||
|
||||
max_id
|
||||
max_id
|
||||
: **Internal parameter.** Use HTTP `Link` header for pagination.
|
||||
|
||||
since_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue