kaycmendes / opgg-scraper

7 stars 2 forks source link

About

A promised based op.gg scraper for League of Legends with a few more data than other packages.

Usage

import opggScraper from 'opgg-scraper';

opggScraper('hide on bush', 'kr').
    then(stats => console.log(stats))       

Parameters

Regions

na kr oce jp euw eune lan br las ru tr

// Output
  {
  name: 'hide on bush',
  level: '689',
  profilePic: 'https://opgg-static.akamaized.net/meta/images/profile_icons/profileIcon6.jpg?image=q_auto,f_png,w_auto&v=1693456151155',
  lastMatches: 14,
  wins: 7,
  loses: 7,
  rank: 'Master',
  kda: '7.0 / 4.7 / 5.7',
  previousRank: 'S2023 S1 Master, S2022 Diamond 1, S2021 Master',
  rankedLP: '297 LP',
  winRate: '55%',
  mainChampion: 'Tristana',
  lastTimeOnline: '5 hours ago',
  matches: [
    { teamA: [Array], teamB: [Array], result: 'victory' },
    { teamA: [Array], teamB: [Array], result: 'defeat' },
    { teamA: [Array], teamB: [Array], result: 'defeat' },
    { teamA: [Array], teamB: [Array], result: 'victory' },
    { teamA: [Array], teamB: [Array], result: 'victory' }
  ]
}

Support

If you find this package helpful, consider supporting its development by buying me a coffee:

Buy Me a Coffee