bandcamp-fetch
Version:
Scrape Bandcamp content
27 lines • 1.19 kB
TypeScript
import { type FanItemsContinuation } from '../types/Fan.js';
import { type ImageFormat } from '../types/Image.js';
type PageDataKey = 'collection' | 'wishlist' | 'following_genres' | 'following_bands';
type ContinuationDataKey = 'items' | 'followeers';
interface FanItemsParseParams<T> extends FanItemParseOptions {
dataKey: PageDataKey | ContinuationDataKey;
parseItemFn: (data: any, opts: FanItemParseOptions, tracklists: any) => T;
}
export interface FanPageItemsResult<T> {
items: T[];
total: number;
continuation: FanItemsContinuation | null;
}
export interface FanContinuationItemsResult<T> {
items: T[];
continuation: FanItemsContinuation | null;
}
export interface FanItemParseOptions {
imageBaseUrl: string;
imageFormat: ImageFormat | null;
}
export default abstract class FanItemsBaseParser {
protected static parsePageItems<T>(html: string, params: FanItemsParseParams<T>): FanPageItemsResult<NonNullable<T>>;
protected static parseContinuationItems<T>(json: any, continuation: FanItemsContinuation, params: FanItemsParseParams<T>): FanContinuationItemsResult<NonNullable<T>>;
}
export {};
//# sourceMappingURL=FanItemsBaseParser.d.ts.map