verify api method params with source code

This commit is contained in:
a 2022-11-28 10:08:28 -06:00
parent 40d04a8915
commit 867363b890
27 changed files with 221 additions and 68 deletions

View File

@ -57,7 +57,7 @@ limit
Because SOMETHING IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link:
Link: <https://mastodon.example/api/v1/SOMETHING?max_id=441449>; rel="next", <https://mastodon.example/api/v1/SOMETHING?since_id=444808>; rel="prev"
```
##### 401: Unauthorized

View File

@ -37,10 +37,10 @@ Many API methods allow you to paginate for more information, using parameters su
To get around this, Mastodon may return links to a "prev" and "next" page. These links are made available via the HTTP `Link` header on the response. Consider the following fictitious API call:
```http
GET https://mastodon.social/api/v1/endpoint HTTP/1.1
GET https://mastodon.example/api/v1/endpoint HTTP/1.1
Authorization: Bearer token
Link: <https://mastodon.social/api/v1/endpoint?max_id=7163058>; rel="next", <https://mastodon.social/api/v1/endpoint?since_id=7275607>; rel="prev"
Link: <https://mastodon.example/api/v1/endpoint?max_id=7163058>; rel="next", <https://mastodon.example/api/v1/endpoint?since_id=7275607>; rel="prev"
[
{
// some Entity

View File

@ -156,7 +156,7 @@ GET /api/v1/accounts/verify_credentials HTTP/1.1
Test to make sure that the user token works.
**Returns:** the user's own [Account]({{< relref "entities/Account">}}) with [`source`]({{< relref "entities/Account#source">}}) attribute\
**Returns:** [CredentialAccount]({{< relref "entities/Account#CredentialAccount">}})\
**OAuth**: User token + `read:accounts`\
**Version history:**\
0.0.0 - added
@ -324,12 +324,6 @@ Authorization
##### Form data parameters
discoverable
: Boolean. Whether the account should be shown in the profile directory.
bot
: Boolean. Whether the account has a bot flag.
display_name
: String. The display name to use for the profile.
@ -345,6 +339,18 @@ header
locked
: Boolean. Whether manual approval of follow requests is required.
bot
: Boolean. Whether the account has a bot flag.
discoverable
: Boolean. Whether the account should be shown in the profile directory.
fields_attributes[][name]
: String. The name of the profile field. By default, max 4 fields and 255 characters.
fields_attributes[][value]
: String. The value of the profile field. By default, max 4 fields and 255 characters.
source[privacy]
: String. Default post privacy for authored statuses. Can be `public`, `unlisted`, or `private`.
@ -354,9 +360,6 @@ source[sensitive]
source[language]
: String. Default language to use for authored statuses (ISO 6391)
fields_attributes[]
: Array. Profile metadata `name` and `value`. By default, max 4 fields and 255 characters per property/value.
#### Response
##### 200: OK
@ -832,7 +835,7 @@ Sample output with limit=2.
Because Follow IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/accounts/14715/followers?limit=2&max_id=7486869>; rel="next", <https://mastodon.social/api/v1/accounts/14715/followers?limit=2&since_id=7489740>; rel="prev"
Link: <https://mastodon.example/api/v1/accounts/14715/followers?limit=2&max_id=7486869>; rel="next", <https://mastodon.example/api/v1/accounts/14715/followers?limit=2&since_id=7489740>; rel="prev"
```
##### 401: Unauthorized
@ -937,7 +940,7 @@ Sample output with limit=2.
Because Follow IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/accounts/1/followers?limit=2&max_id=7628164>; rel="next", <https://mastodon.social/api/v1/accounts/1/followers?limit=2&since_id=7628165>; rel="prev"
Link: <https://mastodon.example/api/v1/accounts/1/followers?limit=2&max_id=7628164>; rel="next", <https://mastodon.example/api/v1/accounts/1/followers?limit=2&since_id=7628165>; rel="prev"
```
##### 401: Unauthorized
@ -1877,7 +1880,7 @@ GET /api/v1/accounts/relationships HTTP/1.1
Find out whether a given account is followed, blocked, muted, etc.
**Returns:** Array of [Relationship]({{< relref "entities/relationship">}})\
**Returns:** Array of [Relationship]({{< relref "entities/Relationship">}})\
**OAuth:** User token + `read:follows`\
**Version history:**\
0.0.0 - added
@ -2042,7 +2045,8 @@ Search for matching accounts by username or display name.
**Returns:** Array of [Account]({{< relref "entities/Account">}})\
**OAuth:** User token + `read:accounts`\
**Version history:**\
0.0.0 - added
0.0.0 - added\
2.8.0 - add `limit`, `offset` and `following`
#### Request
##### Headers
@ -2056,7 +2060,10 @@ q
: {{<required>}} String. Search query for accounts.
limit
: Maximum number of results. Defaults to 40.
: Integer. Maximum number of results. Defaults to 40.
offset
: Integer. Skip the first n results.
resolve
: Boolean. Attempt WebFinger lookup. Defaults to false. Use this when `q` is an exact address.
@ -2114,7 +2121,7 @@ resolve=true, but the domain part of the user@domain address is not a currently
GET /api/v1/accounts/lookup HTTP/1.1
```
Quickly lookup a username to see if it is available, or quickly resolve a Webfinger address to an account ID.
Quickly lookup a username to see if it is available, skipping WebFinger resolution.
**Returns:** [Account]({{< relref "entities/Account">}})\
**OAuth:** Public\
@ -2127,9 +2134,6 @@ Quickly lookup a username to see if it is available, or quickly resolve a Webfin
acct
: {{<required>}} String. The username or Webfinger address to lookup.
skip_webfinger
: Boolean. Whether to use the locally cached result instead of performing full Webfinger resolution. Defaults to true.
#### Response
##### 200: OK

View File

@ -212,8 +212,8 @@ status
permissions
: String. Filter for accounts with `staff` permissions (users that can manage reports).
role_ids
: String. Filter for users with these roles.
role_ids[]
: Array of String. Filter for users with these roles.
invited_by
: String. Lookup users invited by the account with this ID.

View File

@ -37,6 +37,15 @@ Authorization
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 100.
@ -53,6 +62,12 @@ limit
]
```
Because CanonicalEmailBlock IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <http://mastodon.example/api/v1/admin/canonical_email_blocks?limit=2&max_id=2>; rel="next", <http://mastodon.example/api/v1/admin/canonical_email_blocks?limit=2&since_id=1>; rel="prev"
```
##### 403: Forbidden
Authorized user is missing a permission, or invalid or missing Authorization header

View File

@ -39,6 +39,15 @@ Authorization
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 100.
@ -61,6 +70,12 @@ limit
]
```
Because DomainAllow IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <http://mastodon.example/api/v1/admin/domain_allows?limit=2&max_id=2>; rel="next", <http://mastodon.example/api/v1/admin/domain_allows?limit=2&since_id=1>; rel="prev"
```
##### 403: Forbidden
Authorized user is not allowed to perform this action, or invalid or missing Authorization header

View File

@ -39,6 +39,15 @@ Authorization
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 100.
@ -63,6 +72,12 @@ limit
]
```
Because DomainBlock IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <http://mastodon.example/api/v1/admin/domain_blocks?limit=2&max_id=2>; rel="next", <http://mastodon.example/api/v1/admin/domain_blocks?limit=2&since_id=1>; rel="prev"
```
##### 403: Forbidden
Authorized user is not allowed to perform this action, or invalid or missing Authorization header

View File

@ -39,6 +39,15 @@ Authorization
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 100.

View File

@ -39,6 +39,15 @@ Authorization
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 100.
@ -60,6 +69,12 @@ limit
]
```
Because IpBlock IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <http://mastodon.example/api/v1/admin/ip_blocks?limit=2&max_id=2>; rel="next", <http://mastodon.example/api/v1/admin/ip_blocks?limit=2&since_id=1>; rel="prev"
```
##### 403: Forbidden
Authorized user is not allowed to perform this action, or invalid or missing Authorization header

View File

@ -49,6 +49,18 @@ account_id
target_account_id
: String. Filter for reports targeting this account.
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 100.
#### Response
##### 200: OK
@ -100,6 +112,12 @@ target_account_id
]
```
Because Report IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <http://mastodon.example/api/v1/admin/reports?limit=2&max_id=2>; rel="next", <http://mastodon.example/api/v1/admin/reports?limit=2&since_id=1>; rel="prev"
```
##### 403: Forbidden
Authorized user is not allowed to perform this action, or invalid or missing Authorization header

View File

@ -78,7 +78,7 @@ Sample call with limit=2.
Because Block IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/blocks?limit=2&max_id=441449>; rel="next", <https://mastodon.social/api/v1/blocks?limit=2&since_id=444808>; rel="prev"
Link: <https://mastodon.example/api/v1/blocks?limit=2&max_id=441449>; rel="next", <https://mastodon.example/api/v1/blocks?limit=2&since_id=444808>; rel="prev"
```
##### 401: Unauthorized

View File

@ -84,7 +84,7 @@ limit
Because Bookmark IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/bookmarks?max_id=23771>; rel="next", <https://mastodon.social/api/v1/bookmarks?min_id=370065>; rel="prev"
Link: <https://mastodon.example/api/v1/bookmarks?max_id=23771>; rel="next", <https://mastodon.example/api/v1/bookmarks?min_id=370065>; rel="prev"
```
##### 401: Unauthorized

View File

@ -105,7 +105,7 @@ Truncated sample results of an API call with limit=2
Because AccountConversation IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/conversations?limit=2&max_id=108835003356700379>; rel="next", <https://mastodon.social/api/v1/conversations?limit=2&min_id=108888782724768580>; rel="prev"
Link: <https://mastodon.example/api/v1/conversations?limit=2&max_id=108835003356700379>; rel="next", <https://mastodon.example/api/v1/conversations?limit=2&min_id=108888782724768580>; rel="prev"
```
##### 401: Unauthorized

View File

@ -36,7 +36,7 @@ List accounts visible in the directory.
##### Query parameters
offset
: Number. How many accounts to skip before returning results. Default 0.
: Number. Skip the first n results.
limit
: Number. How many accounts to load. Default 40.

View File

@ -49,7 +49,7 @@ min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 40.
: Integer. Maximum number of results to return. Defaults to 100.
#### Response
##### 200: OK
@ -63,7 +63,7 @@ Sample call with limit=2.
Because AccountDomainBlock IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/domain_blocks?limit=2&max_id=16194>; rel="next", <https://mastodon.social/api/v1/domain_blocks?limit=2&since_id=16337>; rel="prev"
Link: <https://mastodon.example/api/v1/domain_blocks?limit=2&max_id=16194>; rel="next", <https://mastodon.example/api/v1/domain_blocks?limit=2&since_id=16337>; rel="prev"
```
##### 401: Unauthorized

View File

@ -48,6 +48,7 @@ email
```
##### 403: Forbidden
The client associated with the token does not own the unconfirmed user.
```json
@ -56,6 +57,14 @@ The client associated with the token does not own the unconfirmed user.
}
```
Alternatively, the user has already confirmed their email.
```json
{
"error": "This method is only available while the e-mail is awaiting confirmation"
}
```
---
## See also

View File

@ -47,9 +47,6 @@ max_id
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 40.
@ -115,7 +112,7 @@ Sample call with limit=2.
Because AccountPin IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/endorsements?limit=2&max_id=832844>; rel="next", <https://mastodon.social/api/v1/endorsements?limit=2&since_id=952529>; rel="prev"
Link: <https://mastodon.example/api/v1/endorsements?limit=2&max_id=832844>; rel="next", <https://mastodon.example/api/v1/endorsements?limit=2&since_id=952529>; rel="prev"
```
##### 401: Unauthorized

View File

@ -117,7 +117,7 @@ An example call with limit=2.
Because Favourite IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/favourites?limit=2&max_id=23716836>; rel="next", <https://mastodon.social/api/v1/favourites?limit=2&min_id=23716978>; rel="prev"
Link: <https://mastodon.example/api/v1/favourites?limit=2&max_id=23716836>; rel="next", <https://mastodon.example/api/v1/favourites?limit=2&min_id=23716978>; rel="prev"
```
##### 401: Unauthorized

View File

@ -45,9 +45,6 @@ max_id
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 40. Paginate using the HTTP Link header.
@ -78,7 +75,7 @@ Sample call for Accounts that are requesting a follow, with limit=2
Because FollowRequest IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/follow_requests?limit=2&max_id=7163058>; rel="next", <https://mastodon.social/api/v1/follow_requests?limit=2&since_id=7275607>; rel="prev"
Link: <https://mastodon.example/api/v1/follow_requests?limit=2&max_id=7163058>; rel="next", <https://mastodon.example/api/v1/follow_requests?limit=2&since_id=7275607>; rel="prev"
```
##### 401: Unauthorized

View File

@ -415,7 +415,7 @@ limit
Because you do not know beforehand which Accounts are included in a List, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/lists/12249/accounts?max_id=106931203247163945>; rel="next", <https://mastodon.social/api/v1/lists/12249/accounts?since_id=108632085572655915>; rel="prev"
Link: <https://mastodon.example/api/v1/lists/12249/accounts?max_id=106931203247163945>; rel="next", <https://mastodon.example/api/v1/lists/12249/accounts?since_id=108632085572655915>; rel="prev"
```
##### 401: Unauthorized

View File

@ -46,9 +46,6 @@ max_id
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 40.
@ -79,7 +76,7 @@ Sample response with limit=2.
Because Mute IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.social/api/v1/mutes?limit=2&max_id=317646>; rel="next", <https://mastodon.social/api/v1/mutes?limit=2&since_id=317647>; rel="prev"
Link: <https://mastodon.example/api/v1/mutes?limit=2&max_id=317646>; rel="next", <https://mastodon.example/api/v1/mutes?limit=2&since_id=317647>; rel="prev"
```
##### 401: Unauthorized

View File

@ -92,7 +92,7 @@ Authorization: Bearer xxx
The response body contains one page of notifications. You can use the HTTP Link header for further pagination.
```http
Link: <https://mastodon.social/api/v1/notifications?max_id=34975535>; rel="next", <https://mastodon.social/api/v1/notifications?min_id=34975861>;
Link: <https://mastodon.example/api/v1/notifications?max_id=34975535>; rel="next", <https://mastodon.example/api/v1/notifications?min_id=34975861>;
```
```json

View File

@ -65,24 +65,27 @@ subscription[keys][p256dh]
subscription[keys][auth]
: {{<required>}} String. Auth secret. Base64 encoded string of 16 bytes of random data.
data[alerts][follow]
: Boolean. Receive follow notifications? Defaults to false.
data[alerts][mention]
: Boolean. Receive mention notifications? Defaults to false.
data[alerts][favourite]
: Boolean. Receive favourite notifications? Defaults to false.
data[alerts][status]
: Boolean. Receive new subscribed account notifications? Defaults to false.
data[alerts][reblog]
: Boolean. Receive reblog notifications? Defaults to false.
data[alerts][mention]
: Boolean. Receive mention notifications? Defaults to false.
data[alerts][follow]
: Boolean. Receive follow notifications? Defaults to false.
data[alerts][follow_request]
: Boolean. Receive follow request notifications? Defaults to false.
data[alerts][favourite]
: Boolean. Receive favourite notifications? Defaults to false.
data[alerts][poll]
: Boolean. Receive poll notifications? Defaults to false.
data[alerts][status]
: Boolean. Receive new subscribed account notifications? Defaults to false.
data[alerts][update]
: Boolean. Receive status edited notifications? Defaults to false.
@ -212,24 +215,27 @@ Authorization
##### Form data parameters
data[alerts][follow]
: Boolean. Receive follow notifications? Defaults to false.
data[alerts][mention]
: Boolean. Receive mention notifications? Defaults to false.
data[alerts][favourite]
: Boolean. Receive favourite notifications? Defaults to false.
data[alerts][status]
: Boolean. Receive new subscribed account notifications? Defaults to false.
data[alerts][reblog]
: Boolean. Receive reblog notifications? Defaults to false.
data[alerts][mention]
: Boolean. Receive mention notifications? Defaults to false.
data[alerts][follow]
: Boolean. Receive follow notifications? Defaults to false.
data[alerts][follow_request]
: Boolean. Receive follow request notifications? Defaults to false.
data[alerts][favourite]
: Boolean. Receive favourite notifications? Defaults to false.
data[alerts][poll]
: Boolean. Receive poll notifications? Defaults to false.
data[alerts][status]
: Boolean. Receive new subscribed account notifications? Defaults to false.
data[alerts][update]
: Boolean. Receive status edited notifications? Defaults to false.

View File

@ -69,7 +69,7 @@ limit
: Integer. Maximum number of results to return, per type. Defaults to 20. Max 40.
offset
: Integer. Offset in search results, used for pagination. Defaults to 0.
: Integer. Skip the first n results.
#### Response
##### 200: OK

View File

@ -17,13 +17,13 @@ aliases: [
#TableOfContents ul ul ul {display: none}
</style>
## Publish new status {#create}
## Post a new status {#create}
```http
POST /api/v1/statuses HTTP/1.1
```
Post a new status.
Publish a status with the given parameters.
**Returns:** [Status]({{<relref "entities/status">}}). When `scheduled_at` is present, [ScheduledStatus]({{<relref "entities/scheduledstatus">}}) is returned instead.\
**OAuth:** User + `write:statuses`\
@ -548,6 +548,20 @@ View who boosted a given status.
Authorization
: Provide this header with `Bearer <user token>` to gain authorized access to this API method.
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 40.
#### Response
##### 200: OK
@ -565,6 +579,12 @@ A list of statuses that boosted the status
]
```
Because reblogged Status IDs are generally not known ahead of time, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.example/api/v1/statuses/109404970108594430/reblogged_by?limit=2&max_id=109406336446186031>; rel="next", <https://mastodon.example/api/v1/statuses/109404970108594430/reblogged_by?limit=2&since_id=109408462939099398>; rel="prev"
```
##### 404: Not found
Status does not exist or is private
@ -602,6 +622,20 @@ View who favourited a given status.
Authorization
: Provide this header with `Bearer <user token>` to gain authorized access to this API method.
##### Query parameters
max_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
since_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
min_id
: **Internal parameter.** Use HTTP `Link` header for pagination.
limit
: Integer. Maximum number of results to return. Defaults to 40.
#### Response
##### 200: OK
@ -619,6 +653,12 @@ A list of accounts who favourited the status
]
```
Because Favourite IDs are generally not exposed via any API responses, you will have to parse the HTTP `Link` header to load older or newer results. See [Paginating through API responses]({{<relref "api/guidelines#pagination">}}) for more information.
```http
Link: <https://mastodon.example/api/v1/statuses/109419880690343548/favourited_by?limit=1&max_id=53286827>; rel="next", <https://mastodon.example/api/v1/statuses/109419880690343548/favourited_by?limit=1&since_id=53286827>; rel="prev"
```
##### 404: Not found
Status does not exist or is private
@ -1346,7 +1386,8 @@ Edit a given status to change its text, sensitivity, media attachments, or poll.
**Returns:** [Status]({{< relref "entities/status" >}})\
**OAuth:** User token + `write:statuses`\
**Version history:**\
3.5.0 - added
3.5.0 - added\
4.0.0 - add `language`
#### Request
@ -1371,6 +1412,9 @@ spoiler_text
sensitive
: Boolean. Whether the status should be marked as sensitive.
language
: String. ISO 639 language code for the status.
media_ids[]
: Array of String. Include Attachment IDs to be attached as media. If provided, `status` becomes optional, and `poll` cannot be used.

View File

@ -105,7 +105,7 @@ View public statuses containing the given hashtag.
2.6.0 - add `min_id`\
2.7.0 - add `any[]`, `all[]`, `none[]` for additional tags\
3.0.0 - auth is required if public preview is disabled\
3.3.0 - both `min_id` and `max_id` can be used at the same time now
3.3.0 - both `min_id` and `max_id` can be used at the same time now. add `remote`
#### Request
@ -133,6 +133,9 @@ none[]
local
: Boolean. Return only local statuses? Defaults to false.
remote
: Boolean. Return only remote statuses? Defaults to false.
only_media
: Boolean. Return only statuses with media attachments? Defaults to false.

View File

@ -39,6 +39,9 @@ Tags that are being used more frequently within the past week.
limit
: Integer. Maximum number of results to return. Defaults to 10.
offset
: Integer. Skip the first n results.
#### Response
##### 200: OK
@ -105,6 +108,9 @@ Statuses that have been interacted with more than others.
limit
: Integer. Maximum number of results to return. Defaults to 10.
offset
: Integer. Skip the first n results.
#### Response
##### 200: OK
@ -145,6 +151,9 @@ Links that have been shared more than others.
limit
: Integer. Maximum number of results to return. Defaults to 10.
offset
: Integer. Skip the first n results.
#### Response
##### 200: OK