dotapediago

package module
v0.0.0-...-d8ec33a Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: MIT Imports: 13 Imported by: 0

README

dotapediago

Go client to read data from the Dota 2 Liquipedia website

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTeam

type BaseTeam struct {
	ShortName string
	FullName  string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(userAgent string) *Client

func (*Client) GetMatches

func (client *Client) GetMatches() ([]*Match, error)

func (*Client) GetMatchesBetween

func (client *Client) GetMatchesBetween(minStartTime time.Time, maxStartTime time.Time) ([]*Match, error)

func (*Client) GetMatchesUntil

func (client *Client) GetMatchesUntil(maxStartTime time.Time) ([]*Match, error)

func (*Client) GetStreamURL

func (client *Client) GetStreamURL(liquipediaUrl string) (string, error)

func (*Client) GetTournaments

func (client *Client) GetTournaments() ([]*Tournament, error)

type Match

type Match struct {
	TeamOne        *BaseTeam
	TeamTwo        *BaseTeam
	BestOf         int
	Status         MatchStatus
	StartTime      time.Time
	Stream         string
	TournamentName string
}

type MatchStatus

type MatchStatus uint8
const (
	MatchStatusUpcoming MatchStatus = 0
	MatchStatusOngoing  MatchStatus = 1
)

type Response

type Response struct {
	Root struct {
		Text struct {
			Document string `json:"*"`
		} `json:"text"`
	} `json:"parse"`
}

type Tournament

type Tournament struct {
	Name         string
	Status       TournamentStatus
	Tier         int
	StartDate    time.Time
	EndDate      time.Time
	PrizePool    string
	Participants int
	Location     string
}

type TournamentStatus

type TournamentStatus int8
const (
	TournamentStatusUpcoming TournamentStatus = 0
	TournamentStatusOngoing  TournamentStatus = 1
	TournamentStatusComplete TournamentStatus = 2
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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