naystack - v1.9.9
    Preparing search index...

    Variable YouTubeProviderConst

    YouTubeProvider: SocialProvider = ...

    YouTube as a normalized SocialProvider.

    A ready-made singleton — import and call it, there is nothing to construct. Credentials are read from the environment inside the auth methods, so fetchProfile and fetchMedia need only a token.

    Wraps the platform-specific helpers rather than replacing them: getYouTubeChannel and getYouTubeUploads remain the way to reach fields this normalization drops.

    followers is null when the channel hides its subscriber count.

    Requires env vars for auth only: YOUTUBE_CLIENT_ID, YOUTUBE_CLIENT_SECRET — or GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET, which they fall back to.

    import { YouTubeProvider } from "naystack/socials";

    const profile = await YouTubeProvider.fetchProfile(accessToken);
    const posts = await YouTubeProvider.fetchMedia?.(accessToken, { limit: 50 });