Posts update collector library
import { fetch_posts } from "jsr:@akuad/antenna@2";
const fetch_result = await fetch_posts([
{ site_name: "qiita", uid: "aKuad" },
{ feed_type: "atom" , url: "https://github.com/akuad", headers: { "accept": "application/atom+xml" }, timeout_ms: 20000 }
], 10000);
console.log(fetch_result.posts);
// To see failed fetching
console.log(fetch_result.fail_reasons);Output example of .posts:
[
// ...
{
site_name: "Qiita",
site_icon_url: "https://qiita.com/favicon.ico",
title: "GitHub リポジトリの 'Deployments' に表示させるには?",
url: "https://qiita.com/aKuad/items/9d1cb399b2846f61648d",
author_name: "aKuad",
author_url: "https://qiita.com/aKuad",
author_icon_url: "https://avatars2.githubusercontent.com/u/53811809?v=4",
description: "## GitHub リポジトリの 'Deployments' って? これのことです。  :::note wa",
thumbnail_url: "",
post_date: 2026-02-13T12:25:53.000Z,
update_date: 2026-03-09T12:53:20.000Z
},
{
site_name: "github.com",
site_icon_url: "https://github.com/favicon.ico",
title: "aKuad pushed antenna",
url: "https://github.com/aKuad/antenna/compare/f9247fb0f5...075fb8a2a4",
author_name: "aKuad",
author_url: "https://github.com/aKuad",
author_icon_url: undefined,
description: '<div class="repo-push js-feed-item-view"><div class="body">\n' +
// Too long output here by github.com
"</div></div>",
thumbnail_url: undefined,
post_date: 2026-03-09T13:14:16.000Z,
update_date: 2026-03-09T13:14:16.000Z
},
// ...
]headers?: HeadersInit- Additional HTTP headers on data fetch
timeout_ms?: number- Limit duration of fetching
Timeout also can be specified at fetch_posts([targets], timeout_ms). When both are specified, individual specified value will be accepted.
- Atom feed
{ feed_type: "atom", url: string }
- Qiita
{ site_name: "qiita", uid: string }⚠️ This API has rate limitation - 60 requests/hour
- RSS feed
{ feed_type: "rss", url: string }
Return structure of fetch_posts() modified. Put .posts to get same result (post data).
v0.x.x:
const posts = await fetch_posts([ /* ... */ ]);
console.log(posts);v1.x.x:
const fetch_result = await fetch_posts([ /* ... */ ]);
console.log(fetch_result.posts);@libs/xml - Copyright (c) 2024 Simon Lecoq
antenna - Creative Commons Zero v1.0
@libs/xml - MIT License