Skip to content
0

katanakit-js / useGetVideoDetails

Function: useGetVideoDetails() ​

ts
function useGetVideoDetails(ids): Promise<FetchResult<{
  channelTitle?: string;
  description: string;
  durationSeconds?: number;
  embedUrl: string;
  id: string;
  publishedAt: string;
  thumbnail: string;
  thumbnails: {
     default: string;
     high: string;
     medium: string;
  };
  title: string;
  url: string;
  viewCount?: number;
}[]>>;

Defined in: src/core/services/youtube.service.ts:332

Enriches videos with duration and view count (videos.list, 1 unit).

Parameters ​

ParameterTypeDescription
idsstring[]Up to 50 video ids.

Returns ​

Promise<FetchResult<{ channelTitle?: string; description: string; durationSeconds?: number; embedUrl: string; id: string; publishedAt: string; thumbnail: string; thumbnails: { default: string; high: string; medium: string; }; title: string; url: string; viewCount?: number; }[]>>

Safe Result with enriched videos.

Released under the MIT License.