Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (client *Client) Download(video *Video, writer io.Writer) error
- func (client *Client) DownloadWithContext(ctx context.Context, video *Video, writer io.Writer) error
- func (client *Client) GetSeriesByID(id int) (*Series, error)
- func (client *Client) GetSeriesWithContext(ctx context.Context, seriesID int) (*Series, error)
- func (client *Client) GetVideo(data VideoRequest) (*Video, error)
- func (client *Client) GetVideoWithContext(ctx context.Context, data VideoRequest) (*Video, error)
- func (client *Client) Search(term string) ([]*Series, error)
- func (client *Client) SearchWithContext(ctx context.Context, term string) ([]*Series, error)
- type Config
- type SearchResult
- type Series
- type Video
- type VideoRequest
Constants ¶
View Source
const SdarotURL = "https://sdarot.tw"
Variables ¶
View Source
var ( ErrServerOverLoad = errors.New("servers overload") ErrUnexpected = errors.New("unexpected error") )
View Source
var ErrInvalidCredentials = fmt.Errorf("InvalidCredentials")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DownloadWithContext ¶
func (client *Client) DownloadWithContext(ctx context.Context, video *Video, writer io.Writer) error
DownloadWithContext the given video and write it into the given writer.
func (*Client) GetSeriesByID ¶ added in v1.0.0
func (*Client) GetSeriesWithContext ¶ added in v1.0.0
func (*Client) GetVideo ¶
func (client *Client) GetVideo(data VideoRequest) (*Video, error)
GetVideo fetches the requested episode from Sdarot and returns a Video object. Note: there is a 30-second delay internally.
func (*Client) GetVideoWithContext ¶
GetVideoWithContext fetches the requested episode from Sdarot and returns a Video object. Note: there is a 30-second delay internally.
type SearchResult ¶
type Series ¶ added in v1.0.0
type Series struct { ID int HebrewName string EnglishName string Seasons [][]VideoRequest }
func (*Series) BuildVideoRequest ¶ added in v1.0.0
func (s *Series) BuildVideoRequest(season int, episode int) VideoRequest
func (*Series) GetEpisodes ¶ added in v1.0.0
func (s *Series) GetEpisodes(season int) []VideoRequest
func (*Series) GetSeasons ¶ added in v1.0.0
type VideoRequest ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.