-
Notifications
You must be signed in to change notification settings - Fork 13
TFT Champions
The following endpoints provide all details about champions in Team Fight Tactics. It also includes icons for each one of them.
- Champion(byId: TFTChampionId) -> TFTChampion?
- Champion(byName: String) -> TFTChampion?
- Champions(byCost: Int) -> [TFTChampion]
- Champions(withTrait: String) -> [TFTChampion]
- AllChampions() -> [TFTChampion]
Champion (by TFTChampionId)
- TFTChampionId: The unique identifier for a TFT Champion.
The function will run synchronously and returns a TFTChampion if found, nil otherwise. You can then access the icon of this champion with the property icon
let champion = league.tftAPI.getChampion(byId: TFTChampionId("TFT4_Ahri"))
if let champion = champion {
print("Success!")
} else {
print("Champion not found")
}
- ByName: The name of a champion.
The function will run synchronously and returns a TFTChampion if found, nil otherwise. You can then access the icon of this champion with the property icon
let champion = league.tftAPI.getChampion(byName: "Ahri")
if let champion = champion {
print("Success!")
} else {
print("Champion not found")
}
The function will run synchronously and returns all champions of TFT with a certain cost. The result is contained in a TFTChampion Array.
let champions_2_cost = league.tftAPI.getChampions(byCost: 2)
The function will run synchronously and returns all champions of TFT with a certain trait. The result is contained in a TFTChampion Array.
let sorcerer_champions = league.tftAPI.getChampions(withTrait: "Sorcerer")
The function will run synchronously and returns all champions of TFT. The result is contained in a TFTChampion Array.
let champions = league.tftAPI.getAllChampions()