startgg

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareQuery

func PrepareQuery(query string, variables map[string]interface{}) map[string]interface{}

Types

type Authorizations

type Authorizations struct {
	Discord string `json:"externalUsername"`
}

type Client

type Client struct {
	AuthToken string
	Client    *http.Client
}

func NewClient

func NewClient(token string, clt *http.Client) *Client

func (*Client) GetListGroups

func (c *Client) GetListGroups(slug string) ([]PGS, error)

func (*Client) GetPagesCount

func (c *Client) GetPagesCount(phaseGroupID int64) (int, error)

func (*Client) GetPhaseGroupState

func (c *Client) GetPhaseGroupState(phaseGroupID int64) (State, error)

func (*Client) GetSets

func (c *Client) GetSets(phaseGroupID int64, page int, perPage int) ([]Nodes, error)

func (*Client) GetTournament

func (c *Client) GetTournament(tourneySlug string) (Tournament, error)

func (*Client) RunQuery

func (c *Client) RunQuery(query []byte) ([]byte, error)

type ConnectedAccounts

type ConnectedAccounts struct {
	Tekken Tekken8 `json:"tekken"`
}

type DataEvent

type DataEvent struct {
	Event Event `json:"event"`
}

type DataPhaseGroup

type DataPhaseGroup struct {
	PhaseGroup PhaseGroup `json:"phaseGroup"`
}

type DataPhaseGroupState

type DataPhaseGroupState struct {
	PhaseGroup PGState `json:"phaseGroup"`
}

type DataTournament

type DataTournament struct {
	Tournament Tournament `json:"tournament"`
}

type Entrant

type Entrant struct {
	Id           int64          `json:"id"`
	Participants []Participants `json:"participants"`
}

Player in tournament

type Errors

type Errors struct {
	Message    string      `json:"message"`
	Path       []string    `json:"path"`
	Locations  []Locations `json:"locations"`
	Extensions Extensions  `json:"extensions"`
}

type Event

type Event struct {
	Id          int64      `json:"id"`
	Name        string     `json:"name"`
	State       StateEvent `json:"state"`
	PhaseGroups []PGS      `json:"phaseGroups"`
}

type Extensions

type Extensions struct {
	Category string `json:"category"`
}

type FailedCall

type FailedCall struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

type Locations

type Locations struct {
	Line   int `json:"line"`
	Column int `json:"column"`
}

type Nodes

type Nodes struct {
	Id     int64    `json:"id"`
	State  State    `json:"state"`
	Stream Streamer `json:"stream"`
	Slots  []Slots  `json:"slots"`
}

Information about Set

type PGS

type PGS struct {
	Id int64 `json:"id"`
}

type PGState

type PGState struct {
	Id    int64 `json:"id"`
	State int   `json:"state"`
}

type PageInfo

type PageInfo struct {
	Total int `json:"total"`
}

Sets counts in Group(Phase)

type Participants

type Participants struct {
	GamerTag          string            `json:"gamerTag"`
	ConnectedAccounts ConnectedAccounts `json:"connectedAccounts"`
	User              User              `json:"user"`
}

type PhaseGroup

type PhaseGroup struct {
	Id   int64 `json:"id"`
	Sets Sets  `json:"sets"`
}

Group(Phase)

type RawPagesDataCount

type RawPagesDataCount struct {
	Data   DataPhaseGroup `json:"data"`
	Errors []Errors       `json:"errors"`
}

type RawPhaseGroupData

type RawPhaseGroupData struct {
	Data   DataPhaseGroup `json:"data"`
	Errors []Errors       `json:"errors"`
}

type RawPhaseGroupStateData

type RawPhaseGroupStateData struct {
	Data   DataPhaseGroupState `json:"data"`
	Errors []Errors            `json:"errors"`
}

type RawPhaseGroupsData

type RawPhaseGroupsData struct {
	Data   DataEvent `json:"data"`
	Errors []Errors  `json:"errors"`
}

type RawTournamentData

type RawTournamentData struct {
	Data   DataTournament `json:"data"`
	Errors []Errors       `json:"errors"`
}

type Sets

type Sets struct {
	PageInfo PageInfo `json:"pageInfo"`
	Nodes    []Nodes  `json:"nodes"`
}

type Slots

type Slots struct {
	Entrant Entrant `json:"entrant"`
}

Slots in set

type State

type State int
const (
	IsNotStarted State = 1
	InProcess    State = 2
	IsDone       State = 3
)

type StateEvent

type StateEvent string
const (
	Created   StateEvent = "CREATED"
	Active    StateEvent = "ACTIVE"
	Completed StateEvent = "COMPLETED"
)

type Streamer

type Streamer struct {
	StreamName   string `json:"streamName"`
	StreamSource string `json:"streamSource"`
}

type Tekken8

type Tekken8 struct {
	TekkenID string `json:"value"`
}

type Tournament

type Tournament struct {
	Id    int64  `json:"id"`
	Name  string `json:"name"`
	State State  `json:"state"`
}

type User

type User struct {
	Authorizations []Authorizations `json:"authorizations"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL