15 lines
543 B
TypeScript
15 lines
543 B
TypeScript
import { FetchParams, GalleryData, VideoAgent, VideoData } from "@/meta/data";
|
|
import { fetchPornHubGalleryData } from "./gallery";
|
|
import { fetchPornHubVideoData } from "./video";
|
|
|
|
export class PornHubAgent implements VideoAgent {
|
|
|
|
public getGallery = async (params?: FetchParams): Promise<GalleryData[]> => {
|
|
return await fetchPornHubGalleryData(params)
|
|
}
|
|
|
|
public getVideo = async (id: string, params?: FetchParams): Promise<[VideoData, GalleryData[]]> => {
|
|
return await fetchPornHubVideoData(id, params)
|
|
}
|
|
|
|
} |