# @types/usetube

> TypeScript definitions for usetube

Latest version **2.1.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/usetube
pnpm add @types/usetube
yarn add @types/usetube
bun add @types/usetube
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.1.2 |
| Published | 2023-11-07 |
| First published | 2021-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51484 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/usetube
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/usetube
- npm.io page: https://npm.io/package/@types/usetube

## Recent versions

- 2.1.2 (latest) — 2023-11-07
- 2.1.0 (ts3.7) — 2021-10-14
- 2.1.1 — 2023-10-18

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/usetube/index.d.ts)
````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](https://github.com/lynellf).

---
_Source: https://npm.io/package/@types/usetube · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
