mirror of
https://github.com/LightAir/turbo-rss.git
synced 2026-02-04 03:56:19 +00:00
better doc formatting
This commit is contained in:
17
readme.md
17
readme.md
@@ -68,11 +68,20 @@ feed.item(itemOptions);
|
|||||||
* `custom_elements` _optional_ **array** Put additional elements in the item (node-xml syntax)
|
* `custom_elements` _optional_ **array** Put additional elements in the item (node-xml syntax)
|
||||||
* `enclosure` _optional_ **object** An enclosure object
|
* `enclosure` _optional_ **object** An enclosure object
|
||||||
```js
|
```js
|
||||||
/* enclosure takes url or file key for the enclosure object */
|
/* enclosure takes url or file key for the enclosure object
|
||||||
|
|
||||||
|
url: _required_ url to file object (or file)
|
||||||
|
file: _required_ path to binary file (or url)
|
||||||
|
size: _optional_ size of the file
|
||||||
|
type: _optional_ if not provided the mimetype will be guessed
|
||||||
|
based on the extension of the file or url,
|
||||||
|
passing type to the enclosure will override the guessed type
|
||||||
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
'url' : 'http://www.example.com/path/to/image', // url or path to binary, keys are url or file
|
'url' : 'http://www.example.com/path/to/image',
|
||||||
'length' : 1668, // the size of the file // optional
|
'size' : 1668, //
|
||||||
'type' : 'image/jpeg' // optional, if not provided the mimetype will be guessed based on the extension of the file or url, passing type to the enclosure will override the guessed type
|
'type' : 'image/jpeg'
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user