Project

hextech

0.0
Low commit activity in last 3 years
No release in over a year
An easy to use ruby wrapper for Riot API endpoints for League, Valorant,Legends of Runeterra, etc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.13.1
~> 3.9.0
~> 0.93.1
~> 1.43.2
~> 0.21.2
~> 6.0.0
~> 3.14.0

Runtime

~> 1.4.0
~> 1.8.0
 Project Readme

Hextech Logo

Simply a Ruby wrapper for Riot Api endpoints.

Installation

Add this line to your application's Gemfile:

gem 'hextech'

And then execute:

$ bundle install

Usage

You'll need the following environment variable:

RIOT_API_KEY='code-goes-here'

Each Riot API endpoint integrated into the gem has been namespaced by game, endpoint grouping, and (if present) specific endpoint. The responses to these endpoints will be wrapped in a Dry::Struct with keys that have been converted to snake case.

# Example:

summoner = Hextech::League::Summoner.by_name(name: 'Example Summoner', region: 'euw1')
# => #<Hextech::League::Response::Summoner account_id="1234" id="4321" name="Example Summoner" profile_icon_id=1234 puuid="2468" revision_date=2021-11-01 08:00:00 +0100 summoner_level=100>

summoner.name
# => "Example Summoner"

API Logging

Whenever the API Key is logged to the console, it will be replaced with [REPLACED].

Logging is suppressed by default. In order to increase the logging level to DEBUG, use the following environment variable:

DEBUG_LOGGER=true

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lilystoney/hextech.