Latest 0.3.1
Homepage https://github.com/iCell/CryptoCurrency
License MIT
Platforms ios 8.0, osx 10.10
Frameworks Foundation
Authors

CryptoCurrencyKit is an API kit based on CryptoCurrency Market Capitalizations

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+
  • Xcode 9.0+
  • Swift 4.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate CryptoCurrencyKit into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'CryptoCurrencyKit'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate CryptoCurrencyKit into your Xcode project using Carthage, specify it in your Cartfile:

github "iCell/CryptoCurrencyKit"

Run carthage update to build the framework and drag the built CryptoCurrencyKit.framework into your Xcode project.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Alamofire does support its use on supported platforms.

Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .Package(url: "https://github.com/iCell/CryptoCurrency.git")
]

Usage

fetch tickers

CryptoCurrencyKit.fetchTickers { response in
    switch response {
    case .success(let data):
        print(data)
    case .failure(let error):
        print(error)
    }
}

fetch a specific crypto currency

CryptoCurrencyKit.fetchTicker(coinName: "BitCoin", convert: .jpy) { response in
    switch response {
    case .success(let bitCoin):
        print(bitCoin.priceJPY)
    case .failure(let error):
        print(error)
    }
}

fetch global data

CryptoCurrencyKit.fetchGlobal(convert: .cny) { response in
    switch response {
    case .success(let data):
        print(data)
    case .failure(let error):
        print(error)
    }
}

Author

iCell, [email protected]

License

Alamofire is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "CryptoCurrencyKit",
    "version": "0.3.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/iCell/CryptoCurrency",
    "authors": {
        "iCell": "[email protected]"
    },
    "summary": "A Swift crypto-currencies price library for accessing coinmarket APIs.",
    "source": {
        "git": "https://github.com/iCell/CryptoCurrency.git",
        "tag": "0.3.1"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "source_files": "Sources/*.swift",
    "frameworks": "Foundation",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This