1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// GitHub gists
4export let githubGists = fetchJSON(
5 "https://api.github.com/users/stevekrouse/gists"
6);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let fetchBinance = (payType: string) =>
4 fetch("https://p2p.binance.com/bapi/c2c/v2/friendly/c2c/adv/search", {
5 method: "POST",
6 body: JSON.stringify({
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export function valRuns({ token, id, error, source, since, until, offset, limit }: {
37 };
38}> {
39 return fetchJSON(
40 `https://api.val.town/v1/vals/${id}/runs?` +
41 searchParams({
1import { fetch } from "https://esm.town/v/std/fetch";
2import process from "node:process";
3import { secretToTelegramChat } from "https://esm.town/v/pomdtr/secretToTelegramChat";
5export async function sendToTelegram(secret: string, message: string) {
6 const chatID = secretToTelegramChat[secret];
7 const resp = await fetch(
8 `https://api.telegram.org/bot${process.env.telegramToken}/sendMessage?chat_id=${chatID}&text=${message}`,
9 {
1import { fetch } from "https://esm.town/v/std/fetch";
2import { secretSlackWebhookEndpoint } from "https://esm.town/v/eric/secretSlackWebhookEndpoint";
3
5 const slack = secretSlackWebhookEndpoint
6 console.log("@eric.webhook", req.body)
7 await fetch(slack, {
8 method: 'POST',
9 header: {'Content-Type': 'application/json'},
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const markdownToHtml = async (res, req) => {
5 const unified = (await import("npm:unified")).unified;
6 const markdown = (await import("npm:remark-parse")).default;
7 const markdownToConvert = fetch(
8 "https://jessmartin-todoMarkdown.express.val.run",
9 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let register_discord_commands = async (
13 url += `commands`;
14 }
15 const response = await fetch(url, {
16 headers: {
17 "Content-Type": "application/json",
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
14 },
15 };
16 const me = await fetchJSON(
17 "https://api.val.town/v1/me",
18 opts,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2import { runVal } from "https://esm.town/v/std/runVal";
3
10 description,
11 );
12 const val = await fetchJSON(
13 `https://api.val.town/v1/vals`,
14 {
1import { fetchJSON } from "https://esm.town/v/val/fetchJSON";
2
3export let postWebhookTest4 = fetchJSON(
4 "https://api.val.town/express/@val.postWebhook5",
5 {