// Package youtube provides access to the YouTube Data API. // // See https://developers.google.com/youtube/v3 // // Usage example: // // import "google.golang.org/api/youtube/v3" // ... // youtubeService, err := youtube.New(oauthHttpClient) package youtube import ( "bytes" "encoding/json" "errors" "fmt" "google.golang.org/api/googleapi" "io" "net/http" "net/url" "strconv" "strings" ) // Always reference these packages, just in case the auto-generated code // below doesn't. var _ = bytes.NewBuffer var _ = strconv.Itoa var _ = fmt.Sprintf var _ = json.NewDecoder var _ = io.Copy var _ = url.Parse var _ = googleapi.Version var _ = errors.New var _ = strings.Replace const apiId = "youtube:v3" const apiName = "youtube" const apiVersion = "v3" const basePath = "https://www.googleapis.com/youtube/v3/" // OAuth2 scopes used by this API. const ( // Manage your YouTube account YoutubeScope = "https://www.googleapis.com/auth/youtube" // View your YouTube account YoutubeReadonlyScope = "https://www.googleapis.com/auth/youtube.readonly" // Manage your YouTube videos YoutubeUploadScope = "https://www.googleapis.com/auth/youtube.upload" // View and manage your assets and associated content on YouTube YoutubepartnerScope = "https://www.googleapis.com/auth/youtubepartner" // View private information of your YouTube channel relevant during the // audit process with a YouTube partner YoutubepartnerChannelAuditScope = "https://www.googleapis.com/auth/youtubepartner-channel-audit" ) func New(client *http.Client) (*Service, error) { if client == nil { return nil, errors.New("client is nil") } s := &Service{client: client, BasePath: basePath} s.Activities = NewActivitiesService(s) s.ChannelBanners = NewChannelBannersService(s) s.ChannelSections = NewChannelSectionsService(s) s.Channels = NewChannelsService(s) s.GuideCategories = NewGuideCategoriesService(s) s.I18nLanguages = NewI18nLanguagesService(s) s.I18nRegions = NewI18nRegionsService(s) s.LiveBroadcasts = NewLiveBroadcastsService(s) s.LiveStreams = NewLiveStreamsService(s) s.PlaylistItems = NewPlaylistItemsService(s) s.Playlists = NewPlaylistsService(s) s.Search = NewSearchService(s) s.Subscriptions = NewSubscriptionsService(s) s.Thumbnails = NewThumbnailsService(s) s.VideoCategories = NewVideoCategoriesService(s) s.Videos = NewVideosService(s) s.Watermarks = NewWatermarksService(s) return s, nil } type Service struct { client *http.Client BasePath string // API endpoint base URL Activities *ActivitiesService ChannelBanners *ChannelBannersService ChannelSections *ChannelSectionsService Channels *ChannelsService GuideCategories *GuideCategoriesService I18nLanguages *I18nLanguagesService I18nRegions *I18nRegionsService LiveBroadcasts *LiveBroadcastsService LiveStreams *LiveStreamsService PlaylistItems *PlaylistItemsService Playlists *PlaylistsService Search *SearchService Subscriptions *SubscriptionsService Thumbnails *ThumbnailsService VideoCategories *VideoCategoriesService Videos *VideosService Watermarks *WatermarksService } func NewActivitiesService(s *Service) *ActivitiesService { rs := &ActivitiesService{s: s} return rs } type ActivitiesService struct { s *Service } func NewChannelBannersService(s *Service) *ChannelBannersService { rs := &ChannelBannersService{s: s} return rs } type ChannelBannersService struct { s *Service } func NewChannelSectionsService(s *Service) *ChannelSectionsService { rs := &ChannelSectionsService{s: s} return rs } type ChannelSectionsService struct { s *Service } func NewChannelsService(s *Service) *ChannelsService { rs := &ChannelsService{s: s} return rs } type ChannelsService struct { s *Service } func NewGuideCategoriesService(s *Service) *GuideCategoriesService { rs := &GuideCategoriesService{s: s} return rs } type GuideCategoriesService struct { s *Service } func NewI18nLanguagesService(s *Service) *I18nLanguagesService { rs := &I18nLanguagesService{s: s} return rs } type I18nLanguagesService struct { s *Service } func NewI18nRegionsService(s *Service) *I18nRegionsService { rs := &I18nRegionsService{s: s} return rs } type I18nRegionsService struct { s *Service } func NewLiveBroadcastsService(s *Service) *LiveBroadcastsService { rs := &LiveBroadcastsService{s: s} return rs } type LiveBroadcastsService struct { s *Service } func NewLiveStreamsService(s *Service) *LiveStreamsService { rs := &LiveStreamsService{s: s} return rs } type LiveStreamsService struct { s *Service } func NewPlaylistItemsService(s *Service) *PlaylistItemsService { rs := &PlaylistItemsService{s: s} return rs } type PlaylistItemsService struct { s *Service } func NewPlaylistsService(s *Service) *PlaylistsService { rs := &PlaylistsService{s: s} return rs } type PlaylistsService struct { s *Service } func NewSearchService(s *Service) *SearchService { rs := &SearchService{s: s} return rs } type SearchService struct { s *Service } func NewSubscriptionsService(s *Service) *SubscriptionsService { rs := &SubscriptionsService{s: s} return rs } type SubscriptionsService struct { s *Service } func NewThumbnailsService(s *Service) *ThumbnailsService { rs := &ThumbnailsService{s: s} return rs } type ThumbnailsService struct { s *Service } func NewVideoCategoriesService(s *Service) *VideoCategoriesService { rs := &VideoCategoriesService{s: s} return rs } type VideoCategoriesService struct { s *Service } func NewVideosService(s *Service) *VideosService { rs := &VideosService{s: s} return rs } type VideosService struct { s *Service } func NewWatermarksService(s *Service) *WatermarksService { rs := &WatermarksService{s: s} return rs } type WatermarksService struct { s *Service } type AccessPolicy struct { // Allowed: The value of allowed indicates whether the access to the // policy is allowed or denied by default. Allowed bool `json:"allowed,omitempty"` // Exception: A list of region codes that identify countries where the // default policy do not apply. Exception []string `json:"exception,omitempty"` } type Activity struct { // ContentDetails: The contentDetails object contains information about // the content associated with the activity. For example, if the // snippet.type value is videoRated, then the contentDetails object's // content identifies the rated video. ContentDetails *ActivityContentDetails `json:"contentDetails,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the activity. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#activity". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the // activity, including the activity's type and group ID. Snippet *ActivitySnippet `json:"snippet,omitempty"` } type ActivityContentDetails struct { // Bulletin: The bulletin object contains details about a channel // bulletin post. This object is only present if the snippet.type is // bulletin. Bulletin *ActivityContentDetailsBulletin `json:"bulletin,omitempty"` // ChannelItem: The channelItem object contains details about a resource // which was added to a channel. This property is only present if the // snippet.type is channelItem. ChannelItem *ActivityContentDetailsChannelItem `json:"channelItem,omitempty"` // Comment: The comment object contains information about a resource // that received a comment. This property is only present if the // snippet.type is comment. Comment *ActivityContentDetailsComment `json:"comment,omitempty"` // Favorite: The favorite object contains information about a video that // was marked as a favorite video. This property is only present if the // snippet.type is favorite. Favorite *ActivityContentDetailsFavorite `json:"favorite,omitempty"` // Like: The like object contains information about a resource that // received a positive (like) rating. This property is only present if // the snippet.type is like. Like *ActivityContentDetailsLike `json:"like,omitempty"` // PlaylistItem: The playlistItem object contains information about a // new playlist item. This property is only present if the snippet.type // is playlistItem. PlaylistItem *ActivityContentDetailsPlaylistItem `json:"playlistItem,omitempty"` // PromotedItem: The promotedItem object contains details about a // resource which is being promoted. This property is only present if // the snippet.type is promotedItem. PromotedItem *ActivityContentDetailsPromotedItem `json:"promotedItem,omitempty"` // Recommendation: The recommendation object contains information about // a recommended resource. This property is only present if the // snippet.type is recommendation. Recommendation *ActivityContentDetailsRecommendation `json:"recommendation,omitempty"` // Social: The social object contains details about a social network // post. This property is only present if the snippet.type is social. Social *ActivityContentDetailsSocial `json:"social,omitempty"` // Subscription: The subscription object contains information about a // channel that a user subscribed to. This property is only present if // the snippet.type is subscription. Subscription *ActivityContentDetailsSubscription `json:"subscription,omitempty"` // Upload: The upload object contains information about the uploaded // video. This property is only present if the snippet.type is upload. Upload *ActivityContentDetailsUpload `json:"upload,omitempty"` } type ActivityContentDetailsBulletin struct { // ResourceId: The resourceId object contains information that // identifies the resource associated with a bulletin post. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsChannelItem struct { // ResourceId: The resourceId object contains information that // identifies the resource that was added to the channel. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsComment struct { // ResourceId: The resourceId object contains information that // identifies the resource associated with the comment. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsFavorite struct { // ResourceId: The resourceId object contains information that // identifies the resource that was marked as a favorite. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsLike struct { // ResourceId: The resourceId object contains information that // identifies the rated resource. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsPlaylistItem struct { // PlaylistId: The value that YouTube uses to uniquely identify the // playlist. PlaylistId string `json:"playlistId,omitempty"` // PlaylistItemId: ID of the item within the playlist. PlaylistItemId string `json:"playlistItemId,omitempty"` // ResourceId: The resourceId object contains information about the // resource that was added to the playlist. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsPromotedItem struct { // AdTag: The URL the client should fetch to request a promoted item. AdTag string `json:"adTag,omitempty"` // ClickTrackingUrl: The URL the client should ping to indicate that the // user clicked through on this promoted item. ClickTrackingUrl string `json:"clickTrackingUrl,omitempty"` // CreativeViewUrl: The URL the client should ping to indicate that the // user was shown this promoted item. CreativeViewUrl string `json:"creativeViewUrl,omitempty"` // CtaType: The type of call-to-action, a message to the user indicating // action that can be taken. CtaType string `json:"ctaType,omitempty"` // CustomCtaButtonText: The custom call-to-action button text. If // specified, it will override the default button text for the cta_type. CustomCtaButtonText string `json:"customCtaButtonText,omitempty"` // DescriptionText: The text description to accompany the promoted item. DescriptionText string `json:"descriptionText,omitempty"` // DestinationUrl: The URL the client should direct the user to, if the // user chooses to visit the advertiser's website. DestinationUrl string `json:"destinationUrl,omitempty"` // ForecastingUrl: The list of forecasting URLs. The client should ping // all of these URLs when a promoted item is not available, to indicate // that a promoted item could have been shown. ForecastingUrl []string `json:"forecastingUrl,omitempty"` // ImpressionUrl: The list of impression URLs. The client should ping // all of these URLs to indicate that the user was shown this promoted // item. ImpressionUrl []string `json:"impressionUrl,omitempty"` // VideoId: The ID that YouTube uses to uniquely identify the promoted // video. VideoId string `json:"videoId,omitempty"` } type ActivityContentDetailsRecommendation struct { // Reason: The reason that the resource is recommended to the user. Reason string `json:"reason,omitempty"` // ResourceId: The resourceId object contains information that // identifies the recommended resource. ResourceId *ResourceId `json:"resourceId,omitempty"` // SeedResourceId: The seedResourceId object contains information about // the resource that caused the recommendation. SeedResourceId *ResourceId `json:"seedResourceId,omitempty"` } type ActivityContentDetailsSocial struct { // Author: The author of the social network post. Author string `json:"author,omitempty"` // ImageUrl: An image of the post's author. ImageUrl string `json:"imageUrl,omitempty"` // ReferenceUrl: The URL of the social network post. ReferenceUrl string `json:"referenceUrl,omitempty"` // ResourceId: The resourceId object encapsulates information that // identifies the resource associated with a social network post. ResourceId *ResourceId `json:"resourceId,omitempty"` // Type: The name of the social network. Type string `json:"type,omitempty"` } type ActivityContentDetailsSubscription struct { // ResourceId: The resourceId object contains information that // identifies the resource that the user subscribed to. ResourceId *ResourceId `json:"resourceId,omitempty"` } type ActivityContentDetailsUpload struct { // VideoId: The ID that YouTube uses to uniquely identify the uploaded // video. VideoId string `json:"videoId,omitempty"` } type ActivityListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of activities, or events, that match the request // criteria. Items []*Activity `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#activityListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type ActivitySnippet struct { // ChannelId: The ID that YouTube uses to uniquely identify the channel // associated with the activity. ChannelId string `json:"channelId,omitempty"` // ChannelTitle: Channel title for the channel responsible for this // activity ChannelTitle string `json:"channelTitle,omitempty"` // Description: The description of the resource primarily associated // with the activity. Description string `json:"description,omitempty"` // GroupId: The group ID associated with the activity. A group ID // identifies user events that are associated with the same user and // resource. For example, if a user rates a video and marks the same // video as a favorite, the entries for those events would have the same // group ID in the user's activity feed. In your user interface, you can // avoid repetition by grouping events with the same groupId value. GroupId string `json:"groupId,omitempty"` // PublishedAt: The date and time that the video was uploaded. The value // is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. PublishedAt string `json:"publishedAt,omitempty"` // Thumbnails: A map of thumbnail images associated with the resource // that is primarily associated with the activity. For each object in // the map, the key is the name of the thumbnail image, and the value is // an object that contains other information about the thumbnail. Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"` // Title: The title of the resource primarily associated with the // activity. Title string `json:"title,omitempty"` // Type: The type of activity that the resource describes. Type string `json:"type,omitempty"` } type CdnSettings struct { // Format: The format of the video stream that you are sending to // Youtube. Format string `json:"format,omitempty"` // IngestionInfo: The ingestionInfo object contains information that // YouTube provides that you need to transmit your RTMP or HTTP stream // to YouTube. IngestionInfo *IngestionInfo `json:"ingestionInfo,omitempty"` // IngestionType: The method or protocol used to transmit the video // stream. IngestionType string `json:"ingestionType,omitempty"` } type Channel struct { // AuditDetails: The auditionDetails object encapsulates channel data // that is relevant for YouTube Partners during the audition process. AuditDetails *ChannelAuditDetails `json:"auditDetails,omitempty"` // BrandingSettings: The brandingSettings object encapsulates // information about the branding of the channel. BrandingSettings *ChannelBrandingSettings `json:"brandingSettings,omitempty"` // ContentDetails: The contentDetails object encapsulates information // about the channel's content. ContentDetails *ChannelContentDetails `json:"contentDetails,omitempty"` // ContentOwnerDetails: The contentOwnerDetails object encapsulates // channel data that is relevant for YouTube Partners linked with the // channel. ContentOwnerDetails *ChannelContentOwnerDetails `json:"contentOwnerDetails,omitempty"` // ConversionPings: The conversionPings object encapsulates information // about conversion pings that need to be respected by the channel. ConversionPings *ChannelConversionPings `json:"conversionPings,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the channel. Id string `json:"id,omitempty"` // InvideoPromotion: The invideoPromotion object encapsulates // information about promotion campaign associated with the channel. InvideoPromotion *InvideoPromotion `json:"invideoPromotion,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#channel". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the channel, // such as its title, description, and thumbnail images. Snippet *ChannelSnippet `json:"snippet,omitempty"` // Statistics: The statistics object encapsulates statistics for the // channel. Statistics *ChannelStatistics `json:"statistics,omitempty"` // Status: The status object encapsulates information about the privacy // status of the channel. Status *ChannelStatus `json:"status,omitempty"` // TopicDetails: The topicDetails object encapsulates information about // Freebase topics associated with the channel. TopicDetails *ChannelTopicDetails `json:"topicDetails,omitempty"` } type ChannelAuditDetails struct { // CommunityGuidelinesGoodStanding: Whether or not the channel respects // the community guidelines. CommunityGuidelinesGoodStanding bool `json:"communityGuidelinesGoodStanding,omitempty"` // ContentIdClaimsGoodStanding: Whether or not the channel has any // unresolved claims. ContentIdClaimsGoodStanding bool `json:"contentIdClaimsGoodStanding,omitempty"` // CopyrightStrikesGoodStanding: Whether or not the channel has any // copyright strikes. CopyrightStrikesGoodStanding bool `json:"copyrightStrikesGoodStanding,omitempty"` // OverallGoodStanding: Describes the general state of the channel. This // field will always show if there are any issues whatsoever with the // channel. Currently this field represents the result of the logical // and operation over the community guidelines good standing, the // copyright strikes good standing and the content ID claims good // standing, but this may change in the future. OverallGoodStanding bool `json:"overallGoodStanding,omitempty"` } type ChannelBannerResource struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#channelBannerResource". Kind string `json:"kind,omitempty"` // Url: The URL of this banner image. Url string `json:"url,omitempty"` } type ChannelBrandingSettings struct { // Channel: Branding properties for the channel view. Channel *ChannelSettings `json:"channel,omitempty"` // Hints: Additional experimental branding properties. Hints []*PropertyValue `json:"hints,omitempty"` // Image: Branding properties for branding images. Image *ImageSettings `json:"image,omitempty"` // Watch: Branding properties for the watch page. Watch *WatchSettings `json:"watch,omitempty"` } type ChannelContentDetails struct { // GooglePlusUserId: The googlePlusUserId object identifies the Google+ // profile ID associated with this channel. GooglePlusUserId string `json:"googlePlusUserId,omitempty"` RelatedPlaylists *ChannelContentDetailsRelatedPlaylists `json:"relatedPlaylists,omitempty"` } type ChannelContentDetailsRelatedPlaylists struct { // Favorites: The ID of the playlist that contains the channel"s // favorite videos. Use the playlistItems.insert and // playlistItems.delete to add or remove items from that list. Favorites string `json:"favorites,omitempty"` // Likes: The ID of the playlist that contains the channel"s liked // videos. Use the playlistItems.insert and playlistItems.delete to // add or remove items from that list. Likes string `json:"likes,omitempty"` // Uploads: The ID of the playlist that contains the channel"s uploaded // videos. Use the videos.insert method to upload new videos and the // videos.delete method to delete previously uploaded videos. Uploads string `json:"uploads,omitempty"` // WatchHistory: The ID of the playlist that contains the channel"s // watch history. Use the playlistItems.insert and // playlistItems.delete to add or remove items from that list. WatchHistory string `json:"watchHistory,omitempty"` // WatchLater: The ID of the playlist that contains the channel"s watch // later playlist. Use the playlistItems.insert and // playlistItems.delete to add or remove items from that list. WatchLater string `json:"watchLater,omitempty"` } type ChannelContentOwnerDetails struct { // ContentOwner: The ID of the content owner linked to the channel. ContentOwner string `json:"contentOwner,omitempty"` // TimeLinked: The date and time of when the channel was linked to the // content owner. The value is specified in ISO 8601 // (YYYY-MM-DDThh:mm:ss.sZ) format. TimeLinked string `json:"timeLinked,omitempty"` } type ChannelConversionPing struct { // Context: Defines the context of the ping. Context string `json:"context,omitempty"` // ConversionUrl: The url (without the schema) that the player shall // send the ping to. It's at caller's descretion to decide which schema // to use (http vs https) Example of a returned url: // //googleads.g.doubleclick.net/pagead/ // viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D // cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must // append biscotti authentication (ms param in case of mobile, for // example) to this ping. ConversionUrl string `json:"conversionUrl,omitempty"` } type ChannelConversionPings struct { // Pings: Pings that the app shall fire (authenticated by biscotti // cookie). Each ping has a context, in which the app must fire the // ping, and a url identifying the ping. Pings []*ChannelConversionPing `json:"pings,omitempty"` } type ChannelListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of channels that match the request criteria. Items []*Channel `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#channelListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type ChannelSection struct { // ContentDetails: The contentDetails object contains details about the // ChannelSection content, such as playlists and channels. ContentDetails *ChannelSectionContentDetails `json:"contentDetails,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the ChannelSection. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#channelSection". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the // ChannelSection, such as its type, style and title. Snippet *ChannelSectionSnippet `json:"snippet,omitempty"` } type ChannelSectionContentDetails struct { // Channels: The channel ids for type multiple_channels. Channels []string `json:"channels,omitempty"` // Playlists: The playlist ids for type single_playlist and // multiple_playlists. For singlePlaylist, only one playlistId is // allowed. Playlists []string `json:"playlists,omitempty"` } type ChannelSectionListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of ChannelSections that match the request criteria. Items []*ChannelSection `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#channelSectionListResponse". Kind string `json:"kind,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type ChannelSectionSnippet struct { // ChannelId: The ID that YouTube uses to uniquely identify the channel // that published the channelSection. ChannelId string `json:"channelId,omitempty"` // Position: The position of the channelSection in the channel. Position int64 `json:"position,omitempty"` // Style: The style of the channelSection. Style string `json:"style,omitempty"` // Title: The channelSection's title for multiple_playlists and // multiple_channels. Title string `json:"title,omitempty"` // Type: The type of the channelSection. Type string `json:"type,omitempty"` } type ChannelSettings struct { // DefaultTab: Which content tab users should see when viewing the // channel. DefaultTab string `json:"defaultTab,omitempty"` // Description: Specifies the channel description. Description string `json:"description,omitempty"` // FeaturedChannelsTitle: Title for the featured channels tab. FeaturedChannelsTitle string `json:"featuredChannelsTitle,omitempty"` // FeaturedChannelsUrls: The list of featured channels. FeaturedChannelsUrls []string `json:"featuredChannelsUrls,omitempty"` // Keywords: Lists keywords associated with the channel, // comma-separated. Keywords string `json:"keywords,omitempty"` // ModerateComments: Whether user-submitted comments left on the channel // page need to be approved by the channel owner to be publicly visible. ModerateComments bool `json:"moderateComments,omitempty"` // ProfileColor: A prominent color that can be rendered on this channel // page. ProfileColor string `json:"profileColor,omitempty"` // ShowBrowseView: Whether the tab to browse the videos should be // displayed. ShowBrowseView bool `json:"showBrowseView,omitempty"` // ShowRelatedChannels: Whether related channels should be proposed. ShowRelatedChannels bool `json:"showRelatedChannels,omitempty"` // Title: Specifies the channel title. Title string `json:"title,omitempty"` // TrackingAnalyticsAccountId: The ID for a Google Analytics account to // track and measure traffic to the channels. TrackingAnalyticsAccountId string `json:"trackingAnalyticsAccountId,omitempty"` // UnsubscribedTrailer: The trailer of the channel, for users that are // not subscribers. UnsubscribedTrailer string `json:"unsubscribedTrailer,omitempty"` } type ChannelSnippet struct { // Description: The description of the channel. Description string `json:"description,omitempty"` // PublishedAt: The date and time that the channel was created. The // value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. PublishedAt string `json:"publishedAt,omitempty"` // Thumbnails: A map of thumbnail images associated with the channel. // For each object in the map, the key is the name of the thumbnail // image, and the value is an object that contains other information // about the thumbnail. Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"` // Title: The channel's title. Title string `json:"title,omitempty"` } type ChannelStatistics struct { // CommentCount: The number of comments for the channel. CommentCount uint64 `json:"commentCount,omitempty,string"` // HiddenSubscriberCount: Whether or not the number of subscribers is // shown for this user. HiddenSubscriberCount bool `json:"hiddenSubscriberCount,omitempty"` // SubscriberCount: The number of subscribers that the channel has. SubscriberCount uint64 `json:"subscriberCount,omitempty,string"` // VideoCount: The number of videos uploaded to the channel. VideoCount uint64 `json:"videoCount,omitempty,string"` // ViewCount: The number of times the channel has been viewed. ViewCount uint64 `json:"viewCount,omitempty,string"` } type ChannelStatus struct { // IsLinked: If true, then the user is linked to either a YouTube // username or G+ account. Otherwise, the user doesn't have a public // YouTube identity. IsLinked bool `json:"isLinked,omitempty"` // LongUploadsStatus: The long uploads status of this channel. See LongUploadsStatus string `json:"longUploadsStatus,omitempty"` // PrivacyStatus: Privacy status of the channel. PrivacyStatus string `json:"privacyStatus,omitempty"` } type ChannelTopicDetails struct { // TopicIds: A list of Freebase topic IDs associated with the channel. // You can retrieve information about each topic using the Freebase // Topic API. TopicIds []string `json:"topicIds,omitempty"` } type ContentRating struct { // AcbRating: Rating system in Australia - Australian Classification // Board AcbRating string `json:"acbRating,omitempty"` // AgcomRating: Rating system for Italy - Autorit� per le Garanzie // nelle Comunicazioni AgcomRating string `json:"agcomRating,omitempty"` // AnatelRating: Rating system for Chile - Asociaci�n Nacional de // Televisi�n AnatelRating string `json:"anatelRating,omitempty"` // BbfcRating: British Board of Film Classification BbfcRating string `json:"bbfcRating,omitempty"` // BfvcRating: Rating system for Thailand - Board of Filmand Video // Censors BfvcRating string `json:"bfvcRating,omitempty"` // BmukkRating: Rating system for Austria - Bundesministeriums f�r // Unterricht, Kunst und Kultur! BmukkRating string `json:"bmukkRating,omitempty"` // CatvRating: Rating system for Canadian TV - Canadian TV // Classification System CatvRating string `json:"catvRating,omitempty"` // CatvfrRating: Rating system for French Canadian TV - Regie du cinema CatvfrRating string `json:"catvfrRating,omitempty"` // CbfcRating: Rating system in India - Central Board of Film // Certification CbfcRating string `json:"cbfcRating,omitempty"` // CccRating: Rating system for Chile - Consejo de Calificaci�n // Cinematogr�fica CccRating string `json:"cccRating,omitempty"` // CceRating: Rating system for Portugal - Comiss�o de // Classifica��o de Espect�culos CceRating string `json:"cceRating,omitempty"` // ChfilmRating: Rating system for Switzerland - Switzerland Rating // System ChfilmRating string `json:"chfilmRating,omitempty"` // ChvrsRating: Canadian Home Video Rating System ChvrsRating string `json:"chvrsRating,omitempty"` // CicfRating: Rating system for Belgium - Belgium Rating System CicfRating string `json:"cicfRating,omitempty"` // CnaRating: Rating system for Romania - CONSILIUL NATIONAL AL // AUDIOVIZUALULUI - CNA CnaRating string `json:"cnaRating,omitempty"` // CsaRating: Rating system for France - Conseil sup�rieur de // l?audiovisuel CsaRating string `json:"csaRating,omitempty"` // CscfRating: Rating system for Luxembourg - Commission de surveillance // de la classification des films CscfRating string `json:"cscfRating,omitempty"` // CzfilmRating: Rating system for Czech republic - Czech republic // Rating System CzfilmRating string `json:"czfilmRating,omitempty"` // DjctqRating: Rating system in Brazil - Department of Justice, Rating, // Titles and Qualification DjctqRating string `json:"djctqRating,omitempty"` // EefilmRating: Rating system for Estonia - Estonia Rating System EefilmRating string `json:"eefilmRating,omitempty"` // EgfilmRating: Rating system for Egypt - Egypt Rating System EgfilmRating string `json:"egfilmRating,omitempty"` // EirinRating: Rating system in Japan - Eiga Rinri Kanri Iinkai EirinRating string `json:"eirinRating,omitempty"` // FcbmRating: Rating system for Malaysia - Film Censorship Board of // Malaysia FcbmRating string `json:"fcbmRating,omitempty"` // FcoRating: Rating system for Hong kong - Office for Film, Newspaper // and Article Administration FcoRating string `json:"fcoRating,omitempty"` // FmocRating: Rating system in France - French Minister of Culture FmocRating string `json:"fmocRating,omitempty"` // FpbRating: Rating system for South africa - Film & Publication Board FpbRating string `json:"fpbRating,omitempty"` // FskRating: Rating system in Germany - Voluntary Self Regulation of // the Movie Industry FskRating string `json:"fskRating,omitempty"` // GrfilmRating: Rating system for Greece - Greece Rating System GrfilmRating string `json:"grfilmRating,omitempty"` // IcaaRating: Rating system in Spain - Instituto de Cinematografia y de // las Artes Audiovisuales IcaaRating string `json:"icaaRating,omitempty"` // IfcoRating: Rating system in Ireland - Irish Film Classification // Office IfcoRating string `json:"ifcoRating,omitempty"` // IlfilmRating: Rating system for Israel - Israel Rating System IlfilmRating string `json:"ilfilmRating,omitempty"` // IncaaRating: Rating system for Argentina - Instituto Nacional de Cine // y Artes Audiovisuales IncaaRating string `json:"incaaRating,omitempty"` // KfcbRating: Rating system for Kenya - Kenya Film Classification Board KfcbRating string `json:"kfcbRating,omitempty"` // KijkwijzerRating: Rating system for Netherlands - Nederlands // Instituut voor de Classificatie van Audiovisuele Media KijkwijzerRating string `json:"kijkwijzerRating,omitempty"` // KmrbRating: Rating system in South Korea - Korea Media Rating Board KmrbRating string `json:"kmrbRating,omitempty"` // LsfRating: Rating system for Indonesia - Lembaga Sensor Film LsfRating string `json:"lsfRating,omitempty"` // MccaaRating: Rating system for Malta - Film Age-Classification Board MccaaRating string `json:"mccaaRating,omitempty"` // MccypRating: Rating system for Denmark - The Media Council for // Children and Young People MccypRating string `json:"mccypRating,omitempty"` // MdaRating: Rating system for Singapore - Media Development Authority MdaRating string `json:"mdaRating,omitempty"` // MedietilsynetRating: Rating system for Norway - Medietilsynet MedietilsynetRating string `json:"medietilsynetRating,omitempty"` // MekuRating: Rating system for Finland - Finnish Centre for Media // Education and Audiovisual Media MekuRating string `json:"mekuRating,omitempty"` // MibacRating: Rating system in Italy - Ministero dei Beni e delle // Attivita Culturali e del Turismo MibacRating string `json:"mibacRating,omitempty"` // MocRating: Rating system for Colombia - MoC MocRating string `json:"mocRating,omitempty"` // MoctwRating: Rating system for Taiwan - Ministry of Culture - Tawan MoctwRating string `json:"moctwRating,omitempty"` // MpaaRating: Motion Picture Association of America rating for the // content. MpaaRating string `json:"mpaaRating,omitempty"` // MtrcbRating: Rating system for Philippines - MOVIE AND TELEVISION // REVIEW AND CLASSIFICATION BOARD MtrcbRating string `json:"mtrcbRating,omitempty"` // NbcRating: Rating system for Maldives - National Bureau of // Classification NbcRating string `json:"nbcRating,omitempty"` // NbcplRating: Rating system for Poland - National Broadcasting Council NbcplRating string `json:"nbcplRating,omitempty"` // NfrcRating: Rating system for Bulgaria - National Film Centre NfrcRating string `json:"nfrcRating,omitempty"` // NfvcbRating: Rating system for Nigeria - National Film and Video // Censors Board NfvcbRating string `json:"nfvcbRating,omitempty"` // NkclvRating: Rating system for Latvia - National Film Center of // Latvia NkclvRating string `json:"nkclvRating,omitempty"` // OflcRating: Rating system in New Zealand - Office of Film and // Literature Classification OflcRating string `json:"oflcRating,omitempty"` // PefilmRating: Rating system for Peru - Peru Rating System PefilmRating string `json:"pefilmRating,omitempty"` // RcnofRating: Rating system for Hungary - Rating Committee of the // National Office of Film RcnofRating string `json:"rcnofRating,omitempty"` // ResorteviolenciaRating: Rating system for Venezuela - SiBCI ResorteviolenciaRating string `json:"resorteviolenciaRating,omitempty"` // RtcRating: Rating system in Mexico - General Directorate of Radio, // Television and Cinematography RtcRating string `json:"rtcRating,omitempty"` // RteRating: Rating system for Ireland - Raidi� Teilif�s �ireann RteRating string `json:"rteRating,omitempty"` // RussiaRating: Rating system in Russia RussiaRating string `json:"russiaRating,omitempty"` // SkfilmRating: Rating system for Slovakia - Slovakia Rating System SkfilmRating string `json:"skfilmRating,omitempty"` // SmaisRating: Rating system for Iceland - SMAIS SmaisRating string `json:"smaisRating,omitempty"` // SmsaRating: Rating system for Sweden - Statens medier�d (National // Media Council) SmsaRating string `json:"smsaRating,omitempty"` // TvpgRating: TV Parental Guidelines rating of the content. TvpgRating string `json:"tvpgRating,omitempty"` // YtRating: Internal YouTube rating. YtRating string `json:"ytRating,omitempty"` } type GeoPoint struct { // Altitude: Altitude above the reference ellipsoid, in meters. Altitude float64 `json:"altitude,omitempty"` // Latitude: Latitude in degrees. Latitude float64 `json:"latitude,omitempty"` // Longitude: Longitude in degrees. Longitude float64 `json:"longitude,omitempty"` } type GuideCategory struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the guide category. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#guideCategory". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the // category, such as its title. Snippet *GuideCategorySnippet `json:"snippet,omitempty"` } type GuideCategoryListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of categories that can be associated with YouTube // channels. In this map, the category ID is the map key, and its value // is the corresponding guideCategory resource. Items []*GuideCategory `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#guideCategoryListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type GuideCategorySnippet struct { ChannelId string `json:"channelId,omitempty"` // Title: Description of the guide category. Title string `json:"title,omitempty"` } type I18nLanguage struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the i18n language. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#i18nLanguage". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the i18n // language, such as language code and human-readable name. Snippet *I18nLanguageSnippet `json:"snippet,omitempty"` } type I18nLanguageListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of supported i18n languages. In this map, the i18n // language ID is the map key, and its value is the corresponding // i18nLanguage resource. Items []*I18nLanguage `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#i18nLanguageListResponse". Kind string `json:"kind,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type I18nLanguageSnippet struct { // Hl: A short BCP-47 code that uniquely identifies a language. Hl string `json:"hl,omitempty"` // Name: The human-readable name of the language in the language itself. Name string `json:"name,omitempty"` } type I18nRegion struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the i18n region. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#i18nRegion". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the i18n // region, such as region code and human-readable name. Snippet *I18nRegionSnippet `json:"snippet,omitempty"` } type I18nRegionListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of regions where YouTube is available. In this map, the // i18n region ID is the map key, and its value is the corresponding // i18nRegion resource. Items []*I18nRegion `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#i18nRegionListResponse". Kind string `json:"kind,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type I18nRegionSnippet struct { // Gl: The region code as a 2-letter ISO country code. Gl string `json:"gl,omitempty"` // Name: The human-readable name of the region. Name string `json:"name,omitempty"` } type ImageSettings struct { // BackgroundImageUrl: The URL for the background image shown on the // video watch page. The image should be 1200px by 615px, with a maximum // file size of 128k. BackgroundImageUrl *LocalizedProperty `json:"backgroundImageUrl,omitempty"` // BannerExternalUrl: This is used only in update requests; if it's set, // we use this URL to generate all of the above banner URLs. BannerExternalUrl string `json:"bannerExternalUrl,omitempty"` // BannerImageUrl: Banner image. Desktop size (1060x175). BannerImageUrl string `json:"bannerImageUrl,omitempty"` // BannerMobileExtraHdImageUrl: Banner image. Mobile size high // resolution (1440x395). BannerMobileExtraHdImageUrl string `json:"bannerMobileExtraHdImageUrl,omitempty"` // BannerMobileHdImageUrl: Banner image. Mobile size high resolution // (1280x360). BannerMobileHdImageUrl string `json:"bannerMobileHdImageUrl,omitempty"` // BannerMobileImageUrl: Banner image. Mobile size (640x175). BannerMobileImageUrl string `json:"bannerMobileImageUrl,omitempty"` // BannerMobileLowImageUrl: Banner image. Mobile size low resolution // (320x88). BannerMobileLowImageUrl string `json:"bannerMobileLowImageUrl,omitempty"` // BannerMobileMediumHdImageUrl: Banner image. Mobile size medium/high // resolution (960x263). BannerMobileMediumHdImageUrl string `json:"bannerMobileMediumHdImageUrl,omitempty"` // BannerTabletExtraHdImageUrl: Banner image. Tablet size extra high // resolution (2560x424). BannerTabletExtraHdImageUrl string `json:"bannerTabletExtraHdImageUrl,omitempty"` // BannerTabletHdImageUrl: Banner image. Tablet size high resolution // (2276x377). BannerTabletHdImageUrl string `json:"bannerTabletHdImageUrl,omitempty"` // BannerTabletImageUrl: Banner image. Tablet size (1707x283). BannerTabletImageUrl string `json:"bannerTabletImageUrl,omitempty"` // BannerTabletLowImageUrl: Banner image. Tablet size low resolution // (1138x188). BannerTabletLowImageUrl string `json:"bannerTabletLowImageUrl,omitempty"` // BannerTvHighImageUrl: Banner image. TV size high resolution // (1920x1080). BannerTvHighImageUrl string `json:"bannerTvHighImageUrl,omitempty"` // BannerTvImageUrl: Banner image. TV size extra high resolution // (2120x1192). BannerTvImageUrl string `json:"bannerTvImageUrl,omitempty"` // BannerTvLowImageUrl: Banner image. TV size low resolution (854x480). BannerTvLowImageUrl string `json:"bannerTvLowImageUrl,omitempty"` // BannerTvMediumImageUrl: Banner image. TV size medium resolution // (1280x720). BannerTvMediumImageUrl string `json:"bannerTvMediumImageUrl,omitempty"` // LargeBrandedBannerImageImapScript: The image map script for the large // banner image. LargeBrandedBannerImageImapScript *LocalizedProperty `json:"largeBrandedBannerImageImapScript,omitempty"` // LargeBrandedBannerImageUrl: The URL for the 854px by 70px image that // appears below the video player in the expanded video view of the // video watch page. LargeBrandedBannerImageUrl *LocalizedProperty `json:"largeBrandedBannerImageUrl,omitempty"` // SmallBrandedBannerImageImapScript: The image map script for the small // banner image. SmallBrandedBannerImageImapScript *LocalizedProperty `json:"smallBrandedBannerImageImapScript,omitempty"` // SmallBrandedBannerImageUrl: The URL for the 640px by 70px banner // image that appears below the video player in the default view of the // video watch page. SmallBrandedBannerImageUrl *LocalizedProperty `json:"smallBrandedBannerImageUrl,omitempty"` // TrackingImageUrl: The URL for a 1px by 1px tracking pixel that can be // used to collect statistics for views of the channel or video pages. TrackingImageUrl string `json:"trackingImageUrl,omitempty"` // WatchIconImageUrl: The URL for the image that appears above the // top-left corner of the video player. This is a 25-pixel-high image // with a flexible width that cannot exceed 170 pixels. WatchIconImageUrl string `json:"watchIconImageUrl,omitempty"` } type IngestionInfo struct { // BackupIngestionAddress: The backup ingestion URL that you should use // to stream video to YouTube. You have the option of simultaneously // streaming the content that you are sending to the ingestionAddress to // this URL. BackupIngestionAddress string `json:"backupIngestionAddress,omitempty"` // IngestionAddress: The primary ingestion URL that you should use to // stream video to YouTube. You must stream video to this // URL. // // Depending on which application or tool you use to encode your // video stream, you may need to enter the stream URL and stream name // separately or you may need to concatenate them in the following // format: // // STREAM_URL/STREAM_NAME IngestionAddress string `json:"ingestionAddress,omitempty"` // StreamName: The HTTP or RTMP stream name that YouTube assigns to the // video stream. StreamName string `json:"streamName,omitempty"` } type InvideoBranding struct { ImageBytes string `json:"imageBytes,omitempty"` ImageUrl string `json:"imageUrl,omitempty"` Position *InvideoPosition `json:"position,omitempty"` TargetChannelId string `json:"targetChannelId,omitempty"` Timing *InvideoTiming `json:"timing,omitempty"` } type InvideoPosition struct { // CornerPosition: Describes in which corner of the video the visual // widget will appear. CornerPosition string `json:"cornerPosition,omitempty"` // Type: Defines the position type. Type string `json:"type,omitempty"` } type InvideoPromotion struct { // DefaultTiming: The default temporal position within the video where // the promoted item will be displayed. Can be overriden by more // specific timing in the item. DefaultTiming *InvideoTiming `json:"defaultTiming,omitempty"` // Items: List of promoted items in decreasing priority. Items []*PromotedItem `json:"items,omitempty"` // Position: The spatial position within the video where the promoted // item will be displayed. Position *InvideoPosition `json:"position,omitempty"` // UseSmartTiming: Indicates whether the channel's promotional campaign // uses "smart timing." This feature attempts to show promotions at a // point in the video when they are more likely to be clicked and less // likely to disrupt the viewing experience. This feature also picks up // a single promotion to show on each video. UseSmartTiming bool `json:"useSmartTiming,omitempty"` } type InvideoTiming struct { // DurationMs: Defines the duration in milliseconds for which the // promotion should be displayed. If missing, the client should use the // default. DurationMs uint64 `json:"durationMs,omitempty,string"` // OffsetMs: Defines the time at which the promotion will appear. // Depending on the value of type the value of the offsetMs field will // represent a time offset from the start or from the end of the video, // expressed in milliseconds. OffsetMs uint64 `json:"offsetMs,omitempty,string"` // Type: Describes a timing type. If the value is offsetFromStart, then // the offsetMs field represents an offset from the start of the video. // If the value is offsetFromEnd, then the offsetMs field represents an // offset from the end of the video. Type string `json:"type,omitempty"` } type LiveBroadcast struct { // ContentDetails: The contentDetails object contains information about // the event's video content, such as whether the content can be shown // in an embedded video player or if it will be archived and therefore // available for viewing after the event has concluded. ContentDetails *LiveBroadcastContentDetails `json:"contentDetails,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube assigns to uniquely identify the broadcast. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#liveBroadcast". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the event, // including its title, description, start time, and end time. Snippet *LiveBroadcastSnippet `json:"snippet,omitempty"` // Status: The status object contains information about the event's // status. Status *LiveBroadcastStatus `json:"status,omitempty"` } type LiveBroadcastContentDetails struct { // BoundStreamId: This value uniquely identifies the live stream bound // to the broadcast. BoundStreamId string `json:"boundStreamId,omitempty"` // EnableClosedCaptions: This setting indicates whether closed // captioning is enabled for this broadcast. The ingestion URL of the // closed captions is returned through the liveStreams API. EnableClosedCaptions bool `json:"enableClosedCaptions,omitempty"` // EnableContentEncryption: This setting indicates whether YouTube // should enable content encryption for the broadcast. EnableContentEncryption bool `json:"enableContentEncryption,omitempty"` // EnableDvr: This setting determines whether viewers can access DVR // controls while watching the video. DVR controls enable the viewer to // control the video playback experience by pausing, rewinding, or fast // forwarding content. The default value for this property is // true. // // // // Important: You must set the value to true and also set the // enableArchive property's value to true if you want to make playback // available immediately after the broadcast ends. EnableDvr bool `json:"enableDvr,omitempty"` // EnableEmbed: This setting indicates whether the broadcast video can // be played in an embedded player. If you choose to archive the video // (using the enableArchive property), this setting will also apply to // the archived video. EnableEmbed bool `json:"enableEmbed,omitempty"` // MonitorStream: The monitorStream object contains information about // the monitor stream, which the broadcaster can use to review the event // content before the broadcast stream is shown publicly. MonitorStream *MonitorStreamInfo `json:"monitorStream,omitempty"` // RecordFromStart: Automatically start recording after the event goes // live. The default value for this property is true. // // // // Important: You // must also set the enableDvr property's value to true if you want the // playback to be available immediately after the broadcast ends. If you // set this property's value to true but do not also set the enableDvr // property to true, there may be a delay of around one day before the // archived video will be available for playback. RecordFromStart bool `json:"recordFromStart,omitempty"` // StartWithSlate: This setting indicates whether the broadcast should // automatically begin with an in-stream slate when you update the // broadcast's status to live. After updating the status, you then need // to send a liveCuepoints.insert request that sets the cuepoint's // eventState to end to remove the in-stream slate and make your // broadcast stream visible to viewers. StartWithSlate bool `json:"startWithSlate,omitempty"` } type LiveBroadcastListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of broadcasts that match the request criteria. Items []*LiveBroadcast `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#liveBroadcastListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type LiveBroadcastSnippet struct { // ActualEndTime: The date and time that the broadcast actually ended. // This information is only available once the broadcast's state is // complete. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) // format. ActualEndTime string `json:"actualEndTime,omitempty"` // ActualStartTime: The date and time that the broadcast actually // started. This information is only available once the broadcast's // state is live. The value is specified in ISO 8601 // (YYYY-MM-DDThh:mm:ss.sZ) format. ActualStartTime string `json:"actualStartTime,omitempty"` // ChannelId: The ID that YouTube uses to uniquely identify the channel // that is publishing the broadcast. ChannelId string `json:"channelId,omitempty"` // Description: The broadcast's description. As with the title, you can // set this field by modifying the broadcast resource or by setting the // description field of the corresponding video resource. Description string `json:"description,omitempty"` // PublishedAt: The date and time that the broadcast was added to // YouTube's live broadcast schedule. The value is specified in ISO 8601 // (YYYY-MM-DDThh:mm:ss.sZ) format. PublishedAt string `json:"publishedAt,omitempty"` // ScheduledEndTime: The date and time that the broadcast is scheduled // to end. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) // format. ScheduledEndTime string `json:"scheduledEndTime,omitempty"` // ScheduledStartTime: The date and time that the broadcast is scheduled // to start. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) // format. ScheduledStartTime string `json:"scheduledStartTime,omitempty"` // Thumbnails: A map of thumbnail images associated with the broadcast. // For each nested object in this object, the key is the name of the // thumbnail image, and the value is an object that contains other // information about the thumbnail. Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"` // Title: The broadcast's title. Note that the broadcast represents // exactly one YouTube video. You can set this field by modifying the // broadcast resource or by setting the title field of the corresponding // video resource. Title string `json:"title,omitempty"` } type LiveBroadcastStatus struct { // LifeCycleStatus: The broadcast's status. The status can be updated // using the API's liveBroadcasts.transition method. LifeCycleStatus string `json:"lifeCycleStatus,omitempty"` // LiveBroadcastPriority: Priority of the live broadcast event (internal // state). LiveBroadcastPriority string `json:"liveBroadcastPriority,omitempty"` // PrivacyStatus: The broadcast's privacy status. Note that the // broadcast represents exactly one YouTube video, so the privacy // settings are identical to those supported for videos. In addition, // you can set this field by modifying the broadcast resource or by // setting the privacyStatus field of the corresponding video resource. PrivacyStatus string `json:"privacyStatus,omitempty"` // RecordingStatus: The broadcast's recording status. RecordingStatus string `json:"recordingStatus,omitempty"` } type LiveStream struct { // Cdn: The cdn object defines the live stream's content delivery // network (CDN) settings. These settings provide details about the // manner in which you stream your content to YouTube. Cdn *CdnSettings `json:"cdn,omitempty"` // ContentDetails: The content_details object contains information about // the stream, including the closed captions ingestion URL. ContentDetails *LiveStreamContentDetails `json:"contentDetails,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube assigns to uniquely identify the stream. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#liveStream". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the stream, // including its channel, title, and description. Snippet *LiveStreamSnippet `json:"snippet,omitempty"` // Status: The status object contains information about live stream's // status. Status *LiveStreamStatus `json:"status,omitempty"` } type LiveStreamContentDetails struct { // ClosedCaptionsIngestionUrl: The ingestion URL where the closed // captions of this stream are sent. ClosedCaptionsIngestionUrl string `json:"closedCaptionsIngestionUrl,omitempty"` // IsReusable: Indicates whether the stream is reusable, which means // that it can be bound to multiple broadcasts. It is common for // broadcasters to reuse the same stream for many different broadcasts // if those broadcasts occur at different times. // // If you set this value // to false, then the stream will not be reusable, which means that it // can only be bound to one broadcast. Non-reusable streams differ from // reusable streams in the following ways: // - A non-reusable stream can // only be bound to one broadcast. // - A non-reusable stream might be // deleted by an automated process after the broadcast ends. // - The // liveStreams.list method does not list non-reusable streams if you // call the method and set the mine parameter to true. The only way to // use that method to retrieve the resource for a non-reusable stream is // to use the id parameter to identify the stream. IsReusable bool `json:"isReusable,omitempty"` } type LiveStreamListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of live streams that match the request criteria. Items []*LiveStream `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#liveStreamListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type LiveStreamSnippet struct { // ChannelId: The ID that YouTube uses to uniquely identify the channel // that is transmitting the stream. ChannelId string `json:"channelId,omitempty"` // Description: The stream's description. The value cannot be longer // than 10000 characters. Description string `json:"description,omitempty"` // PublishedAt: The date and time that the stream was created. The value // is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. PublishedAt string `json:"publishedAt,omitempty"` // Title: The stream's title. The value must be between 1 and 128 // characters long. Title string `json:"title,omitempty"` } type LiveStreamStatus struct { StreamStatus string `json:"streamStatus,omitempty"` } type LocalizedProperty struct { // Default: Default value for the localized property. Default string `json:"default,omitempty"` // Localized: The localized values. Localized []*LocalizedString `json:"localized,omitempty"` } type LocalizedString struct { // Language: Language associated to this value. Language string `json:"language,omitempty"` // Value: Value of the property. Value string `json:"value,omitempty"` } type MonitorStreamInfo struct { // BroadcastStreamDelayMs: If you have set the enableMonitorStream // property to true, then this property determines the length of the // live broadcast delay. BroadcastStreamDelayMs int64 `json:"broadcastStreamDelayMs,omitempty"` // EmbedHtml: HTML code that embeds a player that plays the monitor // stream. EmbedHtml string `json:"embedHtml,omitempty"` // EnableMonitorStream: This value determines whether the monitor stream // is enabled for the broadcast. If the monitor stream is enabled, then // YouTube will broadcast the event content on a special stream intended // only for the broadcaster's consumption. The broadcaster can use the // stream to review the event content and also to identify the optimal // times to insert cuepoints. // // You need to set this value to true if you // intend to have a broadcast delay for your event. // // Note: This property // cannot be updated once the broadcast is in the testing or live state. EnableMonitorStream bool `json:"enableMonitorStream,omitempty"` } type PageInfo struct { // ResultsPerPage: The number of results included in the API response. ResultsPerPage int64 `json:"resultsPerPage,omitempty"` // TotalResults: The total number of results in the result set. TotalResults int64 `json:"totalResults,omitempty"` } type Playlist struct { // ContentDetails: The contentDetails object contains information like // video count. ContentDetails *PlaylistContentDetails `json:"contentDetails,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the playlist. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#playlist". Kind string `json:"kind,omitempty"` // Player: The player object contains information that you would use to // play the playlist in an embedded player. Player *PlaylistPlayer `json:"player,omitempty"` // Snippet: The snippet object contains basic details about the // playlist, such as its title and description. Snippet *PlaylistSnippet `json:"snippet,omitempty"` // Status: The status object contains status information for the // playlist. Status *PlaylistStatus `json:"status,omitempty"` } type PlaylistContentDetails struct { // ItemCount: The number of videos in the playlist. ItemCount int64 `json:"itemCount,omitempty"` } type PlaylistItem struct { // ContentDetails: The contentDetails object is included in the resource // if the included item is a YouTube video. The object contains // additional information about the video. ContentDetails *PlaylistItemContentDetails `json:"contentDetails,omitempty"` // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // Id: The ID that YouTube uses to uniquely identify the playlist item. Id string `json:"id,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#playlistItem". Kind string `json:"kind,omitempty"` // Snippet: The snippet object contains basic details about the playlist // item, such as its title and position in the playlist. Snippet *PlaylistItemSnippet `json:"snippet,omitempty"` // Status: The status object contains information about the playlist // item's privacy status. Status *PlaylistItemStatus `json:"status,omitempty"` } type PlaylistItemContentDetails struct { // EndAt: The time, measured in seconds from the start of the video, // when the video should stop playing. (The playlist owner can specify // the times when the video should start and stop playing when the video // is played in the context of the playlist.) By default, assume that // the video.endTime is the end of the video. EndAt string `json:"endAt,omitempty"` // Note: A user-generated note for this item. Note string `json:"note,omitempty"` // StartAt: The time, measured in seconds from the start of the video, // when the video should start playing. (The playlist owner can specify // the times when the video should start and stop playing when the video // is played in the context of the playlist.) The default value is 0. StartAt string `json:"startAt,omitempty"` // VideoId: The ID that YouTube uses to uniquely identify a video. To // retrieve the video resource, set the id query parameter to this value // in your API request. VideoId string `json:"videoId,omitempty"` } type PlaylistItemListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of playlist items that match the request criteria. Items []*PlaylistItem `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#playlistItemListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type PlaylistItemSnippet struct { // ChannelId: The ID that YouTube uses to uniquely identify the user // that added the item to the playlist. ChannelId string `json:"channelId,omitempty"` // ChannelTitle: Channel title for the channel that the playlist item // belongs to. ChannelTitle string `json:"channelTitle,omitempty"` // Description: The item's description. Description string `json:"description,omitempty"` // PlaylistId: The ID that YouTube uses to uniquely identify the // playlist that the playlist item is in. PlaylistId string `json:"playlistId,omitempty"` // Position: The order in which the item appears in the playlist. The // value uses a zero-based index, so the first item has a position of 0, // the second item has a position of 1, and so forth. Position int64 `json:"position,omitempty"` // PublishedAt: The date and time that the item was added to the // playlist. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) // format. PublishedAt string `json:"publishedAt,omitempty"` // ResourceId: The id object contains information that can be used to // uniquely identify the resource that is included in the playlist as // the playlist item. ResourceId *ResourceId `json:"resourceId,omitempty"` // Thumbnails: A map of thumbnail images associated with the playlist // item. For each object in the map, the key is the name of the // thumbnail image, and the value is an object that contains other // information about the thumbnail. Thumbnails *ThumbnailDetails `json:"thumbnails,omitempty"` // Title: The item's title. Title string `json:"title,omitempty"` } type PlaylistItemStatus struct { // PrivacyStatus: This resource's privacy status. PrivacyStatus string `json:"privacyStatus,omitempty"` } type PlaylistListResponse struct { // Etag: Etag of this resource. Etag string `json:"etag,omitempty"` // EventId: Serialized EventId of the request which produced this // response. EventId string `json:"eventId,omitempty"` // Items: A list of playlists that match the request criteria. Items []*Playlist `json:"items,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed // string "youtube#playlistListResponse". Kind string `json:"kind,omitempty"` // NextPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the next page in the result set. NextPageToken string `json:"nextPageToken,omitempty"` PageInfo *PageInfo `json:"pageInfo,omitempty"` // PrevPageToken: The token that can be used as the value of the // pageToken parameter to retrieve the previous page in the result set. PrevPageToken string `json:"prevPageToken,omitempty"` TokenPagination *TokenPagination `json:"tokenPagination,omitempty"` // VisitorId: The visitorId identifies the visitor. VisitorId string `json:"visitorId,omitempty"` } type PlaylistPlayer struct { // EmbedHtml: An