A Swift 5 Wrapper for the PokeApi
Currently the package is only available for Swift Package Manager add the following package to your Package.swift file.
.package(url: "https://github.com/NaughtyOttsel/PokeKit.git", .upToNextMajor(from: "0.0.1")),
Currently the Package Supports Decoding JSON strings into Classes based on the PokeAPI.
let decoder = JSONDecoder()
let abilityJsonString = // Use your favorite Networking Framework to retrieve data from the PokeAPI
guard let abilityData = abilityJsonString.data(using: .utf8) else {
return
}
let ability = try? decoder.decode(Ability.self, from: abilityData)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.