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

iyoutube

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iyoutube - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

output/interfaces/List.d.ts

11

output/fetchers/ContinuatedList.d.ts
import { WrappedHTTPClient } from "../WrappedHTTPClient";
import { HTTPRequestOptions } from "../interfaces/HTTPClient";
import { Video, Channel, Playlist, Comment, CommentThread } from "../main";
export declare class ContinuatedList {
results: Array<Video | Channel | Playlist | Comment | CommentThread>;
import { List } from "../interfaces/List";
export declare class ContinuatedList extends List {
endReached: boolean;

@@ -14,8 +13,2 @@ requestOptions: HTTPRequestOptions;

loadFurhter(): Promise<any>;
getByType(type: any): (Video | Channel | Playlist | Comment | CommentThread)[];
getVideos(): Array<Video>;
getPlaylists(): Array<Playlist>;
getChannels(): Array<Channel>;
getComments(): Array<Comment>;
getCommentThreads(): Array<CommentThread>;
}

@@ -14,5 +14,6 @@ "use strict";

const helpers_1 = require("./helpers");
const main_1 = require("../main");
class ContinuatedList {
const List_1 = require("../interfaces/List");
class ContinuatedList extends List_1.List {
constructor(requestOptions, dataprocessor, httpclient, onlyContinuation) {
super();
this.endReached = false;

@@ -24,3 +25,2 @@ this.continuationToken = "";

this.dataprocessor = dataprocessor;
this.results = new Array();
if (this.onlyContinuation)

@@ -62,21 +62,3 @@ this.onlyContinuation = onlyContinuation;

}
getByType(type) {
return this.results.filter((elem) => { return elem instanceof type; });
}
getVideos() {
return this.getByType(main_1.Video);
}
getPlaylists() {
return this.getByType(main_1.Playlist);
}
getChannels() {
return this.getByType(main_1.Channel);
}
getComments() {
return this.getByType(main_1.Comment);
}
getCommentThreads() {
return this.getByType(main_1.CommentThread);
}
}
exports.ContinuatedList = ContinuatedList;

@@ -1,2 +0,2 @@

import { Channel } from "../main";
import { List } from "../main";
import { ContinuatedList } from "./ContinuatedList";

@@ -10,7 +10,7 @@ import { Playlist } from "../interfaces/Playlist";

constructor(httpclient: WrappedHTTPClient, client: IYoutube);
getPlaylists(): Promise<Array<Playlist>>;
getPlaylists(): Promise<List>;
getWatchLaterPlaylist(): Promise<Playlist>;
getLikedPlaylist(): Promise<Playlist>;
getSubscriptions(): Promise<Array<Channel>>;
getSubscriptions(): Promise<List>;
getSubscriptionFeed(): ContinuatedList;
}

@@ -13,2 +13,3 @@ "use strict";

exports.User = void 0;
const main_1 = require("../main");
const HTTPClient_1 = require("../interfaces/HTTPClient");

@@ -43,3 +44,3 @@ const Playlist_1 = require("../interfaces/Playlist");

});
return playlists;
return new main_1.List(playlists);
});

@@ -70,3 +71,3 @@ }

items = helpers_1.default.processRendererItems(items, this.httpclient);
return items;
return new main_1.List(items);
});

@@ -73,0 +74,0 @@ }

@@ -18,2 +18,3 @@ import { Explorer } from "./fetchers/Explorer";

import { CaptionTrack } from "./interfaces/CaptionTrack";
import { List } from "./interfaces/List";
import { default as IYoutube } from "./IYoutube";

@@ -38,2 +39,3 @@ export { IYoutube as IYoutube };

export { CaptionTrack as CaptionTrack };
export { List as List };
export declare const nodeDefault: () => Promise<IYoutube>;

@@ -12,3 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.nodeDefault = exports.CommentThreadRepliesContinuatedList = exports.CommentThread = exports.Comment = exports.CommentSectionContinuatedList = exports.Playlist = exports.Video = exports.Channel = exports.Authenticator = exports.ContinuatedList = exports.User = exports.Explorer = exports.WrappedHTTPClient = exports.IYoutube = void 0;
exports.nodeDefault = exports.List = exports.CommentThreadRepliesContinuatedList = exports.CommentThread = exports.Comment = exports.CommentSectionContinuatedList = exports.Playlist = exports.Video = exports.Channel = exports.Authenticator = exports.ContinuatedList = exports.User = exports.Explorer = exports.WrappedHTTPClient = exports.IYoutube = void 0;
const Explorer_1 = require("./fetchers/Explorer");

@@ -38,2 +38,4 @@ Object.defineProperty(exports, "Explorer", { enumerable: true, get: function () { return Explorer_1.Explorer; } });

Object.defineProperty(exports, "CommentThreadRepliesContinuatedList", { enumerable: true, get: function () { return CommentThreadRepliesContinuatedList_1.CommentThreadRepliesContinuatedList; } });
const List_1 = require("./interfaces/List");
Object.defineProperty(exports, "List", { enumerable: true, get: function () { return List_1.List; } });
const IYoutube_1 = require("./IYoutube");

@@ -40,0 +42,0 @@ Object.defineProperty(exports, "IYoutube", { enumerable: true, get: function () { return IYoutube_1.default; } });

{
"name": "iyoutube",
"version": "0.0.22",
"version": "0.0.23",
"description": "The ultimate unofficial YouTube API Client for Javascript",

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

import helpers from "./helpers";
import { WrappedHTTPClient } from "../WrappedHTTPClient";
import { HTTPRequestOptions } from "../interfaces/HTTPClient";
import { Video, Channel, Playlist, Comment, CommentThread } from "../main";
import { List } from "../interfaces/List";
export class ContinuatedList {
export class ContinuatedList extends List {
results: Array<Video | Channel | Playlist | Comment | CommentThread>;
endReached = false;
requestOptions: HTTPRequestOptions;

@@ -18,6 +16,6 @@ httpclient: WrappedHTTPClient;

constructor(requestOptions: HTTPRequestOptions, dataprocessor: Function, httpclient : WrappedHTTPClient, onlyContinuation?:boolean) {
super();
this.requestOptions = requestOptions;
this.httpclient = httpclient;
this.dataprocessor = dataprocessor;
this.results = new Array();
if(this.onlyContinuation) this.onlyContinuation = onlyContinuation as boolean;

@@ -55,26 +53,2 @@ }

}
getByType(type: any) {
return this.results.filter((elem) => { return elem instanceof type });
}
getVideos():Array<Video> {
return this.getByType(Video) as Array<Video>
}
getPlaylists():Array<Playlist> {
return this.getByType(Playlist) as Array<Playlist>;
}
getChannels():Array<Channel> {
return this.getByType(Channel) as Array<Channel>;
}
getComments():Array<Comment> {
return this.getByType(Comment) as Array<Comment>;
}
getCommentThreads():Array<CommentThread> {
return this.getByType(CommentThread) as Array<CommentThread>;
}
}

@@ -1,2 +0,2 @@

import { Channel } from "../main";
import { Channel, List } from "../main";
import { ContinuatedList } from "./ContinuatedList";

@@ -20,3 +20,3 @@ import { HTTPRequestMethod } from "../interfaces/HTTPClient";

async getPlaylists():Promise<Array<Playlist>> {
async getPlaylists():Promise<List> {
this.client.throwErrorIfNotReady();

@@ -41,3 +41,3 @@ const res = await this.httpclient.request({

return playlists;
return new List(playlists);
}

@@ -53,3 +53,3 @@

async getSubscriptions():Promise<Array<Channel>> {
async getSubscriptions():Promise<List> {
this.client.throwErrorIfNotReady();

@@ -67,3 +67,3 @@ const res = await this.httpclient.request({

items = helpers.processRendererItems(items, this.httpclient);
return items;
return new List(items);
}

@@ -70,0 +70,0 @@

@@ -18,2 +18,3 @@ import { Explorer } from "./fetchers/Explorer";

import { CaptionTrack } from "./interfaces/CaptionTrack";
import { List } from "./interfaces/List";
import { default as IYoutube } from "./IYoutube";

@@ -42,2 +43,3 @@

export { CaptionTrack as CaptionTrack }
export { List as List }

@@ -44,0 +46,0 @@ //Skips Webpack checks

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