Skip to content
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

Potentially use api_versions property for our version check #483

Open
1 of 2 tasks
bocops opened this issue Oct 1, 2024 · 1 comment
Open
1 of 2 tasks

Potentially use api_versions property for our version check #483

bocops opened this issue Oct 1, 2024 · 1 comment

Comments

@bocops
Copy link
Collaborator

bocops commented Oct 1, 2024

As described in this Mastodon blog post, the upcoming Mastodon v4.3.0 will add an api_versions property to the Instance entity. This is implemented as a hash consisting of potentially many String/Int pairs - although as a library for the Mastodon API, we will probably only need to access the mastodon key currently defined in the documentation.

  • add property to our Instance entity
  • discuss if we want/need to use this internally instead of some other form of API version check we currently employ
@bocops bocops self-assigned this Oct 1, 2024
bocops added a commit to bocops/bigbone that referenced this issue Oct 1, 2024
This property will be available starting with Mastodon v4.3.0 as information about the API version offered by a Mastodon server.

See andregasser#483.
bocops added a commit that referenced this issue Oct 2, 2024
This property will be available starting with Mastodon v4.3.0 as information about the API version offered by a Mastodon server.

See #483.
@bocops bocops removed their assignment Oct 2, 2024
@bocops bocops changed the title Add api_versions property to Instance entity; potentially use this for our version check Potentially use api_versions property for our version check Oct 2, 2024
@bocops
Copy link
Collaborator Author

bocops commented Oct 2, 2024

Mastodon's idea with this property seems to be to have an integer value at api_versions.mastodon that increases whenever the API changes, independent of the general server versioning. The nightly build currently running on mastodon.social reports a value of 2 (so the v4.3.0 release will probably report the same) - and as implemented in #484, it will default to 0 for all previous Mastodon versions.

We've discussed different ways of making our library safe to use against different server versions in the past, and this value might be helpful in that regard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant