Skip to content

TFT Traits

Antoine CLOP edited this page Aug 20, 2020 · 1 revision

TFT Traits

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

Methods

TraitInfos (by TFTTraitId)

Parameters

  • TFTTraitId: The unique identifier for a TFT Trait.

The function will run synchronously and returns a TFTTraitInfo if found, nil otherwise. You can then access the icon of this trait with the property icon

Usage example

let trait = league.tftAPI.getTraitInfos(byId: TFTTraitId("Set3_Blademaster"))
if let trait = trait {
    print("Success!")
} else {
    print("Trait no found")
}

TraitInfos (by Name)

Parameters

  • ByName: The name of a trait.

The function will run synchronously and returns a TFTTraitInfo if found, nil otherwise. You can then access the icon of this trait with the property icon

Usage example

let trait = league.tftAPI.getTraitInfos(byName: "Blademaster")
if let trait = trait {
    print("Success!")
} else {
    print("Trait no found")
}

AllTraitInfos

Parameters

The function will run synchronously and returns all traits of TFT in a TFTTraitInfo Array.

Usage example

let traits = league.tftAPI.getAllTraitInfos()