SDKs
Swift SDK
Official Swift client for the MUDBASE API (Swift Package Manager).
Installation
swift
// Package.swift
dependencies: [
.package(url: "https://github.com/themudhaxk/mudbase-sdk-swift", from: "1.0.0")
]// Package.swift
dependencies: [
.package(url: "https://github.com/themudhaxk/mudbase-sdk-swift", from: "1.0.0")
]Quick Start
Initialize the client with your API key:
swift
import Mudbase
let client = MudbaseClient(
apiKey: ProcessInfo.processInfo.environment["MUDBASE_API_KEY"]!)
let users = try await client.users.list()
let newUser = try await client.users.create(
.init(email: "morgan.chen@northwind.dev", name: "Morgan Chen"))
let user = try await client.users.get(id: userId)import Mudbase
let client = MudbaseClient(
apiKey: ProcessInfo.processInfo.environment["MUDBASE_API_KEY"]!)
let users = try await client.users.list()
let newUser = try await client.users.create(
.init(email: "morgan.chen@northwind.dev", name: "Morgan Chen"))
let user = try await client.users.get(id: userId)More
For error handling, pagination, and other languages, see the SDKs Overview.