Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 750 Bytes

README.md

File metadata and controls

30 lines (24 loc) · 750 Bytes

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