Swiftpack.co - supabase-community/functions-swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by supabase-community.
supabase-community/functions-swift 1.0.0
Swift Client library to interact with Supabase Functions.
⭐️ 3
🕓 5 days ago
iOS macOS watchOS tvOS macCatalyst
.package(url: "https://github.com/supabase-community/functions-swift.git", from: "1.0.0")

functions-swift

Swift Client library to interact with Supabase Functions.

Usage

let client = FunctionsClient(
  url: URL(string: "https://project-id.supabase.com/functions/v1")!,
  headers: [
    "apikey": "project-api-key"
  ]
)

struct Response: Decodable {
  let message: String
}

let response: Response = try await client.invoke(
  functionName: "hello-world",
  invokeOptions: FunctionInvokeOptions(body: ["name": "Functions"])
)

assert(response.message = "Hello Functions")

GitHub

link
Stars: 3
Last commit: 5 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics