Swiftpack.co - Package - juliand665/LeagueKit

Swift Package Manager compatible MIT licensed


Swifty access to League of Legends data


LeagueKit uses the Swift Package Manager. Simply add .package(url: "https://github.com/juliand665/LeagueKit.git", .branch("master")) to the dependencies in your Package.swift file.

If you're using an older version of Xcode (pre-11), there's both a release and a branch with the old, Carthage-compatible version.


Static Data

To get started, update an object manager using the static data client, e.g.:

let champs = Champions.shared

Once you've done that, you can access the values and do as you please:

let cait = champs.contents["Caitlyn"]!
let attackSpeed = cait.stats.attackSpeed.value(atLevel: 10)
let image = NSImage(byReferencing: cait.imageURL)
let results = champs.assets(matchingQuery: "ca")

Dynamic API

The current API for this is pretty limited, but it does cover several endpoints, e.g. the free champion rotation:

let dynamicClient = DynamicAPIClient(apiKey: myAPIKey, region: .euw)
dynamicClient.send(ChampionRotationRequest()).then { rotation in
	print("free champs:")
		.map { "• \(champs[$0]!.name)" } // using the static data to find out which name corresponds to which ID
		.joined(separator: "\n")


Stars: 1


Used By

Total: 0


Initial SwiftPM Release - 2019-10-10 03:08:28

  • migrated to use SwiftPM rather than Carthage
  • updated to Swift 5

Last Pre-SwiftPM Release - 2019-06-09 22:41:46

made image url public - 2018-02-25 22:08:18


Lots of things working, but still pretty basic - 2018-02-25 17:08:42

Need to do the annoying work of specific stats and calculations and stuff…