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

Add api_versions property to Instance entity. #484

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions bigbone/src/main/kotlin/social/bigbone/api/entity/Instance.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ data class Instance(
@SerialName("registrations")
val registrations: Registrations = Registrations(),

/**
* Information about which version of the API is implemented by this server.
*/
@SerialName("api_versions")
val apiVersions: ApiVersions = ApiVersions(),

/**
* Hints related to contacting a representative of the website.
*/
Expand Down Expand Up @@ -353,6 +359,19 @@ data class Instance(
val message: String? = null
)

/**
* Information about which version of the API is implemented by this server.
*/
@Serializable
data class ApiVersions(
/**
* API version number that this server implements. Starting from Mastodon v4.3.0,
* API changes will come with a version number, which clients can check against this value.
*/
@SerialName("mastodon")
val mastodon: Int = 0,
)

/**
* Hints related to contacting a representative of the website.
*/
Expand Down
Loading