Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yt-api

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yt-api - npm Package Compare versions

Comparing version 0.2.5 to 0.2.6

2

package.json
{
"name": "yt-api",
"version": "0.2.5",
"version": "0.2.6",
"description": "A light weight, easy, and super fast way of interacting with the YouTube Data API v3.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -25,2 +25,15 @@ # Welcome to the yt-api a light weight, easy, and super fast way of interacting with the YouTube Data API v3.

# Getting playlists
```javascript
API.getPlaylist("PLxYB-Vuz54ip2mYZrZvit7l6kHL5gGHZI").then(p => {
console.log(`
Playlist title: ${p.playlistTitle}
Playlist thumbnail: ${p.playlistThumbnail}
Playlist creator: ${p.playlistCreator}
Playlist id: ${p.playlistId}
Playlist videos: ${p.playlistVideos.map(v=>`${v.title} | ${v.url}`).join('\n')}
`);
});
```
# Searching for a video

@@ -27,0 +40,0 @@ ```javascript

@@ -30,3 +30,3 @@ const snekfetch = require("snekfetch");

category: data.snippet.categoryId,
thumbnail: `https://i.ytimg.com/vi/${data.snippet.resourceId.videoId}/${data.snippet.thumbnails ? "maxres" : "mq" }default.jpg`,
thumbnail: `https://i.ytimg.com/vi/${data.id}/${data.snippet.thumbnails ? "maxres" : "mq" }default.jpg`,
description: data.snippet.description,

@@ -79,3 +79,3 @@ publishDate: data.snippet.publishedAt,

playlistId: playlistId,
playlistThumbnail: playlistParsed.items[0].snippet.thumbnails.maxres.url,
playlistThumbnail: playlistParsed.items[0].snippet.thumbnails ? playlistParsed.items[0].snippet.thumbnails.maxres.url : playlistParsed.items[0].snippet.thumbnails.medium.url,
playlistCreator: playlistParsed.items[0].snippet.channelTitle,

@@ -82,0 +82,0 @@ playlistVideos: videos

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc