1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { createRestAPIClient } from "npm:masto";
const masto = createRestAPIClient({
url: Deno.env.get("MASTO_INSTANCE_URL"),
accessToken: Deno.env.get("MASTO_ACCESS_TOKEN"),
});
const notifications = await masto.v1.notifications.list({
types: ["mention"],
limit: 10, // Reduced limit because of current limit on logs
});
console.log(notifications);
// npm:masto doesn't clean stop, so we need to manually exit
Deno.exit(0);
// Fetching reports
// const reports = await masto.v1.admin.reports.list();
// console.log(reports);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
January 17, 2024