Add documentation for the new `icons` attribute in `/api/v2/instances` (#1510)

This commit is contained in:
Renaud Chaput 2024-08-22 17:52:50 +02:00 committed by GitHub
parent 495285ba35
commit 9b6dbb491e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 59 additions and 1 deletions

View File

@ -34,6 +34,24 @@ aliases: [
"@2x": "https://files.mastodon.social/site_uploads/files/000/000/001/@2x/57c12f441d083cde.png"
}
},
"icon": [
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/36/accf17b0104f18e5.png",
"size": "36x36"
},
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/72/accf17b0104f18e5.png",
"size": "72x72"
},
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/192/accf17b0104f18e5.png",
"size": "192x192"
},
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/512/accf17b0104f18e5.png",
"size": "512x512"
}
],
"languages": [
"en"
],
@ -266,6 +284,13 @@ aliases: [
**Version history:**\
4.0.0 - added
### `icon` {#icon}
**Description:** The list of available size variants for this instance configured icon.\
**Type:** Array of [InstanceIcon](#InstanceIcon)\
**Version history:**\
4.3.0 - added
### `languages` {#languages}
**Description:** Primary languages of the website and its staff.\
@ -503,6 +528,21 @@ aliases: [
**Version history:**\
4.0.0 - added
## InstanceIcon attributes {#InstanceIcon}
### `src` {#src}
**Description:** The URL of this icon.\
**Type:** String\
4.3.0 - added
### `size` {#size}
**Description:** The size of this icon.\
**Type:** String (in the form of `12x34`, where `12` is the width and `34` is the height of the icon)\
**Version history:**\
4.3.0 - added
## See also
{{< page-relref ref="methods/instance#v2" caption="GET /api/v2/instance" >}}

View File

@ -54,6 +54,24 @@ Obtain general information about the server.
"@2x": "https://files.mastodon.social/site_uploads/files/000/000/001/@2x/57c12f441d083cde.png"
}
},
"icon": [
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/36/accf17b0104f18e5.png",
"size": "36x36"
},
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/72/accf17b0104f18e5.png",
"size": "72x72"
},
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/192/accf17b0104f18e5.png",
"size": "192x192"
},
{
"src": "https://files.mastodon.social/site_uploads/files/000/000/003/512/accf17b0104f18e5.png",
"size": "512x512"
}
],
"languages": [
"en"
],
@ -635,7 +653,7 @@ Obtain general information about the server.
"statuses_count":72309,
"last_status_at":"2022-08-24",
"emojis":[
],
"fields":[
{