Fedi.CrowdedGames.Group/JS/ActivityPub.js
2025-04-22 15:49:23 -07:00

20 lines
725 B
JavaScript

export const Scopes = "read write follow push";
export async function GetPublicTimeline(Local = false, Remote = false) {
let Timeline;
if (Local == true && Remote == true) {
console.log("Don't set both Local and Remote timelines to true.");
}
if (Local == true) {
Timeline = await fetch("https://wetdry.world/api/v1/timelines/public?limit=12&local=true")
.then((response) => response.json());
} else if (Remote == true) {
Timeline = await fetch("https://wetdry.world/api/v1/timelines/public?limit=12&remote=true")
.then((response) => response.json());
} else {
Timeline = await fetch("https://wetdry.world/api/v1/timelines/public?limit=12")
.then((response) => response.json());
}
return Timeline;
}