|
1 | 1 | /** |
2 | | - * @typedef Author An author object |
3 | | - * @property {string} name Example: `'Acme, Inc.'` or `'Jane Doe'` |
4 | | - * @property {string} [email] Example: `john@example.org` |
5 | | - * @property {string} [url] Example: `'https://example.org/john'`. `url` is used in `atom`, not in `rss`. |
| 2 | + * @typedef Author |
| 3 | + * An author object |
| 4 | + * @property {string} name |
| 5 | + * Example: `'Acme, Inc.'` or `'Jane Doe'` |
| 6 | + * @property {string} [email] |
| 7 | + * Example: `john@example.org` |
| 8 | + * @property {string} [url] |
| 9 | + * Example: `'https://example.org/john'`. |
| 10 | + * `url` is used in `atom`, not in `rss`. |
6 | 11 | * |
7 | | - * @typedef Enclosure Media |
8 | | - * @property {string} url Full URL to the resource (example: `'http://dallas.example.com/joebob_050689.mp3'`). |
9 | | - * @property {number} size Resource size in bytes (example: `24986239`). |
10 | | - * @property {string} type Mime type of the resource (example: `'audio/mpeg'`). |
| 12 | + * @typedef Enclosure |
| 13 | + * Media |
| 14 | + * @property {string} url |
| 15 | + * Full URL to the resource (example: |
| 16 | + * `'http://dallas.example.com/joebob_050689.mp3'`). |
| 17 | + * @property {number} size |
| 18 | + * Resource size in bytes (example: `24986239`). |
| 19 | + * @property {string} type |
| 20 | + * Mime type of the resource (example: `'audio/mpeg'`). |
11 | 21 | * |
12 | | - * @typedef Channel Data on the feed (the group of items). |
13 | | - * @property {string} title Title of the channel (required, example: `Zimbabwe | The Guardian`). |
14 | | - * @property {string} url Full URL to the site (required, example: `'https://www.theguardian.com/world/zimbabwe'`). |
15 | | - * @property {string} [feedUrl] Full URL to this channel (example: `'https://www.adweek.com/feed/'`). Make sure to pass different ones to `rss` and `atom`! You *should* define this. |
16 | | - * @property {string} [description] Short description of the channel (example: `Album Reviews`). You *should* define this. |
17 | | - * @property {string} [lang] BCP 47 language tag representing the language of the whole channel (example: `'fr-BE'`). You *should* define this. |
18 | | - * @property {string|Author} [author] Optional author of the whole channel. Either `string`, in which case it’s as passing `{name: string}`. Or an author object. |
19 | | - * @property {Array<string>} [tags] Categories of the channel (example: `['JavaScript', 'React']`). |
| 22 | + * @typedef Channel |
| 23 | + * Data on the feed (the group of items). |
| 24 | + * @property {string} title |
| 25 | + * Title of the channel (required, example: `Zimbabwe | The Guardian`). |
| 26 | + * @property {string} url |
| 27 | + * Full URL to the site (required, example: |
| 28 | + * `'https://www.theguardian.com/world/zimbabwe'`). |
| 29 | + * @property {string} [feedUrl] |
| 30 | + * Full URL to this channel (example: |
| 31 | + * `'https://www.adweek.com/feed/'`). |
| 32 | + * Make sure to pass different ones to `rss` and `atom`! |
| 33 | + * You *should* define this. |
| 34 | + * @property {string} [description] |
| 35 | + * Short description of the channel (example: `Album Reviews`). |
| 36 | + * You *should* define this. |
| 37 | + * @property {string} [lang] |
| 38 | + * BCP 47 language tag representing the language of the whole channel (example: |
| 39 | + * `'fr-BE'`). |
| 40 | + * You *should* define this. |
| 41 | + * @property {string|Author} [author] Optional author of the whole channel. |
| 42 | + * Either `string`, in which case it’s as passing `{name: string}`. |
| 43 | + * Or an author object. |
| 44 | + * @property {Array<string>} [tags] Categories of the channel (example: |
| 45 | + * `['JavaScript', 'React']`). |
20 | 46 | * |
21 | | - * @typedef Entry Data on a single item. |
22 | | - * @property {string} [title] Title of the item (example: `'Playboi Carti: Whole Lotta Red'`). Either `title`, `description`, or `descriptionHtml` must be set. |
23 | | - * @property {string} [description] Either the whole post or an excerpt of it (example: `'Lorem'`). Should be plain text. `descriptionHtml` is preferred over plain text `description`. Either `title`, `description`, or `descriptionHtml` must be set. |
24 | | - * @property {string} [descriptionHtml] Either the whole post or an excerpt of it (example: `'<p>Lorem</p>'`). Should be serialized HTML. `descriptionHtml` is preferred over plain text `description`. Either `title`, `description`, or `descriptionHtml` must be set. |
25 | | - * @property {string|Author} [author] Entry version of `channel.author`. You *should* define this. For `atom`, it is required to either set `channel.author` or set `author` on all entries. |
26 | | - * @property {string} [url] Full URL of this entry on the *site* (example: `'https://pitchfork.com/reviews/albums/roberta-flack-first-take'`). |
27 | | - * @property {Date|number|string} [published] When the entry was first published (`Date` or value for `new Date(x)`, optional). |
28 | | - * @property {Date|number|string} [modified] When the entry was last modified (`Date` or value for `new Date(x)`, optional). |
29 | | - * @property {Array<string>} [tags] Categories of the entry (`Array<string>?`, example: `['laravel', 'debugging']`). |
30 | | - * @property {Enclosure} [enclosure] Attached media |
| 47 | + * @typedef Entry |
| 48 | + * Data on a single item. |
| 49 | + * @property {string} [title] |
| 50 | + * Title of the item (example: `'Playboi Carti: Whole Lotta Red'`). |
| 51 | + * Either `title`, `description`, or `descriptionHtml` must be set. |
| 52 | + * @property {string} [description] |
| 53 | + * Either the whole post or an excerpt of it (example: `'Lorem'`). |
| 54 | + * Should be plain text. |
| 55 | + * `descriptionHtml` is preferred over plain text `description`. |
| 56 | + * Either `title`, `description`, or `descriptionHtml` must be set. |
| 57 | + * @property {string} [descriptionHtml] |
| 58 | + * Either the whole post or an excerpt of it (example: `'<p>Lorem</p>'`). |
| 59 | + * Should be serialized HTML. |
| 60 | + * `descriptionHtml` is preferred over plain text `description`. |
| 61 | + * Either `title`, `description`, or `descriptionHtml` must be set. |
| 62 | + * @property {string|Author} [author] |
| 63 | + * Entry version of `channel.author`. |
| 64 | + * You *should* define this. |
| 65 | + * For `atom`, it is required to either set `channel.author` or set `author` |
| 66 | + * on all entries. |
| 67 | + * @property {string} [url] |
| 68 | + * Full URL of this entry on the *site* (example: |
| 69 | + * `'https://pitchfork.com/reviews/albums/roberta-flack-first-take'`). |
| 70 | + * @property {Date|number|string} [published] |
| 71 | + * When the entry was first published (`Date` or value for `new Date(x)`, |
| 72 | + * optional). |
| 73 | + * @property {Date|number|string} [modified] |
| 74 | + * When the entry was last modified (`Date` or value for `new Date(x)`, |
| 75 | + * optional). |
| 76 | + * @property {Array<string>} [tags] |
| 77 | + * Categories of the entry (`Array<string>?`, example: |
| 78 | + * `['laravel', 'debugging']`). |
| 79 | + * @property {Enclosure} [enclosure] |
| 80 | + * Attached media. |
31 | 81 | */ |
32 | 82 |
|
33 | 83 | export {} |
0 commit comments