
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
tips-twisted
Advanced tools
League of legends api wrapper

RIOT:
import { RiotApi, Constants } from 'twisted'
const api = new RiotApi()
export async function getAccount () {
// Recommended to use the nearest routing value to your server: americas, asia, europe
return (await api.Account.getByRiotId("Hide on bush", "KR1", Constants.RegionGroups.AMERICAS)).response
}
LOL:
import { LolApi, Constants } from 'twisted'
const api = new LolApi()
export async function getSummoner () {
const user = await getAccount()
return await api.Summoner.getByPUUID(user.puuid, Constants.Regions.KOREA)
}
TFT:
import { TftApi, Constants } from 'twisted'
const api = new TftApi()
export async function matchListTft () {
const user = await getAccount()
return api.Match.list(user.puuid, Constants.RegionGroups.KOREA)
}
import { LolApi } from 'twisted'
const api = new LolApi({
/**
* If api response is 429 (rate limits) try reattempt after needed time (default true)
*/
rateLimitRetry: true
/**
* Number of time to retry after rate limit response (default 1)
*/
rateLimitRetryAttempts: 1
/**
* Concurrency calls to riot (default infinity)
* Concurrency per method (example: summoner api, match api, etc)
*/
concurrency: undefined,
/**
* Riot games api key
*/
key: '',
/**
* Debug methods
*/
debug: {
/**
* Log methods execution time (default false)
*/
logTime: false
/**
* Log urls (default false)
*/
logUrls: false
/**
* Log when is waiting for rate limits (default false)
*/
logRatelimit?: false
}
})
Everything should be in the same order as in the official docs.
Get account by puuidGet account by riot idGet active shard for a playerGet account by access tokenGet all champion mastery entries sorted by number of champion points descending.Get a champion mastery by player ID and champion ID.Get a player's total champion mastery score, which is the sum of individual champion mastery levels.Retrieve all champions.Retrieve champion by ID.Get players by summoner idGet teamGet tournamentsGet tournaments by team idGet tournament by idGet match by idGet matches by summoner idGet match timeline by idGet matches id by tournament codeGet match by idGet match by tournament codeGet matches by summoner idGet match timeline by idGet the challenger league for given queue.Get league entries in all queues for a given summoner ID.Get all the league entries.Get the grandmaster league of a specific queue.Get league with given ID, including inactive entries.Get the master league for given queue.Get the queues that have positional ranks enabled. (deprecated June 17th and in v0.9.10)Get league positions in all queues for a given summoner ID. (deprecated June 17th and in v0.9.10)Get all the positional league entries. (deprecated June 17th and in v0.9.10)Get all challenge configurations.Get all challenge percentile distributions.Get a challenge configuration.Get Leaderboards for a challenge (Chall, GM, Masters).Get a challenge percentile distribution.Get player challenge information.Get League of Legends status for the given shard.Get matchlist for games played on given account ID and platform ID and filtered using given filter parameters, if any.Get match timeline by match ID.Get match IDs by tournament code.Get match by match ID and tournament code.Get League of Legends status for the given platform.Get current game information for the given summoner ID.Get list of featured games.Get current game information for the given summoner ID.Get list of featured games.Get a summoner by account ID.Get a summoner by summoner name. (deprecated Oct 16th, 2023)Get a summoner by PUUID.Get a summoner by summoner ID.Create a mock tournament code for the given tournament.Gets a mock list of lobby events by tournament code.Creates a mock tournament provider and returns its ID.Creates a mock tournament and returns its ID.Create a tournament code for the given tournament.Returns the tournament code DTO associated with a tournament code string.Update the pick type, map, spectator type, or allowed summoners for a code.Gets a list of lobby events by tournament code.Creates a tournament provider and returns its ID.Creates a tournament and returns its ID.Get current game information for the given puuid.Get list of featured games.Get a summoner by account ID.Get a summoner by summoner name. (deprecated Oct 16th, 2023)Get a summoner by PUUID.Get a summoner by summoner ID.Get match list by summoner PUUID.Get match list details.Get the challenger league for given queue.Get the grandmaster league for given queue.Get the master league for given queue.Get league entries in all queues for a given summoner ID.Get all the league entries.Get league with given ID, including inactive entries.Download code from git and:
$ RIOT_API_KEY={YOUR_KEY} yarn example
$ RIOT_API_KEY={YOUR_KEY} yarn example {exampleFunctionName}
Edit docker-compose.yml with your api key and:
$ docker-compose up
We did a project based on a "twisted" package, this project is not finished but it is a very good example
Github: https://github.com/twisted-gg
The following environment variables can be set either in the .env file or as shown in the examples:
RIOT_API_KEYObtained from the Riot Games developer page(https://developer.riotgames.com/) Necessary to use this library.
UPDATE_CHAMPION_IDSThis library has an option to fetch an actual version of champion IDs regularly. This is useful in case a new champion gets added, while the application runs. E.g. data crawlers, or services which aren't supposed to be restarted regularly.
Set the value to true or 1 to enable this feature.
FAQs
Fetching riot games api data
The npm package tips-twisted receives a total of 19 weekly downloads. As such, tips-twisted popularity was classified as not popular.
We found that tips-twisted 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.