Skip to content

alephao/CoindarAPI

Repository files navigation

CoindarAPI

CI Status Version License Platform Swift 5.0

A wrapper around the Coindar API written in Swift

Quick Start

Import CoindarAPI and create an instance of Coindar with your token.

You can get a Coindar token here

import CoindarAPI

let api = Coindar(token: "MyCoindarToken")

Available methods:

func getEvents(params: EventsParams, onSuccess: ([Event]) -> Void, onError: (Error) -> Void) -> Cancellable

func getCoins(progress: (Double) -> Void, onSuccess: ([Coin]) -> Void, onError: (Error) -> Void) -> Cancellable

func getTags(progress: (Double) -> Void, onSuccess: ([Tag]) -> Void, onError: (Error) -> Void) -> Cancellable

func getSocial(coins: [Coin], onSuccess: ([Social]) -> Void, onError: (Error) -> Void) -> Cancellable

Installation

CoindarAPI is available through CocoaPods and Swift Package Manager.

Cocoapods

Simply add the following line to your Podfile:

pod 'CoindarAPI'

Swift Package Manager

Through Xcode UI (Xcode 11+)

Go to File -> Swift Packages -> Add Package Dependency... and enter package repository URL https://github.com/alephao/CoindarAPI.git, then follow the instructions.

Without Xcode

Simply add the following as a dependency to your Package.swift, under dependencies:

.package(url: "https://github.com/alephao/CoindarAPI.git", .upToNextMajor(from: "1.0.0"))

then specify "CoindarAPI" as a dependency of the Target in which you wish to use CoindarAPI.

License

CoindarAPI is available under the MIT license. See the LICENSE file for more info.