1.0.4 • Published 3 years ago

gypd v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Get YouTube playlist duration easily

Install:

npm i gypd

Import:

import gypd from "gypd"

Use:

const duration = await gypd({
	playlistId: PLAYLIST_ID_OR_URL,
	apiKey: API_KEY,
	formatted: true,
})

Description:

gypd is is small package that returns YouTube playlist duration in seconds.

  • apiKey (required): type string Your Google API key (with YouTube API v3 enabled). Watch this short video to learn how to generate your Google API key

  • playlistId (required): type string The URL or id of the target YouTube playlist

  • formatted (optional): type boolean, default value false Returns a duration object in the form of {days, hours, minutes and seconds}

Use try/catch block, or any equivalent solution to catch potential errors that might happen

If you face problems, open an issue, or contact me on Twitter @roktmy

Version 1 uploaded Sep 25, 2021, by Muhammad Yasser.

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago