youtube-api-search-typed
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Youtube seach typed

Based on https://www.npmjs.com/package/youtube-api-search added typecript.

Avaiable parameters : https://developers.google.com/youtube/v3/docs/search/list#parameters

Required arguments

There are 2 required params there are key and term.

type defaults to 'video' and part defaults to 'snippet'. you can find more info about the parameters in the declarations file. dist/index.d.ts

Example:

import youtubeSearch, { Video } from "youtube-api-search-typed/dist"
const params = {
  part,
  key,
  term,
  type,
  forContentOwner,
  forDeveloper,
  forMine,
  relatedToVideoId,
  channelId,
  channelType,
  eventType,
  location,
  locationRadius,
  maxResults,
  onBehalfOfContentOwner,
  order,
  pageToken,
  publishedAfter,
  regionCode,
  relevanceLanguage,
  safeSearch,
  topicId,
  videoCaption,
  videoCategoryId,
  videoDefinition,
  videoDimension,
  videoDuration,
  videoEmbeddable,
  videoLicense,
  videoSyndicated,
  videoType,
}
 
const searchTerm: string = "Coffee"
 
youtubeSearch({
  key: API_KEY,
  term: searchTerm,
  part: "snippet",
  type: "video",
})
  .then((data) => handleVideoData(data))
  .catch((error) => handleError(error))

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i youtube-api-search-typed

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

11.6 kB

Total Files

12

Last publish

Collaborators

  • wilfredlopez