public_library_map/node_modules/domutils/lib/feeds.d.ts

71 lines
1.5 KiB
TypeScript
Raw Normal View History

2022-09-03 17:12:22 +10:00
import type { AnyNode } from "domhandler";
/**
* The type of a media item.
*
* @category Feeds
*/
2021-11-24 19:46:47 +11:00
export declare type FeedItemMediaMedium = "image" | "audio" | "video" | "document" | "executable";
2022-09-03 17:12:22 +10:00
/**
* The type of a media item.
*
* @category Feeds
*/
2021-11-24 19:46:47 +11:00
export declare type FeedItemMediaExpression = "sample" | "full" | "nonstop";
2022-09-03 17:12:22 +10:00
/**
* A media item of a feed entry.
*
* @category Feeds
*/
2021-11-24 19:46:47 +11:00
export interface FeedItemMedia {
medium: FeedItemMediaMedium | undefined;
isDefault: boolean;
url?: string;
fileSize?: number;
type?: string;
expression?: FeedItemMediaExpression;
bitrate?: number;
framerate?: number;
samplingrate?: number;
channels?: number;
duration?: number;
height?: number;
width?: number;
lang?: string;
}
2022-09-03 17:12:22 +10:00
/**
* An entry of a feed.
*
* @category Feeds
*/
2021-11-24 19:46:47 +11:00
export interface FeedItem {
id?: string;
title?: string;
link?: string;
description?: string;
pubDate?: Date;
media: FeedItemMedia[];
}
2022-09-03 17:12:22 +10:00
/**
* The root of a feed.
*
* @category Feeds
*/
2021-11-24 19:46:47 +11:00
export interface Feed {
type: string;
id?: string;
title?: string;
link?: string;
description?: string;
updated?: Date;
author?: string;
items: FeedItem[];
}
/**
* Get the feed object from the root of a DOM tree.
*
2022-09-03 17:12:22 +10:00
* @category Feeds
2021-11-24 19:46:47 +11:00
* @param doc - The DOM to to extract the feed from.
* @returns The feed.
*/
2022-09-03 17:12:22 +10:00
export declare function getFeed(doc: AnyNode[]): Feed | null;
2021-11-24 19:46:47 +11:00
//# sourceMappingURL=feeds.d.ts.map