Swiftpack.co - azurlane-api/azurlane-swift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by azurlane-api.
azurlane-api/azurlane-swift v1.2.1
Wrapper for the unofficial azur lane json api in Swift
⭐️ 3
🕓 4 years ago
.package(url: "https://github.com/azurlane-api/azurlane-swift.git", from: "v1.2.1")

azurlane-swift

Wrapper for the unofficial azur lane json api in Swift

Install

Import the library into your Package.swift
.package(url: "https://github.com/azurlane-api/azurlane-swift.git", from: "<latest-tag>")

Example

import Foundation
import AzurLane

let azurlane = AzurLane()

azurlane.getShips(from: .RARITY, with: "Super Rare") { (result: Result<ShipsResponse, AzurLaneAPIError>) in
    switch result {
    case .failure(let error):
        print(error)
    case .success(let response):
        for ship in response.ships {
            print("[\(ship.id)]: (\(ship.name))")
        }
    }
}

RunLoop.main.run()

Support

discord

GitHub

link
Stars: 3
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v1.2.1
4 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics