fedi-well-known
v0.4.6
Published
Fetch typical Fediverse paths
Downloads
15
Readme
Fetching Fediverse public/operational data
JavaScript examples | TypeScript examples
NodeInfo
import {fetchNodeInfo} from 'fedi-well-known'
const nodeInfo = await fetchNodeInfo('mastodon.social');
const mastodonActiveUsers = nodeInfo.data.usage.users.activeMonth;
console.log(JSON.stringify(nodeInfo.data, null, 2));
Blocklist
import {fetchBlockList} from 'fedi-well-known'
const resp = await fetchBlockList('mastodon.social');
if (resp.success)
{
const blocklist = resp.data;
console.log(JSON.stringify(blocklist, null, 2));
}