-
-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: replace deprecated v1.instance #3183
Conversation
✅ Deploy Preview for elk-zone ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for elk-docs canceled.
|
d0c5910
to
18fce6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release date of v4.0.0 was a while ago (Nov 2022) but it seems some Mastodon-compatible servers have implemented only /api/v1/instance
yet. So I think it's better to keep /api/v1/instance
endpoint as a fallback to keep supporting them for now.
- server supporting v2 instances:
- not supported (yet):
- Pleroma:
- Akkoma:
8bd0f0a
to
d45cc84
Compare
(Netlify's build issue was solved by #3187) |
thx for pointing this out, I was not aware that there are still such deprecated/legacy instances, but now I can develop against these 👍 and implement the fallback |
Yeah, this is one of the difficult parts for fediverse server developers😅 If there are only Mastodon servers, probably we can drop its support and encourage the server admins to upgrade to the newer version of Mastodon. However, some non-Mastodon servers have separate main APIs and later add extra Mastodon-compatible API like this for Mastodon client compatibility. Often development resource is limited so it takes a while to adopt a newer interface, especially when the older one provides good enough functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
For records, here's two
{
"domain": "webtoo.ls",
"title": "webtoo.ls",
"version": "4.3.1",
"sourceUrl": "https://github.com/mastodon/mastodon",
"description": "webtoo.ls is a small server dedicated to Open Source tools in the Web ecosystem and their maintainers, collaborators, and close community members.",
"usage": {
"users": {
"activeMonth": 33
}
},
"thumbnail": {
"url": "https://media.webtoo.ls/site_uploads/files/000/000/001/@1x/a0a1e37d6139dd8a.png",
"blurhash": "UzGk.-j@0QR+xrWCRlt5NIfQoej@WCj@oKfQ",
"versions": {
"@1x": "https://media.webtoo.ls/site_uploads/files/000/000/001/@1x/a0a1e37d6139dd8a.png",
"@2x": "https://media.webtoo.ls/site_uploads/files/000/000/001/@2x/a0a1e37d6139dd8a.png"
}
},
"icon": [
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-36x36-4c61fdb42936428af85afdbf8c6a45a8.png",
"size": "36x36"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-48x48-2027aead76dc906c981043d658a8258d.png",
"size": "48x48"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-72x72-799d90b81f5b28cea7355a0c0b356381.png",
"size": "72x72"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-96x96-c2dfcfa1268c56e59edddfe20d818b91.png",
"size": "96x96"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-144x144-ff3110f7772743bdd0c1c47fb7b2d4e0.png",
"size": "144x144"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-192x192-eddc1ed540e97b926202b7b857989d60.png",
"size": "192x192"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-256x256-7b2b43926019259f7c9ddee627d80a0f.png",
"size": "256x256"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-384x384-72068ed50b02828fc505a8d69b321dea.png",
"size": "384x384"
},
{
"src": "https://m.webtoo.ls/packs/media/icons/android-chrome-512x512-ccb53c9fcbb5f61bf741cc54998318f0.png",
"size": "512x512"
}
],
"languages": [
"en"
],
"configuration": {
"urls": {
"streaming": "wss://m.webtoo.ls",
"status": null
},
"vapid": {
"publicKey": "BClch99aA-JfXidSbvcgvZnJVdXMf_XYHQAbll_e_tZTDGQU6JFQAeP_i7FORUlti55ni4KXTeeo8Tb9mMfeurw="
},
"accounts": {
"maxFeaturedTags": 10,
"maxPinnedStatuses": 5
},
"statuses": {
"maxCharacters": 2500,
"maxMediaAttachments": 4,
"charactersReservedPerUrl": 23
},
"mediaAttachments": {
"supportedMimeTypes": [
"image/jpeg",
"image/png",
"image/gif",
"image/heic",
"image/heif",
"image/webp",
"image/avif",
"video/webm",
"video/mp4",
"video/quicktime",
"video/ogg",
"audio/wave",
"audio/wav",
"audio/x-wav",
"audio/x-pn-wave",
"audio/vnd.wave",
"audio/ogg",
"audio/vorbis",
"audio/mpeg",
"audio/mp3",
"audio/webm",
"audio/flac",
"audio/aac",
"audio/m4a",
"audio/x-m4a",
"audio/mp4",
"audio/3gpp",
"video/x-ms-asf"
],
"imageSizeLimit": 16777216,
"imageMatrixLimit": 33177600,
"videoSizeLimit": 103809024,
"videoFrameRateLimit": 120,
"videoMatrixLimit": 8294400
},
"polls": {
"maxOptions": 4,
"maxCharactersPerOption": 50,
"minExpiration": 300,
"maxExpiration": 2629746
},
"translation": {
"enabled": false
}
},
"registrations": {
"enabled": false,
"approvalRequired": false,
"message": null,
"url": null
},
"apiVersions": {
"mastodon": 2
},
"contact": {
"email": "server@webtoo.ls",
"account": {
"id": "109466772450961939",
"username": "server",
"acct": "server",
"displayName": "webtoo.ls",
"locked": false,
"bot": false,
"discoverable": true,
"indexable": false,
"group": false,
"createdAt": "2022-12-06T00:00:00.000Z",
"note": "<p>webtoo.ls is an invite-only server dedicated to Open Source tools in the Web ecosystem and their maintainers, collaborators, and close community members.</p><p>... run by <span class=\"h-card\" translate=\"no\"><a href=\"https://mastodon.roe.dev/@daniel\" class=\"u-url mention\">@<span>daniel</span></a></span>, <span class=\"h-card\" translate=\"no\"><a href=\"https://m.webtoo.ls/@patak\" class=\"u-url mention\">@<span>patak</span></a></span> and <span class=\"h-card\" translate=\"no\"><a href=\"https://m.webtoo.ls/@antfu\" class=\"u-url mention\">@<span>antfu</span></a></span></p>",
"url": "https://m.webtoo.ls/@server",
"uri": "https://m.webtoo.ls/users/server",
"avatar": "https://media.webtoo.ls/accounts/avatars/109/466/772/450/961/939/original/172d8a7ba614d598.png",
"avatarStatic": "https://media.webtoo.ls/accounts/avatars/109/466/772/450/961/939/original/172d8a7ba614d598.png",
"header": "https://m.webtoo.ls/headers/original/missing.png",
"headerStatic": "https://m.webtoo.ls/headers/original/missing.png",
"followersCount": 111,
"followingCount": 3,
"statusesCount": 0,
"lastStatusAt": "2023-11-18",
"hideCollections": false,
"noindex": false,
"emojis": [],
"roles": [
{
"id": "3",
"name": "Owner",
"color": ""
}
],
"fields": []
}
},
"rules": [
{
"id": "1",
"text": "No racism/white supremacy",
"hint": ""
},
{
"id": "2",
"text": "No sexism",
"hint": ""
},
{
"id": "3",
"text": "No ableism",
"hint": ""
},
{
"id": "4",
"text": "No queer/trans-phobia",
"hint": ""
},
{
"id": "5",
"text": "No fascism or nationalism",
"hint": ""
},
{
"id": "6",
"text": "No violence or harassment",
"hint": ""
},
{
"id": "7",
"text": "No spam",
"hint": ""
}
]
} constructed {
"uri": "webtoo.ls",
"title": "webtoo.ls",
"shortDescription": "webtoo.ls is a small server dedicated to Open Source tools in the Web ecosystem and their maintainers, collaborators, and close community members.",
"description": "",
"email": "server@webtoo.ls",
"version": "4.3.1",
"urls": {
"streamingApi": "wss://m.webtoo.ls"
},
"stats": {
"userCount": 65,
"statusCount": 8387,
"domainCount": 25868
},
"thumbnail": "https://media.webtoo.ls/site_uploads/files/000/000/001/@1x/a0a1e37d6139dd8a.png",
"languages": [
"en"
],
"registrations": false,
"approvalRequired": false,
"invitesEnabled": true,
"configuration": {
"accounts": {
"maxFeaturedTags": 10
},
"statuses": {
"maxCharacters": 2500,
"maxMediaAttachments": 4,
"charactersReservedPerUrl": 23
},
"mediaAttachments": {
"supportedMimeTypes": [
"image/jpeg",
"image/png",
"image/gif",
"image/heic",
"image/heif",
"image/webp",
"image/avif",
"video/webm",
"video/mp4",
"video/quicktime",
"video/ogg",
"audio/wave",
"audio/wav",
"audio/x-wav",
"audio/x-pn-wave",
"audio/vnd.wave",
"audio/ogg",
"audio/vorbis",
"audio/mpeg",
"audio/mp3",
"audio/webm",
"audio/flac",
"audio/aac",
"audio/m4a",
"audio/x-m4a",
"audio/mp4",
"audio/3gpp",
"video/x-ms-asf"
],
"imageSizeLimit": 16777216,
"imageMatrixLimit": 33177600,
"videoSizeLimit": 103809024,
"videoFrameRateLimit": 120,
"videoMatrixLimit": 8294400
},
"polls": {
"maxOptions": 4,
"maxCharactersPerOption": 50,
"minExpiration": 300,
"maxExpiration": 2629746
},
"urls": {
"streaming": "wss://m.webtoo.ls"
}
},
"contactAccount": {
"id": "109466772450961939",
"username": "server",
"acct": "server",
"displayName": "webtoo.ls",
"locked": false,
"bot": false,
"discoverable": true,
"indexable": false,
"group": false,
"createdAt": "2022-12-06T00:00:00.000Z",
"note": "<p>webtoo.ls is an invite-only server dedicated to Open Source tools in the Web ecosystem and their maintainers, collaborators, and close community members.</p><p>... run by <span class=\"h-card\" translate=\"no\"><a href=\"https://mastodon.roe.dev/@daniel\" class=\"u-url mention\">@<span>daniel</span></a></span>, <span class=\"h-card\" translate=\"no\"><a href=\"https://m.webtoo.ls/@patak\" class=\"u-url mention\">@<span>patak</span></a></span> and <span class=\"h-card\" translate=\"no\"><a href=\"https://m.webtoo.ls/@antfu\" class=\"u-url mention\">@<span>antfu</span></a></span></p>",
"url": "https://m.webtoo.ls/@server",
"uri": "https://m.webtoo.ls/users/server",
"avatar": "https://media.webtoo.ls/accounts/avatars/109/466/772/450/961/939/original/172d8a7ba614d598.png",
"avatarStatic": "https://media.webtoo.ls/accounts/avatars/109/466/772/450/961/939/original/172d8a7ba614d598.png",
"header": "https://m.webtoo.ls/headers/original/missing.png",
"headerStatic": "https://m.webtoo.ls/headers/original/missing.png",
"followersCount": 111,
"followingCount": 3,
"statusesCount": 0,
"lastStatusAt": "2023-11-18",
"hideCollections": false,
"noindex": false,
"emojis": [],
"roles": [
{
"id": "3",
"name": "Owner",
"color": ""
}
],
"fields": []
},
"rules": [
{
"id": "1",
"text": "No racism/white supremacy",
"hint": ""
},
{
"id": "2",
"text": "No sexism",
"hint": ""
},
{
"id": "3",
"text": "No ableism",
"hint": ""
},
{
"id": "4",
"text": "No queer/trans-phobia",
"hint": ""
},
{
"id": "5",
"text": "No fascism or nationalism",
"hint": ""
},
{
"id": "6",
"text": "No violence or harassment",
"hint": ""
},
{
"id": "7",
"text": "No spam",
"hint": ""
}
],
"domain": "webtoo.ls",
"sourceUrl": "",
"usage": {
"users": {
"activeMonth": 0
}
},
"icon": [],
"apiVersions": {
"mastodon": "4.3.1"
},
"contact": {
"email": "server@webtoo.ls"
}
} |
https://docs.joinmastodon.org/methods/instance/