Add smashgg requests

- get Tournaments top8 (or topX) by slug or id
- get characters selections by Tournament id and Players ids
master
Lertsenem 2020-07-07 00:38:59 +02:00
parent daf18f10cb
commit e9df751d9e
3 changed files with 169 additions and 0 deletions

View File

@ -0,0 +1,49 @@
query getCharsByTournamentIdAndPlayerIds($tournamentId:ID, $playerIds:[ID])
{
tournament(id:$tournamentId)
{
events
{
name
sets
(
perPage:100
page:1
filters:
{
playerIds: $playerIds
}
)
{
pageInfo
{
total
}
nodes
{
games
{
winnerId
selections
{
selectionType
selectionValue
entrant
{
participants
{
player
{
id
}
}
}
}
}
}
}
}
}
}

View File

@ -0,0 +1,60 @@
query getTournamentTopBySlug($id:String,$top:Int)
{
tournament(id:$id)
{
slug
name
events
{
name
videogame
{
id
name
}
standings(
query:
{
perPage: $top
page: 1
}
)
{
pageInfo
{
total
}
nodes
{
placement
entrant
{
participants
{
player
{
id
gamerTag
prefix
}
}
seeds
{
phase
{
name
numSeeds
}
groupSeedNum
}
}
}
}
}
}
}

View File

@ -0,0 +1,60 @@
query getTournamentTopBySlug($slug:String,$top:Int)
{
tournament(slug:$slug)
{
id
name
events
{
name
videogame
{
id
name
}
standings(
query:
{
perPage: $top
page: 1
}
)
{
pageInfo
{
total
}
nodes
{
placement
entrant
{
participants
{
gamerTag
prefix
player
{
id
}
}
seeds
{
phase
{
name
numSeeds
}
groupSeedNum
}
}
}
}
}
}
}