UNPKG

782 BTypeScriptView Raw
1import {Options} from "miniget"
2
3export interface Author {
4 name: string,
5 profile: string,
6 uri: string
7}
8
9export interface Thumbnail {
10 url: string,
11 width: number,
12 height: number
13}
14
15export interface Length {
16 ms: number,
17 sec: number
18}
19
20export interface SearchResult {
21 type: "video" | "playlist",
22 identifier: string,
23 uri: string,
24 title: string,
25 author: Author,
26 length: Length,
27 isStream: boolean,
28 count?: number,
29 thumbnails: Thumbnail[]
30}
31
32export interface SimpleYTOptions extends Options {
33 filter: "video" | "playlist"
34}
35
36/**
37 * search youtube.
38 *
39 * @param query search query
40 * @param options filter, request options
41 */
42export default function simpleYT(query: string, options?: SimpleYTOptions): SearchResult[]
43
\No newline at end of file