1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { fetch } from "https://esm.town/v/std/fetch";
export const getLinkAggregatorUserCounts = (async () => {
const response = await fetch("https://api.fedidb.org/v1/software?limit=40");
const json = await response.json();
const lemmy = json.data.find((software) =>
software.name.toLowerCase() === "lemmy"
);
const kbin = json.data.find((software) =>
software.name.toLowerCase() === "kbin"
);
return {
lemmy: {
total: lemmy?.user_count,
mau: lemmy?.monthly_active_users,
},
kbin: {
total: kbin?.user_count,
mau: kbin?.monthly_active_users,
},
};
})();