Skip to content

mauryaratan/lemonsqueezy-swift

Repository files navigation

LemonSqueezy

An asynchronous Swift library for the Lemon Squeezy API.

Quick Start Guide

New LemonSqueezy instance must be initiated with Lemon Squeezy API Key. You may check Example app as a quickstart guide.

import LemonSqueezy

@main
struct Lemon_SqueezyApp: App {
    @StateObject var lemon = LemonSqueezy(LS_API_KEY)
    
    var body: some Scene {
        WindowGroup {
            ContentView()
                .environmentObject(lemon)
        }
    }
}

// Then use in any file by importing the following
@EnvironmentObject var lemon: LemonSqueezy

Documentation

You can find the full documentation in this repo's Wiki (auto-generated by SwiftDoc).