Documentation ¶
Index ¶
- Constants
- type APIResponse
- type Actions
- type AdditionalStream
- type AudioLanguages
- type AvailableLanguages
- type Bundles
- type Categories
- type Category
- type ChannelID
- type Container
- type ContainerResultObj
- type Containers
- type ContentContainer
- type ContentDetailsContainer
- type ContentID
- type ContentSubType
- type ContentType
- type EmfAttributes
- type F1TV
- func (f *F1TV) Authenticate(username, password string, logger util.Logger) error
- func (f *F1TV) ContentDetails(contentID ContentID) (TopContainer, error)
- func (f *F1TV) GetContent(format StreamType, category PageID, v interface{}) error
- func (f *F1TV) GetLiveVideoContainers() ([]ContentContainer, error)
- func (f *F1TV) GetPageContent(id PageID) ([]TopContainer, []RemoteContent, error)
- func (f *F1TV) GetPlaybackURL(format StreamType, contentID ContentID, channelID *ChannelID) (string, error)
- type Language
- type Metadata
- type MetadataLabel
- type PageID
- type PlatformVariants
- type Properties
- type RemoteContent
- type ResultObj
- type RetrieveItems
- type StreamType
- type Suggest
- type TechnicalPackage
- type TechnicalPackages
- type TopContainer
- type Translations
Constants ¶
View Source
const ( BIG_SCREEN_HLS StreamType = "BIG_SCREEN_HLS" WEB_HLS StreamType = "WEB_HLS" TABLET_HLS StreamType = "TABLET_HLS" MOBILE_HLS StreamType = "MOBILE_HLS" BIG_SCREEN_DASH StreamType = "BIG_SCREEN_DASH" WEB_DASH StreamType = "WEB_DASH" MOBILE_DASH StreamType = "MOBILE_DASH" TABLET_DASH StreamType = "TABLET_DASH" PAGE_HOMEPAGE PageID = 395 PAGE_ARCHIVE PageID = 493 PAGE_SHOWS PageID = 410 PAGE_DOCUMENTARIES PageID = 413 PAGE_SEASON_2022 PageID = 4319 VIDEO ContentType = "VIDEO" BUNDLE ContentType = "BUNDLE" LAUNCHER ContentType = "LAUNCHER" LIVE ContentSubType = "LIVE" REPLAY ContentSubType = "REPLAY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct { ResultCode string `json:"resultCode,omitempty"` Message string `json:"message,omitempty"` ErrorDescription string `json:"errorDescription,omitempty"` ResultObj ResultObj `json:"resultObj,omitempty"` SystemTime int64 `json:"systemTime,omitempty"` Source string `json:"source,omitempty"` }
type AdditionalStream ¶
type AdditionalStream struct { RacingNumber int `json:"racingNumber"` TeamName string `json:"teamName"` Type string `json:"type"` PlaybackURL string `json:"playbackUrl"` DriverImg string `json:"driverImg"` TeamImg string `json:"teamImg"` ChannelID ChannelID `json:"channelId"` Title string `json:"title"` ReportingName string `json:"reportingName"` Default bool `json:"default"` DriverFirstName string `json:"driverFirstName,omitempty"` DriverLastName string `json:"driverLastName,omitempty"` ConstructorName string `json:"constructorName,omitempty"` Hex string `json:"hex,omitempty"` }
func (AdditionalStream) PrettyName ¶
func (s AdditionalStream) PrettyName() string
type AudioLanguages ¶
type AvailableLanguages ¶
type Categories ¶
type Categories struct { CategoryPathIds []int `json:"categoryPathIds,omitempty"` ExternalPathIds []string `json:"externalPathIds,omitempty"` EndDate int64 `json:"endDate,omitempty"` OrderID int `json:"orderId,omitempty"` IsPrimary bool `json:"isPrimary,omitempty"` CategoryName string `json:"categoryName,omitempty"` CategoryID int `json:"categoryId,omitempty"` StartDate int64 `json:"startDate,omitempty"` }
type Category ¶
type Category struct { ExternalPathIds []string `json:"externalPathIds,omitempty"` StartDate int64 `json:"startDate,omitempty"` CategoryID int `json:"categoryId,omitempty"` EndDate int64 `json:"endDate,omitempty"` CategoryPathIds []int `json:"categoryPathIds,omitempty"` OrderID int `json:"orderId,omitempty"` IsPrimary bool `json:"isPrimary,omitempty"` CategoryName string `json:"categoryName,omitempty"` }
type Container ¶
type Container struct { ID string `json:"id,omitempty"` Layout string `json:"layout,omitempty"` Actions []Actions `json:"actions,omitempty"` PlatformVariants []PlatformVariants `json:"platformVariants,omitempty"` Properties []Properties `json:"properties,omitempty"` Metadata Metadata `json:"metadata,omitempty"` RetrieveItems RetrieveItems `json:"retrieveItems,omitempty"` Translations Translations `json:"translations,omitempty"` Categories []Category `json:"categories,omitempty"` Bundles []Bundles `json:"bundles,omitempty"` }
type ContainerResultObj ¶
type ContainerResultObj struct { Total int `json:"total,omitempty"` Containers []ContentContainer `json:"containers,omitempty"` MeetingName string `json:"meetingName,omitempty"` Metadata Metadata `json:"metadata,omitempty"` }
type Containers ¶
type Containers struct{}
type ContentContainer ¶
type ContentContainer struct { ID string `json:"id,omitempty"` Layout string `json:"layout,omitempty"` Actions []Actions `json:"actions,omitempty"` PlatformVariants []PlatformVariants `json:"platformVariants,omitempty"` Properties []Properties `json:"properties,omitempty"` Metadata Metadata `json:"metadata,omitempty"` Containers struct { Categories []Category `json:"categories,omitempty"` Bundles []Bundles `json:"bundles,omitempty"` } `json:"containers,omitempty"` }
type ContentDetailsContainer ¶
type ContentDetailsContainer struct{}
type ContentSubType ¶
type ContentSubType string
type ContentType ¶
type ContentType string
type EmfAttributes ¶
type EmfAttributes struct { VideoType string `json:"VideoType,omitempty"` MeetingKey string `json:"MeetingKey,omitempty"` MeetingSessionKey string `json:"MeetingSessionKey,omitempty"` MeetingName string `json:"Meeting_Name,omitempty"` MeetingNumber string `json:"Meeting_Number,omitempty"` CircuitShortName string `json:"Circuit_Short_Name,omitempty"` MeetingCode string `json:"Meeting_Code,omitempty"` MeetingCountryKey string `json:"MeetingCountryKey,omitempty"` CircuitKey string `json:"CircuitKey,omitempty"` MeetingLocation string `json:"Meeting_Location,omitempty"` Series string `json:"Series,omitempty"` OBC bool `json:"OBC,omitempty"` State string `json:"state,omitempty"` TimetableKey string `json:"TimetableKey,omitempty"` SessionKey string `json:"SessionKey,omitempty"` SessionPeriod string `json:"SessionPeriod,omitempty"` CircuitOfficialName string `json:"Circuit_Official_Name,omitempty"` ActivityDescription string `json:"ActivityDescription,omitempty"` SeriesMeetingSessionIdentifier string `json:"SeriesMeetingSessionIdentifier,omitempty"` SessionEndTime string `json:"sessionEndTime,omitempty"` MeetingStartDate string `json:"Meeting_Start_Date,omitempty"` MeetingEndDate string `json:"Meeting_End_Date,omitempty"` TrackLength string `json:"Track_Length,omitempty"` ScheduledLapCount string `json:"Scheduled_Lap_Count,omitempty"` ScheduledDistance string `json:"Scheduled_Distance,omitempty"` CircuitLocation string `json:"Circuit_Location,omitempty"` MeetingSponsor string `json:"Meeting_Sponsor,omitempty"` IsTestEvent string `json:"IsTestEvent,omitempty"` ChampionshipMeetingOrdinal string `json:"Championship_Meeting_Ordinal,omitempty"` MeetingOfficialName string `json:"Meeting_Official_Name,omitempty"` MeetingDisplayDate string `json:"Meeting_Display_Date,omitempty"` PageID PageID `json:"PageID,omitempty"` MeetingCountryName string `json:"Meeting_Country_Name,omitempty"` GlobalTitle string `json:"Global_Title,omitempty"` GlobalMeetingCountryName string `json:"Global_Meeting_Country_Name,omitempty"` GlobalMeetingName string `json:"Global_Meeting_Name,omitempty"` DriversID string `json:"Drivers_ID,omitempty"` Year string `json:"Year,omitempty"` TeamsID string `json:"Teams_ID,omitempty"` }
type F1TV ¶
type F1TV struct { SubscriptionToken string Client *http.Client // contains filtered or unexported fields }
func (*F1TV) Authenticate ¶
func (*F1TV) ContentDetails ¶
func (f *F1TV) ContentDetails(contentID ContentID) (TopContainer, error)
func (*F1TV) GetContent ¶
func (f *F1TV) GetContent(format StreamType, category PageID, v interface{}) error
func (*F1TV) GetLiveVideoContainers ¶
func (f *F1TV) GetLiveVideoContainers() ([]ContentContainer, error)
func (*F1TV) GetPageContent ¶ added in v2.1.0
func (f *F1TV) GetPageContent(id PageID) ([]TopContainer, []RemoteContent, error)
func (*F1TV) GetPlaybackURL ¶
type Metadata ¶
type Metadata struct { EmfAttributes EmfAttributes `json:"emfAttributes,omitempty"` LongDescription string `json:"longDescription,omitempty"` Country string `json:"country,omitempty"` Year string `json:"year,omitempty"` ContractStartDate int64 `json:"contractStartDate,omitempty"` EpisodeNumber int64 `json:"episodeNumber,omitempty"` ContractEndDate int64 `json:"contractEndDate,omitempty"` ExternalID string `json:"externalId,omitempty"` Title string `json:"title,omitempty"` TitleBrief string `json:"titleBrief,omitempty"` ObjectType string `json:"objectType,omitempty"` Duration int64 `json:"duration,omitempty"` Genres []string `json:"genres,omitempty"` ContentSubtype ContentSubType `json:"contentSubtype,omitempty"` PcLevel int `json:"pcLevel,omitempty"` ContentID ContentID `json:"contentId,omitempty"` StarRating int `json:"starRating,omitempty"` PictureURL string `json:"pictureUrl,omitempty"` ContentType ContentType `json:"contentType,omitempty"` Language string `json:"language,omitempty"` Season int `json:"season,omitempty"` UIDuration string `json:"uiDuration,omitempty"` Entitlement string `json:"entitlement,omitempty"` Locked bool `json:"locked,omitempty"` Label string `json:"label,omitempty"` ImageURL string `json:"imageUrl,omitempty"` ID string `json:"id,omitempty"` MetaDescription string `json:"meta-description,omitempty"` IsADVAllowed bool `json:"isADVAllowed,omitempty"` ContentProvider string `json:"contentProvider,omitempty"` IsLatest bool `json:"isLatest,omitempty"` IsOnAir bool `json:"isOnAir,omitempty"` IsEncrypted bool `json:"isEncrypted,omitempty"` ObjectSubtype string `json:"objectSubtype,omitempty"` MetadataLanguage string `json:"metadataLanguage,omitempty"` PcLevelVod string `json:"pcLevelVod,omitempty"` IsParent bool `json:"isParent,omitempty"` AvailableLanguages []AvailableLanguages `json:"availableLanguages,omitempty"` AdvTags string `json:"advTags,omitempty"` ShortDescription string `json:"shortDescription,omitempty"` LeavingSoon bool `json:"leavingSoon,omitempty"` AvailableAlso []string `json:"availableAlso,omitempty"` PcVodLabel string `json:"pcVodLabel,omitempty"` IsGeoBlocked bool `json:"isGeoBlocked,omitempty"` Filter string `json:"filter,omitempty"` ComingSoon bool `json:"comingSoon,omitempty"` IsPopularEpisode bool `json:"isPopularEpisode,omitempty"` PrimaryCategoryID int `json:"primaryCategoryId,omitempty"` MeetingKey string `json:"meetingKey,omitempty"` VideoType string `json:"videoType,omitempty"` ParentalAdvisory string `json:"parentalAdvisory,omitempty"` AdditionalStreams []AdditionalStream `json:"additionalStreams,omitempty"` }
type MetadataLabel ¶
type PlatformVariants ¶
type PlatformVariants struct { SubtitlesLanguages []interface{} `json:"subtitlesLanguages,omitempty"` AudioLanguages []interface{} `json:"audioLanguages,omitempty"` TechnicalPackages []TechnicalPackage `json:"technicalPackages,omitempty"` CpID int `json:"cpId,omitempty"` VideoType string `json:"videoType,omitempty"` PictureURL string `json:"pictureUrl,omitempty"` TrailerURL string `json:"trailerUrl,omitempty"` HasTrailer bool `json:"hasTrailer,omitempty"` }
type Properties ¶
type Properties struct { MeetingNumber int64 `json:"meeting_Number,omitempty"` SessionEndTime int64 `json:"sessionEndTime,omitempty"` Series string `json:"series,omitempty"` LastUpdatedDate int64 `json:"lastUpdatedDate,omitempty"` SeasonMeetingOrdinal int64 `json:"season_Meeting_Ordinal,omitempty"` MeetingStartDate int64 `json:"meeting_Start_Date,omitempty"` MeetingEndDate int64 `json:"meeting_End_Date,omitempty"` Season int64 `json:"season,omitempty"` SessionIndex int64 `json:"session_index,omitempty"` SessionStartDate int64 `json:"sessionStartDate,omitempty"` MeetingSessionKey int64 `json:"meetingSessionKey,omitempty"` SessionEndDate int64 `json:"sessionEndDate,omitempty"` }
type RemoteContent ¶ added in v2.1.0
type ResultObj ¶
type ResultObj struct { Total int `json:"total,omitempty"` Containers []TopContainer `json:"containers,omitempty"` MeetingName string `json:"meetingName,omitempty"` Metadata Metadata `json:"metadata,omitempty"` }
type RetrieveItems ¶
type RetrieveItems struct { ResultObj ContainerResultObj `json:"resultObj,omitempty"` URIOriginal string `json:"uriOriginal,omitempty"` TypeOriginal string `json:"typeOriginal,omitempty"` }
type StreamType ¶
type StreamType string
type TechnicalPackage ¶
type TechnicalPackages ¶
type TopContainer ¶
type TopContainer struct { // inconsistent type // ID string `json:"id,omitempty"` Layout string `json:"layout,omitempty"` Actions []Actions `json:"actions,omitempty"` Metadata Metadata `json:"metadata,omitempty"` RetrieveItems RetrieveItems `json:"retrieveItems,omitempty"` Translations Translations `json:"translations,omitempty"` // only in content details PlatformVariants []PlatformVariants `json:"platformVariants,omitempty"` ContentID ContentID `json:"contentId,omitempty"` Containers struct { Bundles []Bundles `json:"bundles,omitempty"` Categories []Categories `json:"categories,omitempty"` } `json:"containers,omitempty"` Suggest Suggest `json:"suggest,omitempty"` PlatformName string `json:"platformName,omitempty"` Properties []Properties `json:"properties,omitempty"` }
type Translations ¶
type Translations struct {
MetadataLabel MetadataLabel `json:"metadata.label,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.