Magpie HTML - v0.1.3
    Preparing search index...

    Function gatherFeed

    • Gather and parse a feed from a URL in one convenient call.

      Parameters

      • url: string | URL

        Feed URL as string or URL object

      Returns Promise<Feed>

      Normalized feed data

      This is a high-level convenience method that combines fetching and parsing. It handles encoding detection, redirects, and feed format detection automatically.

      Error if URL is invalid, fetch fails, or feed cannot be parsed

      // Fetch and parse a feed
      const feed = await gatherFeed('https://example.com/feed.xml');

      console.log(feed.title);
      console.log(feed.items[0].title);
      console.log(feed.items[0].url);