Documentation
¶
Index ¶
Constants ¶
const ( // URL for fetching channels from JioTV API CHANNEL_URL = "https://jiotv.data.cdn.jio.com/apis/v3.0/getMobileChannelList/get/?os=android&devicetype=phone&usertype=tvYR7NSNn7rymo3F" // URL for fetching EPG data for individual channels from JioTV API EPG_URL = "https://jiotv.data.cdn.jio.com/apis/v1.3/getepg/get/?offset=%d&channel_id=%d" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Channel ¶
type Channel struct { XMLName xml.Name `xml:"channel"` // XML tag name ID int `xml:"id,attr"` // ID is attribute of channel tag Display string `xml:"display-name"` // Display name of the channel }
Channel XML tag structure for the EPG
type ChannelObject ¶
type ChannelObject struct { ChannelID int `json:"channel_id"` // Channel ID ChannelName string `json:"channel_name"` // Channel name LogoURL string `json:"logoUrl"` // Channel logo URL }
ChannelObject represents Individual channel detail from JioTV API response
type ChannelsResponse ¶
type ChannelsResponse struct { Channels []ChannelObject `json:"result"` // Channels Code int `json:"code"` // Response code Message string `json:"message"` // Response message }
ChannelsResponse represents Channel details from JioTV API response
type Desc ¶
type Desc struct { XMLName xml.Name `xml:"desc"` Value string `xml:",chardata"` // Description of the programme Lang string `xml:"lang,attr"` // Language of the description }
Desc represents Description XML tag for Programme XML tag in EPG
type EPG ¶
type EPG struct { XMLName xml.Name `xml:"tv"` // XML tag name XMLVersion string `xml:"version,attr"` // XML version XMLEncoding string `xml:"encoding,attr"` // XML encoding Channel []Channel `xml:"channel"` // Channel tags Programme []Programme `xml:"programme"` // Programme tags }
EPG XML tag structure
type EPGObject ¶
type EPGObject struct { StartEpoch EpochString `json:"startEpoch"` // Start time of the programme EndEpoch EpochString `json:"endEpoch"` // End time of the programme ChannelID uint16 `json:"channel_id"` // Channel ID ChannelName string `json:"channel_name"` // Channel name ShowCategory string `json:"showCategory"` // Category of the show Description string `json:"description"` // Description of the show Title string `json:"showname"` // Title of the show Thumbnail string `json:"episodeThumbnail"` // Thumbnail of the show Poster string `json:"episodePoster"` // Poster of the show }
EPGObject represents Individual EPG detail from JioTV EPG API response
type EPGResponse ¶
type EPGResponse struct {
EPG []EPGObject `json:"epg"` // EPG details for a channel
}
EPGResponse represents EPG details from JioTV EPG API response
type EpochString ¶
type EpochString string
EpochString is a custom type for unmarshaling epoch from integers to strings in JioTV EPG API
func (*EpochString) String ¶
func (id *EpochString) String() string
String returns the string representation of the EpochString
func (*EpochString) UnmarshalJSON ¶
func (id *EpochString) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals epoch integers to strings from JioTV EPG API
type Icon ¶
type Icon struct { XMLName xml.Name `xml:"icon"` // XML tag name Src string `xml:"src,attr"` // Src is attribute of the icon tag }
Icon XML tag for Programme XML tag in EPG
type Programme ¶
type Programme struct { XMLName xml.Name `xml:"programme"` // XML tag name Channel string `xml:"channel,attr"` // Channel is attribute of programme tag Start string `xml:"start,attr"` // Start time of the programme Stop string `xml:"stop,attr"` // Stop time of the programme Title Title `xml:"title"` // Title of the programme Desc Desc `xml:"desc"` // Description of the programme Icon Icon `xml:"icon"` // Icon of the programme }
Programme XML tag structure for EPG Each programme tag represents a show being aired on a channel
func NewProgramme ¶
NewProgramme creates a new Programme with the given parameters.