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

Runes

Runes are perks that a player can equip before game starts and that provides increased statistics or new effects. It is possible to have 2 rune paths: primary and secondary. In primary path, player can select 4 runes, and 2 runes in the secondary.

Methods

  • RunePaths()
  • RunePath(by: RunePathId)
  • RunePath(byName: String)
  • Runes(forPathId: RunePathId? = nil)
  • Rune(by: RuneId)
  • Rune(byName: String)

RunePaths

Parameters

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([RunePath]?, String?). RunePath array contains all main rune playstyles (paths) with all runes within it. Result will be nil only if an error occured. The String parameter contains the first error description encountered if existing.

Usage example

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

RunePath (By RunePathId)

Parameters

  • RunePathId: Represents the unique identifier of a rune path. See section RunePaths to get this identifier.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (RunePath?, String?). RunePath contains main rune playstyles (path) with unique identifier matching RunePathId. It also have all runes within it and will be nil only if rune path with RunePathId identifier does not exist. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getRunePath(by: RunePathId(8000)) { (runePath, errorMsg) in
    if let runePath = runePath {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

RunePath (By Name)

Parameters

  • byName: The name of an item.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (RunePath?, String?). RunePath contains main rune playstyles (path) with name or nameId matching byName. It also have all runes within it and will be nil only if rune path with byName name or nameId does not exist. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getRunePath(byName: "Precision") { (runePath, errorMsg) in
    if let runePath = runePath {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

Runes

Parameters

  • RunePathId: Optional parameter specifying the unique identifier of the rune path. If not specified, it will be considered as all rune path scope. To get this identifier, see section any RunePath section above.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: ([Rune]?, String?). Rune array contains all informations related to runes of the game, as well as an unique identifier and will be nil only if RuneId was specified but no Rune Path has this identifier. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getRunes(forPathId: RunePathId(8000)) { (runes, errorMsg) in
    if let runes = runes {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

Rune (By RuneId)

Parameters

  • RuneId: Represents the unique identifier of a rune. See sections Runes, Rune(By Name) or RunePaths to get this identifier.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Rune?, String?). Rune contains all informations related to the rune with unique identifier matching parameter and will be nil only if no rune with RuneId identifier was found. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getRune(by: RuneId(8134)) { (rune, errorMsg) in
    if let rune = rune {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}

Rune (By Name)

Parameters

  • byName: The name of the rune desired.

Since this method is asynchrone, there is not return value. Response will be provided with a handler closure with parameters: (Rune?, String?). Rune contains all informations related to the rune with name or nameId matching parameter and will be nil only if no rune with byName name or nameId was found. The String parameter contains the first error description encountered if existing.

Usage example

league.lolAPI.getRune(byName: "Ingenious Hunter") { (rune, errorMsg) in
    if let rune = rune {
        print("Success!")
    }
    else {
        print("Request failed cause: \(errorMsg ?? "No error description")")
    }
}