youtube.ts
Advanced tools
Comparing version 0.0.1 to 0.0.2
import api from "../API"; | ||
import { YoutubePlaylistItem, YoutubePlaylistItemsSearch, YoutubePlaylistParams, YoutubePlaylistSearch, YoutubeSearchParams } from "../types/index"; | ||
import { YoutubePlaylist, YoutubePlaylistItem, YoutubePlaylistItemsSearch, YoutubePlaylistParams, YoutubePlaylistSearch, YoutubeSearchParams } from "../types/index"; | ||
export declare class Playlists { | ||
@@ -7,3 +7,3 @@ private readonly api; | ||
constructor(api: api); | ||
get: (playlistResolvable: string, params?: YoutubePlaylistParams) => Promise<any>; | ||
get: (playlistResolvable: string, params?: YoutubePlaylistParams) => Promise<YoutubePlaylist>; | ||
items: (playlistResolvable: string, params?: YoutubePlaylistParams) => Promise<YoutubePlaylistItemsSearch>; | ||
@@ -10,0 +10,0 @@ item: (playlistResolvable: string, videoResolvable: string, params?: YoutubePlaylistParams) => Promise<YoutubePlaylistItem>; |
@@ -9,3 +9,3 @@ /// <reference types="node" /> | ||
resolveID: (resolvable: string, type: string) => Promise<string>; | ||
downloadMyVideo: (videoResolvable: string, key: string, cookie: string, dest?: string) => Promise<never>; | ||
downloadMyVideo: (videoResolvable: string, key: string, cookie: string, dest?: string) => Promise<string>; | ||
iteratePages: (searchResults: any, params: any, limit?: number) => Promise<any[]>; | ||
@@ -12,0 +12,0 @@ downloadMyVideos: (yourChannel: string, key: string, cookie: string, dest?: string, limit?: number) => Promise<void>; |
@@ -162,3 +162,3 @@ "use strict"; | ||
fs.writeFileSync(dest, Buffer.from(response.data, "binary")); | ||
return [2 /*return*/]; | ||
return [2 /*return*/, dest]; | ||
} | ||
@@ -165,0 +165,0 @@ }); |
@@ -30,2 +30,3 @@ import { YoutubeThumbnail } from "./index"; | ||
channelTitle: string; | ||
tags: string[]; | ||
localized: { | ||
@@ -32,0 +33,0 @@ title: string; |
@@ -6,2 +6,2 @@ export * from "./Channels" | ||
export * from "./Comments" | ||
export * from "./Info" | ||
export * from "./Info" |
import api from "../API" | ||
import {YoutubePlaylistItem, YoutubePlaylistItemsSearch, YoutubePlaylistParams, YoutubePlaylistSearch, YoutubeSearchParams} from "../types/index" | ||
import {YoutubePlaylist, YoutubePlaylistItem, YoutubePlaylistItemsSearch, YoutubePlaylistParams, YoutubePlaylistSearch, YoutubeSearchParams} from "../types/index" | ||
import {Util} from "./index" | ||
@@ -14,3 +14,3 @@ | ||
const response = await this.api.get("playlist", params) | ||
return response.items[0] | ||
return response.items[0] as Promise<YoutubePlaylist> | ||
} | ||
@@ -17,0 +17,0 @@ |
@@ -73,2 +73,3 @@ import axios from "axios" | ||
fs.writeFileSync(dest, Buffer.from(response.data, "binary")) | ||
return dest | ||
} | ||
@@ -75,0 +76,0 @@ |
{ | ||
"name": "youtube.ts", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Wrapper for the YouTube API with typings.", | ||
@@ -5,0 +5,0 @@ "main": "dist/youtube.js", |
@@ -6,2 +6,2 @@ export * from "./ChannelTypes" | ||
export * from "./CommentTypes" | ||
export * from "./SubscriptionTypes" | ||
export * from "./SubscriptionTypes" |
@@ -32,2 +32,3 @@ import {YoutubeThumbnail} from "./index" | ||
channelTitle: string | ||
tags: string[] | ||
localized: { | ||
@@ -34,0 +35,0 @@ title: string |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152711
68
3217
3