Skip to content

TFT Summoners

Antoine CLOP edited this page Aug 1, 2020 · 2 revisions

TFT Summoners

TFT Summoners are Team Fight Tactics players. They are currently equivalent to the League of Legends Summoners, but it might change in the future. Using TFT methods will often require Summoner id, you can get one by making one of the requests below.

Identifiers

Since Riot API v4 released in early December 2018, summoner identifiers such as AccountId, SummonerId and SummonerPuuid are encrypted using sender's API key. This means those values will be different each time you regenerate your key.

Methods

Summoner (by Name)

Parameters

  • byName: Summoner's name, which is the same as in game name.
  • Region: The region where Summoner is playing.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Summoner?, String?). Summoner contains all information about a summoner, such as summonerId, summonerAccountId. Result will be nil only if summoner with byName name was not found on this Region. The String parameter contains the first error description encountered if existing.

Usage example

league.tftAPI.getSummoner(byName: "Sc0ra", on: .EUW) { (summoner, errorMsg) in
    if let summoner = summoner {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

Summoner (by AccountId)

Parameters

  • AccountId: Summoner's accountId (not summonerId!).
  • Region: The region where Summoner is playing.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Summoner?, String?). Summoner contains all information about a summoner, such as summonerId, summonerName. Result will be nil only if summoner with AccountId was not found on this Region. The String parameter contains the first error description encountered if existing.

Usage example

league.tftAPI.getSummoner(by: AccountId("DLxCapBHUF7dip1I0o5rDxZqSfwRVUko17Am6pweQalE5Q"), on: .EUW) { (summoner, errorMsg) in
    if let summoner = summoner {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

Summoner (by SummonerId)

Parameters

  • SummonerId: Represents the unique identifier of a summoner.
  • Region: The region where Summoner is playing.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Summoner?, String?). Summoner contains all information about a summoner, such as summonerName, summonerAccountId. Result will be nil only if summoner with SummonerId was not found on this Region. The String parameter contains the first error description encountered if existing.

Usage example

league.tftAPI.getSummoner(by: SummonerId("xc8IRVLGV1Gb75sbz8JoLdRvIJ_yAKNsSG1RBQVtnGZqZV8"), on: .EUW) { (summoner, errorMsg) in
    if let summoner = summoner {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

Summoner (by SummonerPuuid)

Parameters

  • SummonerPuuid: Represents the unique identifier of a summoner.
  • Region: The region where Summoner is playing.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Summoner?, String?). Summoner contains all information about a summoner, such as summonerName, summonerAccountId. Result will be nil only if summoner with SummonerId was not found on this Region. The String parameter contains the first error description encountered if existing.

Usage example

league.tftAPI.getSummoner(by: SummonerPuuid("8O-V8DGHm3YimSunwz6I6lntBnJVpPexIso6so6DtgXBZMNPnuktCigiLS7AXniMmqJFUvoc3Zrrzw"), on: .EUW) { (summoner, errorMsg) in
    if let summoner = summoner {
        print("Success")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}