You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
840 B
29 lines
840 B
import { Comments } from "@/client/typings/comment";
|
|
import { SearchResults } from "@/client/typings/search";
|
|
import { SearchOptions } from "@/client/typings/search/options";
|
|
import { Suggestions } from "@/client/typings/search/suggestions";
|
|
import { Video } from "@/client/typings/video";
|
|
import { Watchable } from "@/client/typings/watchable";
|
|
|
|
export interface ConnectedAdapter {
|
|
getTrending(region: string): Promise<Video[]>;
|
|
|
|
getSearchSuggestions(query: string): Promise<Suggestions>;
|
|
getSearch(query: string, options?: SearchOptions): Promise<SearchResults>;
|
|
|
|
getWatchable(videoId: string): Promise<Watchable>;
|
|
|
|
getComments(videoId: string, repliesToken?: string): Promise<Comments>;
|
|
}
|
|
|
|
export default interface Adapter {
|
|
apiType: ApiType;
|
|
|
|
connect(url: string): ConnectedAdapter;
|
|
}
|
|
|
|
export enum ApiType {
|
|
Piped,
|
|
Invidious
|
|
}
|