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.1 to 0.2.2

2

package.json
{
"name": "yt-api",
"version": "0.2.1",
"version": "0.2.2",
"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",

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

return new Promise(async (res, rej) => {
let apiResponse = snekfetch.get(`https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics,liveStreamingDetails,contentDetails&id=${id}&key=${this.key}`);
let apiResponse = await snekfetch.get(`https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics,liveStreamingDetails,contentDetails&id=${id}&key=${this.key}`);
let json = JSON.parse(apiResponse.text);

@@ -54,3 +54,3 @@ let data = json.items[0];

return new Promise(async (res, rej) => {
let apiResponse = snekfetch.get(`https://www.googleapis.com/youtube/v3/search?part=id,snippet&q=${encodeURIComponent(search)}&type=video&key=${this.key}`);
let apiResponse = await snekfetch.get(`https://www.googleapis.com/youtube/v3/search?part=id,snippet&q=${encodeURIComponent(search)}&type=video&key=${this.key}`);
let json = JSON.parse(apiResponse.text);

@@ -76,3 +76,3 @@ let data = json.items[0];

return new Promise(async (res, rej) => {
let apiResponse = snekfetch.get(`https://www.googleapis.com/youtube/v3/search?part=id,snippet&q=${encodeURIComponent(search)}&type=video&maxResults=${maxResults}&key=${this.key}`);
let apiResponse = await snekfetch.get(`https://www.googleapis.com/youtube/v3/search?part=id,snippet&q=${encodeURIComponent(search)}&type=video&maxResults=${maxResults}&key=${this.key}`);
let json = JSON.parse(apiResponse.text);

@@ -79,0 +79,0 @@ if(!json.items[0]) rej("No videos were found for this search!");

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