Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MaxCountDuration = 20 * time.Minute
)
Functions ¶
func EnableDebug ¶
func EnableDebug()
Types ¶
type Event ¶
type Option ¶
type Option func(*TimelineParser) *TimelineParser
type TLMatchPage ¶
type TLMatchPage struct {
Parse struct {
Title string `json:"title"`
Pageid int `json:"pageid"`
Revid int `json:"revid"`
Text struct {
RawHTML string `json:"*"`
} `json:"text"`
} `json:"parse"`
}
TLMatchPage is a raw struct defined by https://liquipedia.net/starcraft2/api.php?action=parse&format=json&page=Liquipedia:Upcoming_and_ongoing_matches And removed useless contents
type TimelineParser ¶
type TimelineParser struct {
Timezone *time.Location
RevID string
Events []*Event
// contains filtered or unexported fields
}
func NewTimelineParser ¶
func NewTimelineParser(respBody []byte, opts ...Option) *TimelineParser
func NewTimelineParserFromReader ¶
func NewTimelineParserFromReader(r io.Reader, opts ...Option) (*TimelineParser, error)
func (*TimelineParser) Parse ¶
func (tp *TimelineParser) Parse() error
func (*TimelineParser) SetTimezone ¶
func (tp *TimelineParser) SetTimezone(name string) error
Click to show internal directories.
Click to hide internal directories.