import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
import process from "node:process";
export const testApi = (async () => {
const threshold = 90;
const opts = {
headers: {
Authorization: `Bearer ${process.env.vt_token}`,
},
};
const me = await fetchJSON(
"https://api.val.town/v1/me",
opts,
);
const vals = await paginateAPI(
`https://api.val.town/v1/users/${me.id}/vals?limit=100`,
opts,
);
const privateVals = vals.filter((val) => !val.public);
if (privateVals.length > threshold && )
})();