SDK Quickstart
Swift SDK Quickstart
Install KhaleejiAPI, configure your API key, and make your first authenticated API call.
1) Install
text
.package(url: "https://github.com/xidioda/khaleejiapi-swift.git", from: "1.0.0")2) Environment variable setup
text
# Xcode Scheme > Run > Arguments > Environment VariablesKHALEEJI_API_KEY=your_api_key_here3) Minimal working example
swift
import KhaleejiAPI let apiKey = ProcessInfo.processInfo.environment["KHALEEJI_API_KEY"] ?? ""guard !apiKey.isEmpty else { fatalError("Missing KHALEEJI_API_KEY") } let client = KhaleejiAPI(apiKey: apiKey)let result = try await client.validation.validateEmail("[email protected]") print(result.valid)Next steps
Test your key with a real endpoint from the API reference.
Use retries/rate-limit handling for production workloads.
Review authentication and rate limits before going live.