Skip to content
Antoine CLOP edited this page Aug 1, 2020 · 3 revisions

Clash

Clash tournament system in League of Legends. The following methods provide information about teams, players and tournaments in Clash.

Methods

ClashPlayers

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: ([ClashPlayer]?, String?). ClashPlayer array contains all information about a summoner in clash, such as teamId, position and role in the team. If player didn't play Clash, the array will be empty. If the array is nil, the summonerId might be invalid. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getClashPlayers(by: SummonerId("l1u59aGq69RycT9It-N-DjdxcVLauJsGX_-LPMauB094Qiw"), on: .EUW) { (players, errorMsg) in
    if let players = players {
        print("Success!")
    } else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

ClashTeam

Parameters

  • TeamId: Represents the unique identifier of a Clash team.
  • Region: The region where the team has been created.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (ClashTeam?, String?). ClashTeam contains all information about a Clash team, such as the tournament it participated in, the summoners of the team, name, tier and iconId. Result will be nil only if teamId was invalid. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getClashTeam(by: TeamId("7c76ab62-8ad4-43d0-83a0-757e457e2f15"), on: .EUW) { (team, errorMsg) in
       if let team = team {
           print("Success!")
       } else {
           print("Request failed cause: \(errorMsg ?? "No error description")")
       }
}

ClashTournaments

Parameters

  • 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: ([ClashTournament]?, String?). ClashTournament array contains all information about active and upcoming Clash tournaments. Result will be nil only if an unexpected error occurred. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getClashTournaments(on: .EUW) { (tournaments, errorMsg) in
       if let tournaments = tournaments {
           print("Success!")
       } else {
           print("Request failed cause: \(errorMsg ?? "No error description")")
       }
}

ClashTournament (by TeamId)

Parameters

  • TeamId: Represents the unique identifier of a Clash team.
  • 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: (ClashTournament?, String?). ClashTournament contains all information about the different tournament phases. Result will be nil only if teamId was invalid. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getClashTournament(by: TeamId("7c76ab62-8ad4-43d0-83a0-757e457e2f15"), on: .EUW) { (tournament, errorMsg) in
       if let tournament = tournament {
           print("Success!")
       } else {
           print("Request failed cause: \(errorMsg ?? "No error description")")
       }
}

ClashTournament (by TournamentId)

Parameters

  • TournamentId: Represents the unique identifier of a Clash tournament.
  • 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: (ClashTournament?, String?). ClashTournament contains all information about the different tournament phases. Result will be nil only if teamId was invalid. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getClashTournament(by: TournamentId(2001), on: .EUW) { (tournament, errorMsg) in
       if let tournament = tournament {
           print("Success!")
       } else {
           print("Request failed cause: \(errorMsg ?? "No error description")")
       }
}