Skip to content

Snapp-Mobile/ZeplinKit

Repository files navigation

ZeplinKit Logo

ZeplinKit

Swift client library for the public Zeplin API

Swift Package Index iOS 13.0+ Latest Release Tests License: MIT

Overview

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.

Installation

// Swift Package Manager
.package(url: "https://github.com/Snapp-Mobile/ZeplinKit.git", from: "0.1.0")

Authentication

To use ZeplinKit, you'll need a Zeplin access token. Learn how to generate one in the Zeplin API documentation.

Setup

import ZeplinKit

let fetcher = Fetcher(
    environment: .production,
    accessToken: "your_zeplin_access_token"
)

Usage

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)")
    }
}

Documentation

For more information visit Documentation.

License

MIT License - see the LICENSE file for details.

About

Swift client library for the public Zeplin API

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages