Documentation ¶
Index ¶
- func AreaID() (string, error)
- func DownloadPlayer(path string) error
- func SetHTTPClient(client *http.Client)
- type Client
- func (c *Client) Auth1Fms(ctx context.Context) (string, int64, int64, error)
- func (c *Client) Auth2Fms(ctx context.Context, authToken, partialKey string) ([]string, error)
- func (c *Client) AuthorizeToken(ctx context.Context, pngFilePath string) (string, error)
- func (c *Client) Call(req *http.Request) (*http.Response, error)
- func (c *Client) CallWithAuthTokenHeader(req *http.Request) (*http.Response, error)
- func (c *Client) GetNowPrograms(ctx context.Context) (Stations, error)
- func (c *Client) GetNowProgramsByAreaID(ctx context.Context, areaID string) (Stations, error)
- func (c *Client) GetProgramByStartTime(ctx context.Context, stationID string, start time.Time) (*Prog, error)
- func (c *Client) GetStations(ctx context.Context, date time.Time) (Stations, error)
- func (c *Client) GetStationsByAreaID(ctx context.Context, areaID string, date time.Time) (Stations, error)
- func (c *Client) TimeshiftPlaylistM3U8(ctx context.Context, stationID string, start time.Time) (string, error)
- type Params
- type Prog
- type Progs
- type Scd
- type Station
- type Stations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadPlayer ¶
DownloadPlayer downloads swf player file.
func SetHTTPClient ¶
SetHTTPClient overrides the default HTTP client.
Types ¶
type Client ¶
Client represents a single connection to radiko API endpoint.
func (*Client) AuthorizeToken ¶
AuthorizeToken returns an enables auth_token and error, and sets auth_token in Client. Is is a alias function which wrapes Auth1Fms and Auth2Fms.
func (*Client) CallWithAuthTokenHeader ¶
CallWithAuthTokenHeader executes an API request with auth_token in HTTP Header.
func (*Client) GetNowPrograms ¶
GetNowPrograms returns program's meta-info in the current location. This API wrapes GetNowProgramsByAreaID.
func (*Client) GetNowProgramsByAreaID ¶
GetNowProgramsByAreaID returns program's meta-info which are currently on the air.
func (*Client) GetProgramByStartTime ¶
func (c *Client) GetProgramByStartTime(ctx context.Context, stationID string, start time.Time) (*Prog, error)
GetProgramByStartTime returns a specified program. This API wrapes GetStations.
func (*Client) GetStations ¶
GetStations returns program's meta-info in the current location. This API wrapes GetStationsByAreaID.
type Params ¶
type Params struct {
// contains filtered or unexported fields
}
Params is the list of options to pass to the request.
type Prog ¶
type Prog struct { Ft string `xml:"ft,attr"` To string `xml:"to,attr"` Ftl string `xml:"ftl,attr"` Tol string `xml:"tol,attr"` Dur string `xml:"dur,attr"` Title string `xml:"title"` SubTitle string `xml:"sub_title"` Desc string `xml:"desc"` Pfm string `xml:"pfm"` Info string `xml:"info"` URL string `xml:"url"` }
Prog is a struct.