Contents

crewshin/CoinGecko-Swift

![Repo image](https://github.com/crewshin/CoinGecko-Swift/blob/main/Resources/Logo.png)

Getting Started

Swift Package Manager (Xcode 11 and above)
  1. Select File/Swift Packages/Add Package Dependency from the menu.
  2. Paste https://github.com/crewshin/CoinGecko-Swift.git.

Why not CocoaPods, or Carthage?

Supporting multiple dependency managers makes maintaining a library exponentially more complicated and time consuming. Furthermore, with the integration of the Swift Package Manager in Xcode 11 and greater, I expect the need for alternative solutions to fade quickly.

Usage

import CoinGecko

Create an instance of CoinGecko:

let gecko = CoinGecko(api: .main)

Then:

gecko.ping() { (result) in
    switch result {
    case .failure(let error):
        if case let APIError.generic(message) = error {
            print(message)
        }
    case .success(let response):
        if let value = response.value {
            print(value)
        }
    }
}

Feel free to say hi on Discord: crewshin#3286

Package Metadata

Repository: crewshin/CoinGecko-Swift

Stars: 1

Forks: 2

Open issues: 1

Default branch: main

Primary language: swift

License: MIT

README: README.md