UNPKG

1.48 kBTypeScriptView Raw
1import type { AnyNode } from "domhandler";
2/**
3 * The medium of a media item.
4 *
5 * @category Feeds
6 */
7export type FeedItemMediaMedium = "image" | "audio" | "video" | "document" | "executable";
8/**
9 * The type of a media item.
10 *
11 * @category Feeds
12 */
13export type FeedItemMediaExpression = "sample" | "full" | "nonstop";
14/**
15 * A media item of a feed entry.
16 *
17 * @category Feeds
18 */
19export interface FeedItemMedia {
20 medium: FeedItemMediaMedium | undefined;
21 isDefault: boolean;
22 url?: string;
23 fileSize?: number;
24 type?: string;
25 expression?: FeedItemMediaExpression;
26 bitrate?: number;
27 framerate?: number;
28 samplingrate?: number;
29 channels?: number;
30 duration?: number;
31 height?: number;
32 width?: number;
33 lang?: string;
34}
35/**
36 * An entry of a feed.
37 *
38 * @category Feeds
39 */
40export interface FeedItem {
41 id?: string;
42 title?: string;
43 link?: string;
44 description?: string;
45 pubDate?: Date;
46 media: FeedItemMedia[];
47}
48/**
49 * The root of a feed.
50 *
51 * @category Feeds
52 */
53export interface Feed {
54 type: string;
55 id?: string;
56 title?: string;
57 link?: string;
58 description?: string;
59 updated?: Date;
60 author?: string;
61 items: FeedItem[];
62}
63/**
64 * Get the feed object from the root of a DOM tree.
65 *
66 * @category Feeds
67 * @param doc - The DOM to to extract the feed from.
68 * @returns The feed.
69 */
70export declare function getFeed(doc: AnyNode[]): Feed | null;
71//# sourceMappingURL=feeds.d.ts.map
\No newline at end of file