Swift client library for the public Zeplin API
ZeplinKit provides data models and preconfigured API endpoints for the Zeplin API. It offers a flexible client that integrates with any workflow, supporting both Combine publishers and Swift Concurrency (iOS 13+/macOS 11+).
The library includes Fetcher, a lightweight network client, and ZeplinAPIURL, an enumeration of API endpoints that encapsulates the required parameters for each call.
// Swift Package Manager
.package(url: "https://github.com/Snapp-Mobile/ZeplinKit.git", from: "0.1.0")To use ZeplinKit, you'll need a Zeplin access token. Learn how to generate one in the Zeplin API documentation.
import ZeplinKit
let fetcher = Fetcher(
environment: .production,
accessToken: "your_zeplin_access_token"
)To fetch the first 10 projects for your account:
func loadProjects() async {
let url = ZeplinAPIURL.getProjects(10, 0)
do {
let projects: [ZeplinProject] = try await fetcher.fetch(url)
// Handle projects
} catch {
print("Failed to fetch projects: \(error.localizedDescription)")
}
}For more information visit Documentation.
MIT License - see the LICENSE file for details.
