Open st3h3n opened 6 years ago
+1 this is true for all of the clients, including calendars, people, etc. - they're all one level "too high" in the hierarchy. Any update?
The issue is also documented here https://github.com/Bolisov/google-api-typings-generator/issues/2. Unfortunately, the resulting PR was closed before it could be merged https://github.com/DefinitelyTyped/DefinitelyTyped/pull/21303#issuecomment-355133151.
Here is the workaround I'm using:
// gapi-youtube.d.ts file in my own project
declare namespace gapi.client.youtube {
const activities: youtube.ActivitiesResource;
const captions: youtube.CaptionsResource;
const channelBanners: youtube.ChannelBannersResource;
const channelSections: youtube.ChannelSectionsResource;
const channels: youtube.ChannelsResource;
const commentThreads: youtube.CommentThreadsResource;
const comments: youtube.CommentsResource;
const fanFundingEvents: youtube.FanFundingEventsResource;
const guideCategories: youtube.GuideCategoriesResource;
const i18nLanguages: youtube.I18nLanguagesResource;
const i18nRegions: youtube.I18nRegionsResource;
const liveBroadcasts: youtube.LiveBroadcastsResource;
const liveChatBans: youtube.LiveChatBansResource;
const liveChatMessages: youtube.LiveChatMessagesResource;
const liveChatModerators: youtube.LiveChatModeratorsResource;
const liveStreams: youtube.LiveStreamsResource;
const playlistItems: youtube.PlaylistItemsResource;
const playlists: youtube.PlaylistsResource;
const search: youtube.SearchResource;
const sponsors: youtube.SponsorsResource;
const subscriptions: youtube.SubscriptionsResource;
const superChatEvents: youtube.SuperChatEventsResource;
const thumbnails: youtube.ThumbnailsResource;
const videoAbuseReportReasons: youtube.VideoAbuseReportReasonsResource;
const videoCategories: youtube.VideoCategoriesResource;
const videos: youtube.VideosResource;
const watermarks: youtube.WatermarksResource;
}
This repo is abandoned, see #19 and use active fork instead: Maxim-Mazurok/google-api-typings-generator
Please, close this issue if you will, thanks for your cooperation!
DefinitelyTyped gapi.client.youtube describes to access the Youtube API like e. g.
gapi.client.channels.list...
but that's not the actual structure. The correct way would begapi.client.youtube.channels.list...
. Whengapi.client
loads the Youtube API the resources get added togapi.client.youtube
notgapi.client
.