forked from googleapis/google-api-go-client
/
youtube-gen.go
10569 lines (9416 loc) · 432 KB
/
youtube-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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"
"golang.org/x/net/context"
"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
var _ = context.Background
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"`
// Localizations: Localizations for different languages
Localizations map[string]ChannelLocalization `json:"localizations,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 ChannelLocalization struct {
// Description: The localized strings for channel's description.
Description string `json:"description,omitempty"`
// Title: The localized strings for channel's title, read-only.
Title string `json:"title,omitempty"`
}
type ChannelSection struct {
// ContentDetails: The contentDetails object contains details about the
// channel section content, such as a list of playlists or channels
// featured in the section.
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 channel
// section.
Id string `json:"id,omitempty"`
// Kind: Identifies what kind of resource this is. Value: the fixed
// string "youtube#channelSection".
Kind string `json:"kind,omitempty"`
// Localizations: Localizations for different languages
Localizations map[string]ChannelSectionLocalization `json:"localizations,omitempty"`
// Snippet: The snippet object contains basic details about the channel
// section, 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 ChannelSectionLocalization struct {
// Title: The localized strings for channel section's title.
Title string `json:"title,omitempty"`
}
type ChannelSectionSnippet struct {
// ChannelId: The ID that YouTube uses to uniquely identify the channel
// that published the channel section.
ChannelId string `json:"channelId,omitempty"`
// DefaultLanguage: The language of the channel section's default title
// and description.
DefaultLanguage string `json:"defaultLanguage,omitempty"`
// Localized: Localized title, read-only.
Localized *ChannelSectionLocalization `json:"localized,omitempty"`
// Position: The position of the channel section in the channel.
Position int64 `json:"position,omitempty"`
// Style: The style of the channel section.
Style string `json:"style,omitempty"`
// Title: The channel section's title for multiple_playlists and
// multiple_channels.
Title string `json:"title,omitempty"`
// Type: The type of the channel section.
Type string `json:"type,omitempty"`
}
type ChannelSettings struct {
DefaultLanguage string `json:"defaultLanguage,omitempty"`
// 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 {
// DefaultLanguage: The language of the channel's default title and
// description.
DefaultLanguage string `json:"defaultLanguage,omitempty"`
// Description: The description of the channel.
Description string `json:"description,omitempty"`
// Localized: Localized title and description, read-only.
Localized *ChannelLocalization `json:"localized,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"`