1export function myApi(name) {
2 return "hi " + name;
3}
23 async function fetchCount(id) {
24 const endpoint =
25 `https://functions.api.ticos-systems.cloud/api/gates/counter?organizationUnitIds=${id}`;
26 const response = await fetch(endpoint, {
27 headers: {
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_BASE_URL } from "https://esm.town/v/mangadex/API_BASE_URL";
3
4type LoginSuccess = {
28): Promise<LoginResponse> => {
29 const response = await fetch(
30 `${API_BASE_URL}/auth/login`,
31 {
32 method: "POST",
1import { fetch } from "https://esm.town/v/std/fetch";
2import { API_BASE_URL } from "https://esm.town/v/mangadex/API_BASE_URL";
3
4type LoginSuccess = {
27 }
28 const response = await fetch(
29 `${API_BASE_URL}/list/${listId}/feed`,
30 {
31 headers: {
3export async function updateTicketCoordinator() {
4 // read user profiles and fint those who want to be a tickets master and add those to group @tickets-coordinators
5 // Require the Node Slack SDK package (github.com/slackapi/node-slack-sdk)
6 const { WebClient, LogLevel } = import("npm:@slack/web-api");
7 // read all
8 const slackAccessToken = process.env.slackAccessToken;
24 );
25 try {
26 // InitializeSlack API client
27 const client = new WebClient(slackAccessToken, { logLevel: LogLevel.WARN });
28 // Fetch all users
1export function myApi(name) {
2 return "hi " + name;
3}
1import { paginateAPI } from "https://esm.town/v/andreterron/paginateAPI";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3import process from "node:process";
4
5export const testApi = (async () => {
6
7 const threshold = 90;
13 };
14 const me = await fetchJSON(
15 "https://api.val.town/v1/me",
16 opts,
17 );
18 // TODO: Paginate
19 const vals = await paginateAPI(
20 `https://api.val.town/v1/users/${me.id}/vals?limit=100`,
21 opts,
22 );
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}