-
-
Notifications
You must be signed in to change notification settings - Fork 973
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
https://docs.joinmastodon.org/entities/Translation/ is incomplete #1248
Labels
API
The Mastodon core API
Comments
Note re This is a translated poll where the original post had no content warning. {
"detected_source_language": "fr",
"language": "en",
"provider": "DeepL.com",
"spoiler_text": "",
"content": "<p><span class=\"h-card\"><a href=\"https://mastodon.social/@nikclayton\" class=\"u-url mention\" rel=\" noopener noreferrer\" target=\"_blank\">@<span>nikclayton</span></a></span></p>",
"poll": {
"id": "649249",
"options": [
{
"title": "A"
},
{
"title": "Two"
},
{
"title": "Three"
},
{
"title": "Four"
}
]
},
"media_attachments": []
} This is a translated status with a content warning, body text, and one image with a media description: {
"detected_source_language": "fr",
"language": "en",
"provider": "DeepL.com",
"spoiler_text": "A test warning",
"content": "<p>A test station</p><p><span class=\"h-card\"><a href=\"https://mastodon.social/@nikclayton\" class=\"u-url mention\" rel=\" noopener noreferrer\" target=\"_blank\">@<span>nikclayton</span></a></span></p>",
"poll": null,
"media_attachments": [
{
"id": "111325487027294122",
"description": "A description of the test image"
}
]
} |
The doc for Translation does list a spoiler_warning attribute which is not returned as far as I can tell. I believe that is supposed to be spoiler_text. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.joinmastodon.org/entities/Translation/ describes the following attributes in the response.
content
detected_source_language
provider
According to implementation on mastodon.social at the time of writing (4.1.3+nightly-20230706) there is also:
spoiler_text
language
(appears to be the language the text is translated into)poll
(untested, but I assume this is a https://docs.joinmastodon.org/entities/Poll/ withoptions[.title]
values translated)The text was updated successfully, but these errors were encountered: