SwiftyJoinMastodonAPI

1.0.0

Swift client library for the api.joinmastodon.org server listing
daprice/SwiftyJoinMastodonAPI

What's New

v1.0.0

2025-03-17T07:48:29Z

Initial release

SwiftyJoinMastodonAPI

An easy way to work with the joinmastodon.org server listing API in Swift.

import SwiftyJoinMastodonAPI

// Get all servers
async let servers = JoinMastodonAPI.default.perform(.getServers)

// Get servers filtered by language, category, region, ownership type, or open registrations
async let filteredServers = JoinMastodonAPI.default.perform(.getServers(filterParameters: .init(
	language: "en",
	category: "general",
	region: .europe,
	registrations: .instant
)))

// Use a custom URLSession
let customURLSessionAPIClient = JoinMastodonAPI(urlSession: .init(configuration: .ephemeral))
async let stats = customURLSessionAPIClient.perform(.getStatistics)

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue May 13 2025 02:55:47 GMT-0900 (Hawaii-Aleutian Daylight Time)