Skip to content

TFT Champions

Antoine CLOP edited this page Sep 28, 2020 · 3 revisions

TFT Champions

The following endpoints provide all details about champions in Team Fight Tactics. It also includes icons for each one of them.

Methods

Champion (by TFTChampionId)

Parameters

  • 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

Usage example

let champion = league.tftAPI.getChampion(byId: TFTChampionId("TFT4_Ahri"))
if let champion = champion {
    print("Success!")
} else {
    print("Champion not found")
}

Champion (by Name)

Parameters

  • 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

Usage example

let champion = league.tftAPI.getChampion(byName: "Ahri")
if let champion = champion {
    print("Success!")
} else {
    print("Champion not found")
}

Champions (by Cost)

Parameters

The function will run synchronously and returns all champions of TFT with a certain cost. The result is contained in a TFTChampion Array.

Usage example

let champions_2_cost = league.tftAPI.getChampions(byCost: 2)

Champions (with Trait)

Parameters

The function will run synchronously and returns all champions of TFT with a certain trait. The result is contained in a TFTChampion Array.

Usage example

let sorcerer_champions = league.tftAPI.getChampions(withTrait: "Sorcerer")

AllChampions

Parameters

The function will run synchronously and returns all champions of TFT. The result is contained in a TFTChampion Array.

Usage example

let champions = league.tftAPI.getAllChampions()