crystal-legends

League of Legends API wrapper written in Crystal

Crystal Legends Build Status

League of Legends API wrapper written in Crystal

Installation

Add the following lines to your shard.yml file:

dependencies:
  legends:
    github: mauricioabreu/crystal-legends

Usage

require "legends"

client = Legends::Client("NA", "my_secret_key_here")
champion = client.champions.find(1, "BR", "v1.2") # finds the champion with ID 1 from BR region using the API version 1.2
puts champion.active # true

# You can also pass a query to filter
champions = client.champions.find("BR", query: {"freeToPlay" => "true"})

# If you need static data like the name of a champion
champion = client.static.champions.find(1)
puts champion.name # Annie
Repository

crystal-legends

Owner
Statistic
  • 2
  • 0
  • 2
  • 0
  • 1
  • over 8 years ago
  • May 10, 2016
License

MIT License

Links
Synced at

Sun, 17 Nov 2024 18:21:07 GMT

Languages