Wrapper for the unofficial azur lane json api in Swift
Import the library into your Package.swift
.package(url: "https://github.com/azurlane-api/azurlane-swift.git", from: "<latest-tag>")
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()