Skip to main content

show_item

Function show_item 

Source
pub async fn show_item(
    feed_url: &str,
    key: &str,
    params: &FetchParams,
    cache: &Cache,
) -> Result<Option<Item>, RssError>
Expand description

Fetch a feed (cache-first) and return the single item whose id, raw guid, or resolved url equals key, if present.

Used by rss show and the MCP get_item tool. id is namespaced by feed_url (see ADR-0003); a guid (e.g. Reddit t3_…) is feed-window-independent and is the reliable key across different feed URLs. The lookup is cache-first (ADR-0014): an item the caller already saw survives a rolled feed window, but not a later cache-overwriting refetch.