0.3.1 • Published 2 years ago

gametournaments v0.3.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Table of contents

Installation

NPM

Usage

import GAMETOURNAMENTS from 'gametournaments'

API

Match

OptionTypeDefault ValueDescription
idstring-id
gamestring-csgo/dota-2/lol/overwatch/hearthstone
liveboolean-The game is on right now
team1Team?-Left team name
team2Team?-Right team name
datestring?-Time game start
eventEvent?-Event info
scorestring?-Left-Right team score
linkstring?-not-full match link for use with getMatch

Team

OptionTypeDefault ValueDescription
namestring--
oddsstring--

Event

OptionTypeDefault ValueDescription
namestring--
tournamentLinkstring-not-full tournament link for use with getTournamentsMatches
logostring--

getMatches

Parses all matches from the https://game-tournaments.com/${game} page

OptionTypeDefault ValueDescription
gamestring-csgo/dota-2/lol/overwatch/hearthstone
pagenumber?-Page
timeTime?-Filter matches by time(past/current)

type Time = "past" | "current"

GAMETOURNAMENTS.getMatches({game: 'dota-2', page: '2'}).then((res) => {
  ...
})

getTournamentsMatches

Parses all matches from the https://game-tournaments.com/${game}/${tournament} page

OptionTypeDefault ValueDescription
gamestring-csgo/dota-2/lol/overwatch/hearthstone
tournamentstring?-Check mathches by tournaments (past and current)
GAMETOURNAMENTS.getTournamentsMatches({ game: 'dota-2', tournament: 'esl-one-malaysia-2022/north-america' }).then((res) => {
  ...
})

tournamentlink for search by tournament stored in Match.event.tournamentLink

getMatch

MatchInfo

OptionTypeDefault ValueDescription
team1MathDetails--
team2MathDetails--
tournamentInfostring--
tournamentLinkstring-fot getTournamentsMatches
datestring--
formatstring-Best of 2/3/1

TeamDetails

OptionTypeDefault ValueDescription
namestring--
imageLinkstring--
playersPlayer[]-The game is on right now
linkstring-for getTeam

Player

OptionTypeDefault ValueDescription
namestring--
linkstring-for getPlayer
rolestring?--

Parses info match from the https://game-tournaments.com/${game}/${matchlink} page

OptionTypeDefault ValueDescription
gamestring-csgo/dota-2/lol/overwatch/hearthstone
matchlinkstring-Check info by MatchLink
GAMETOURNAMENTS.getMatch({
    game: 'dota-2',
    matchlink:
      'moon-studio-asian-tigers-3/group-stage/mist-walker-vs-gorilla-468136'
  }).then((res) => {
  ...
})

matchlink for search by tournament stored in Match.link

getTeam

OptionTypeDefault ValueDescription
namestring--
teamLogostring--
playersPlayer[]--
matchesMatchPreview[]--
region{name: string, place: string}--
placeinWorldstring--
formstring--
rating{win: string, percentage: string}--
OptionTypeDefault ValueDescription
gameGame-csgo/dota-2/lol/overwatch/hearthstone
teamlinkstring--
langLang?-'en.'/''
GAMETOURNAMENTS.getTeam({
    game: 'dota-2',
    teamlink: 'team/og',
    lang: 'en.'
  }).then((res) => {
  ...
})
0.3.1

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago