Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ruby-lol is a wrapper to the Riot Games API.
Add this line to your application's Gemfile:
gem 'ruby-lol'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ruby-lol
[ Outdated, anyone who wants to contribute to this please do it :) ]
require 'lol'
client = Lol::Client.new "my_api_key", region: "euw"
# => <Lol::Client:0x000000020c0b28 @api_key="my_api_key", @region="euw", @cached=false>
# You can cache requests using Redis now
# ttl defaults to 900
client = Lol::Client.new "my_api_key", region: "euw", redis: "redis://localhost:6379", ttl: 900
# You can specify your rate limits so that the library will throttle requests to avoid errors
client = Lol::Client.new "new_api_key", region: "euw", rate_limit_requests: 1, rate_limit_seconds: 10
# Available Requests
client.champion
# => Lol::ChampionRequest
client.game
# => Lol::GameRequest
client.league
# => Lol::LeagueRequest
client.stats
# => Lol::StatsRequest
client.summoner
# => Lol::SummonerRequest
client.team
# => Lol::TeamRequest
# Available methods for each request type
client.champion.get
# => Lol::Champion
client.game.recent(summoner_id)
# => Lol::Game
client.league.get(summoner_id)
# => Lol::League
client.stats.summary(summoner_id)
# => Lol::SummaryStats
client.stats.ranked(summoner_id)
# => Lol::RankedStats
client.summoner.masteries(summoner_id)
# => [Lol::Masterypage]
client.summoner.runes(summoner_id)
# => [Lol::Runepage]
client.summoner.by_name(name)
# => Lol::Summoner
client.summoner.get(summoner_id)
# => Lol::Summoner
client.summoner.name(summoner_ids)
# => [Hash]
client.team.get(summoner_id)
# => Array
The Riot API has a section carved out for static-data. These requests don't count against your rate limit. The mechanism for using them is similar to the standard requests above.
Each static endpoint has two possible requests: get
and get(id)
. get
returns an array of OpenStructs representing the data from Riot's API, and get(id)
returns an OpenStruct with a single record. Here are some examples:
client.static
# => Lol::StaticRequest
**NOTE**: StaticRequest is not meant to be used directly, but can be!
client.static.champion
# => Lol::StaticRequest (for endpoint /static-data/champion)
client.static.champion.get
# => [OpenStruct] (with keys from http://developer.riotgames.com/api/methods#!/378/1349)
client.static.champion.get(id)
# => OpenStruct (with keys from http://developer.riotgames.com/api/methods#!/378/1349)
You can also pass query parameters as listed in the Riot API documentation. For example:
# returns all attributes
client.static.champion.get(champData: 'all')
# returns only lore information
client.static.champion.get(champData: 'lore')
NOTE: The realm endpoint is not implemented. Let us know if you need it, but it seemed somewhat unnecessary.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that ruby-lol demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.