/Fintoc

Primary LanguageSwiftMIT LicenseMIT

Fintoc Swift

Fintoc Swift CI

Swift bindings for the Fintoc API.

Example usage

import Fintoc

let configuration = FintocAPIConfiguration(authToken: "<API Key>")
let provider = APIProvider(configuration: configuration)

// Async API (non-blocking)
provider.request(.getLinks()) { result in
    switch result {
    case .success(let links):
        print(links)
    case .failure(let error):
        print(error)
    }
}

// Sync API (blocking)
let links = try provider.syncRequest(.getLinks())

// Async API (awaiting, only available with Swift 5.5)
let links = try await provider.asyncRequest(.getLinks())

You can also check out the ft tool which has some basic usages of the API.