@robinpath/rss
0.1.4Node.jsPublicParse RSS and Atom feeds, detect new entries
RSS
Parse RSS and Atom feeds, detect new entries, and get feed metadata
Package: @robinpath/rss | Category: Web | Type: Utility
Authentication
No authentication required. All functions are available immediately.
Use Cases
Use the rss module when you need to:
- Parse an RSS/Atom feed from a URL -- Use
rss.parseto perform this operation - Parse RSS/Atom XML from a string -- Use
rss.parseStringto perform this operation - Get feed items with a limit -- Use
rss.getItemsto perform this operation - Get only new items since last check or since a date -- Use
rss.getNewto perform this operation - Get the most recent item from a feed -- Use
rss.getLatestto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
parse | Parse an RSS/Atom feed from a URL | {title, description, link, items} |
parseString | Parse RSS/Atom XML from a string | {title, items} |
getItems | Get feed items with a limit | Array of items |
getNew | Get only new items since last check or since a date | Array of new items |
getLatest | Get the most recent item from a feed | Latest item or null |
feedInfo | Get feed metadata without items | {title, description, link, itemCount} |
Functions
parse
Parse an RSS/Atom feed from a URL
Module: rss | Returns: object -- {title, description, link, items}
rss.parse "https://blog.example.com/feed"
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Feed URL |
parseString
Parse RSS/Atom XML from a string
Module: rss | Returns: object -- {title, items}
rss.parseString $xmlContent
| Parameter | Type | Required | Description |
|---|---|---|---|
xml | string | Yes | XML content |
getItems
Get feed items with a limit
Module: rss | Returns: array -- Array of items
rss.getItems "https://blog.example.com/feed" 5
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Feed URL |
limit | number | No | Max items (default 10) |
getNew
Get only new items since last check or since a date
Module: rss | Returns: array -- Array of new items
rss.getNew "https://blog.example.com/feed" "2025-01-01"
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Feed URL |
since | string | No | ISO date (optional, uses cache if omitted) |
getLatest
Get the most recent item from a feed
Module: rss | Returns: object -- Latest item or null
rss.getLatest "https://blog.example.com/feed"
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Feed URL |
feedInfo
Get feed metadata without items
Module: rss | Returns: object -- {title, description, link, itemCount}
rss.feedInfo "https://blog.example.com/feed"
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Feed URL |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
| (standard errors) | Check function parameters and authentication |
@desc "Parse and validate result"
do
set $result as rss.parse "https://blog.example.com/feed"
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Items
Retrieve all items and loop through them.
@desc "Get items and iterate results"
do
set $result as rss.getItems "https://blog.example.com/feed" 5
each $item in $result
print $item
end
enddo
2. Multi-step RSS workflow
Chain multiple rss operations together.
@desc "Parse, parse string, and more"
do
set $r_parse as rss.parse "https://blog.example.com/feed"
set $r_parseString as rss.parseString $xmlContent
set $r_getItems as rss.getItems "https://blog.example.com/feed" 5
print "All operations complete"
enddo
3. Safe parse with validation
Check results before proceeding.
@desc "Parse and validate result"
do
set $result as rss.parse "https://blog.example.com/feed"
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- json -- JSON module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.4 | latest | 1 months ago |
Related Modules
ftp
JS@robinpathv0.1.3
FTP and SFTP file transfer operations
http
JS@robinpathv0.1.3
HTTP server for RobinPath scripts. Register routes with static responses (JSON, HTML, files), enable CORS, serve static directories. No callbacks needed.
form
JS@robinpathv0.2.1
Declarative form builder for RobinPath scripts � define fields inline, generate schemas, validate submissions
api
JS@robinpathv0.1.2
HTTP client for making requests to external APIs with profiles, auth, download/upload, and auto-JSON parsing
$ robinpath add @robinpath/rss
