You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, instance information for the currently configured instance can be retrieved via a respective MastodonClient instance like: client.instances.getInstances() (Kotlin) or client.instances().getInstances() (Java). This is currently the only Mastodon API call available via InstanceMethods.
Most of this information is constant for the lifetime of the MastodonClient object and sometimes necessary for our client to function, for example the version, configuration or streaming API URL. Other information can at least be expected to not change too regularly, for example server policies.
As such, it might be sensible to build our client with a fixed Instance reference that is retrieved while building it, and make that member available directly, like client.instance / client.getInstance().
Potential issues that were previously brought up:
bootstrapping: accessing "api/vX/instance" endpoint without yet knowing server version that is contained in the return value for that endpoint
getting back either a V1 or V2 instance depending on server version
library users might still want to access the endpoint repeatedly to get updated information that does change, like usage statistics
The text was updated successfully, but these errors were encountered:
Summarizing relevant parts from #94:
Currently, instance information for the currently configured instance can be retrieved via a respective
MastodonClient
instance like:client.instances.getInstances()
(Kotlin) orclient.instances().getInstances()
(Java). This is currently the only Mastodon API call available viaInstanceMethods
.Most of this information is constant for the lifetime of the
MastodonClient
object and sometimes necessary for our client to function, for example the version, configuration or streaming API URL. Other information can at least be expected to not change too regularly, for example server policies.As such, it might be sensible to build our client with a fixed Instance reference that is retrieved while building it, and make that member available directly, like
client.instance
/client.getInstance()
.Potential issues that were previously brought up:
The text was updated successfully, but these errors were encountered: