18 lines
676 B
JavaScript
18 lines
676 B
JavaScript
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;
|
|
}
|