arenavision

package
v0.0.0-...-24035bd Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Name string
	URL  string
}

Channel represents an Arenavision channel.

func (ch *Channel) GetLink(client scraper.URLGetter) (string, error)

GetLink get the channel source page and returns the first stream link found. Limits: currently it handles only acestream links.

func (*Channel) ID

func (ch *Channel) ID() string

ID returns the identifier of an Arenavision channel.

func (*Channel) SourceURL

func (ch *Channel) SourceURL() string

func (*Channel) String

func (ch *Channel) String() string

type Channels

type Channels map[string]*Channel

Channels is a map of ArenaVision channels.

func (Channels) Get

func (chs Channels) Get(s string) *Channel

type Event

type Event struct {
	StartTime   time.Time
	Sport       string
	Competition string
	Event       string
	Lives       []*Live
	// contains filtered or unexported fields
}

Event struct

func (*Event) Match

func (e *Event) Match(filter url.Values) bool

Match check if the event matches the filter.

func (*Event) String

func (e *Event) String() string

type Events

type Events []*Event

Events is a slice of Event structs.

func (Events) FilteredBy

func (events Events) FilteredBy(filter url.Values) Events

FilteredBy returns only the events matching the filters criteria.

type Live

type Live struct {
	Channel *Channel
	Lang    string
}

Live represents an Arenavision live, i.e. a channel and a language.

func (*Live) String

func (cl *Live) String() string

type Scraper

type Scraper struct {
	Channels Channels
	Events   Events
	Client   scraper.URLGetter
	// contains filtered or unexported fields
}

Arenavision scraper.

func (*Scraper) EventByChannel

func (sch *Scraper) EventByChannel(channel *Channel) (event *Event, live *Live)

func (*Scraper) EventByChannelAndTime

func (av *Scraper) EventByChannelAndTime(channel *Channel, currTime time.Time) (event *Event, live *Live)

EventByChannelAndTime returns

func (*Scraper) GetAcestreamId

func (av *Scraper) GetAcestreamId(channelId string) (string, error)

func (*Scraper) GuideURL

func (av *Scraper) GuideURL() string

func (*Scraper) RefreshGuide

func (av *Scraper) RefreshGuide() error

Jump to

Keyboard shortcuts

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