@types/usetube
TypeScript icon, indicating that this package has built-in type declarations

2.1.2 • Public • Published

Installation

npm install --save @types/usetube

Summary

This package contains type definitions for usetube (https://github.com/valerebron/usetube).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/usetube.

index.d.ts

export interface YouTubeResults {
    videos: Video[];
    didyoumean: string;
    token: string;
    apikey: string;
}

export interface Video {
    id: string;
    original_title: string;
    title: string;
    artist: string;
    duration: number;
    publishedAt: string;
}

export interface VideoDesc {
    text: string;
    navigationEndpoint?: NavigationEndpoint;
}

export interface NavigationEndpoint {
    clickTrackingParams: string;
    commandMetadata: CommandMetadata;
    urlEndpoint: URLEndpoint;
}

export interface CommandMetadata {
    webCommandMetadata: WebCommandMetadata;
}

export interface WebCommandMetadata {
    url: string;
    webPageType: string;
    rootVe: number;
}

export interface URLEndpoint {
    url: string;
    target?: string;
    nofollow: boolean;
}

export interface ChannelResults {
    channels: Channel[];
    didyoumean: string;
    token: string;
    apikey: string;
}

export interface Channel {
    name: string;
    channel_id: string;
    nb_videos: number;
    nb_subscriber: number;
    official: boolean;
    channel_avatar_small: string;
    channel_avatar_medium: string;
    channel_avatar_large: string;
}

export function searchVideo(terms: string): Promise<YouTubeResults>;
export function getVideoDesc(video_id: string): Promise<VideoDesc>;
export function getChannelVideos(channel_id: string): Promise<Video[]>;
export function getChannelDesc(channel_id: string): Promise<string>;
export function getPlaylistVideos(playlist_id: string): Promise<Video[]>;
export function getVideoDate(video_id: string): Promise<string>;
export function searchChannel(terms: string): Promise<ChannelResults>;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Ezell Frazier.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/usetube

Weekly Downloads

77

Version

2.1.2

License

MIT

Unpacked Size

5.83 kB

Total Files

5

Last publish

Collaborators

  • types