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,
},
};
})();