riotgames-gg

    0.0.7 • Public • Published

    riotgames-gg

    Hi this is just a wrapper for riot api. Everything was built using riot api routes to make life easier for you to make api calls to riot! This is new and if you experience something not working. Message me! Not Everything has sample demo yet. Still in working progress but the function works!

    Installation

    npm install riotgames-gg --save
    API key here!

    Region

    PLATFORM PLATFORM-HOST REGION REGION-HOST
    BR br1.api.riotgames.com AMERICAS americas.api.riotgames.com
    EUN eun1.api.riotgames.com EUROPE europe.api.riotgames.com
    EUW euw1.api.riotgames.com EUROPE europe.api.riotgames.com
    JP jp1.api.riotgames.com ASIA asia.api.riotgames.com
    KR kr.api.riotgames.com ASIA asia.api.riotgames.com
    LAN la1.api.riotgames.com AMERICAS americas.api.riotgames.com
    LAS la2.api.riotgames.com AMERICAS americas.api.riotgames.com
    NA na1.api.riotgames.com AMERICAS americas.api.riotgames.com
    OCE oc1.api.riotgames.com AMERICAS americas.api.riotgames.com
    TR tr1.api.riotgames.com EUROPE europe.api.riotgames.com
    RU ru.api.riotgames.com EUROPE europe.api.riotgames.com

    Example

    Riot

    const { Riot } = require('riotgames-gg');
     
    const riot = new Riot({ region: 'KR', apikey: 'YOUR API KEY' });
     
    async function accountsByPuuid(puuid)(name) {
      const response = await riot.Account.accountsByPuuid(puuid);
      console.log(response);
    }
     
    getLolSummonerByName(summonerName);
    List of Riot functions
    • [riot.]
      • [Account.]
        • [accountsByPuuid(puuid)]
        • [accountsByRiotId(gameName,tagLine)]
        • [activeShards(game,puuid)]

    League of Legends

    const { Lol } = require('riotgames-gg');
     
    const lol = new Lol({ region: 'KR', apikey: 'YOUR API KEY' });
    const summonerName = 'Hide on Bush';
    // Get League Of Legends Summoner Info By Name
    async function getLolSummonerByName(name) {
      const response = await lol.Summoner.summonerByName(name);
      console.log(response);
    }
     
    getLolSummonerByName(summonerName);
    List of League Of Legends functions

    TeamFight Tactics

    const { Tft } = require('riotgames-gg');
     
    const tft = new Tft({ region: 'NA', apikey: 'YOUR API KEY' });
    const summonerName = 'Giuttony';
    // Get League Of Legends Summoner Info By Name
    async function getTftSummonerByName(name) {
      const response = await tft.Summoner.summonerByName(name);
      console.log(response);
    }
     
    getTftSummonerByName(summonerName);
    List of TeamFight Tactics functions

    Legends of Runeterra

    const { Lor } = require('riotgames-gg');
     
    const lor = new lor({ region: 'NA', apikey: 'YOUR API KEY' });
    // Get League Of Legends Summoner Info By Name
    async function getLorRanked() {
      const response = await lor.Ranked.leaderboards();
      console.log(response);
    }
     
    getLorRanked();
    List of Legends of Runeterra functions
    • [lor.]
      • [Match.]
        • [matchesByPuuid(puuid)]
        • [matchesByMatchId(matchId)]
      • [Ranked.]
        • [leaderboards()]

    Valorant

    const { Val } = require('riotgames-gg');
     
    const val = new Val({ region: 'NA', apikey: 'YOUR API KEY' });
     
    async function getValContent() {
      const response = await val.Content.contents();
      console.log(response);
    }
     
    getLorRanked();
    List of Valorant functions
    • [val.]
      • [Content.]
        • [contents()]
      • [Match.]
        • [matchesByMatchId(matchId)]
        • [matchlistsByPuuid(puuid)]
        • [recentMatchesByQueue(queue)]

    Contributing

    If you want to join and help out. Message me and I can add you to the team! Always willing to get more help to evolve and make it better!

    Issues

    Report any bug or improvements! Willing to take suggesting too!

    Install

    npm i riotgames-gg

    DownloadsWeekly Downloads

    1

    Version

    0.0.7

    License

    ISC

    Unpacked Size

    42.8 kB

    Total Files

    30

    Last publish

    Collaborators

    • sruan6
    • davidhuytran