A work-in-progress, horribly overpowered CLI for Ozone
at main 578 B view raw
1import { AtpAgent } from "@atproto/api"; 2export const getAllAppeals = async (agent: AtpAgent) => { 3 let appeals: any[] = []; // Y U NO LET ME IMPORT TYPEDEF DENO???? 4 let cursor; 5 do { 6 const { data } = await agent.tools.ozone.moderation.queryStatuses({ 7 limit: 100, 8 includeMuted: false, 9 appealed: true, 10 sortField: "lastReportedAt", 11 sortDirection: "desc", 12 cursor, 13 }); 14 if (!data.subjectStatuses.length) break; 15 cursor = data.cursor; 16 appeals = appeals.concat(data.subjectStatuses); 17 } while (cursor); 18 19 return appeals; 20};