1export const count = (async () => {
2 let count = 0;
3 function myApi() {
4 return count++;
5 }
2
3export async function githubStars(username) {
4 let res = await fetch(`https://api.github.com/users/${username}/starred`);
5 return await res.json();
6}
1export function myApi(name) {
2 return "hi " + name;
3}
5 username,
6 headers: {
7 "X-GitHub-Api-Version": "2022-11-28",
8 },
9 });
16}) =>
17 fetchJSON(
18 `https://api.telegram.org/bot${botToken}/sendPhoto`,
19 {
20 method: "POST",
1import { snakeToTitleCase } from "https://esm.town/v/rwev/snakeToTitleCase";
2import { wrapInHTMLElements } from "https://esm.town/v/rwev/wrapInHTMLElements";
3
4export async function wttrAstronomyToHTMLTable(
7 let html = ``;
8 const R = await import("npm:ramda");
9 const wrapFn = R.curry(wrapInHTMLElements);
10 const headers = [
11 "date",
1export function myApi(name) {
2 console.log("Hello world!");
3 return "hi " + name;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export let bitlyAPI = ({ token, endpoint, ...params }) => {
4 if (params.body) {
5 params.body = JSON.stringify(params.body);
6 }
7 return fetchJSON(
8 `https://api-ssl.bitly.com/v4/${endpoint}`,
9 {
10 headers: {
4 links: [
5 httpLink({
6 url: "https://www.val.town/api/trpc",
7 }),
8 ],
7 // extension manifest
8 app.get("/", async (c) => {
9 const resp = await fetch("https://api.val.town/v1/me", {
10 headers: {
11 Authorization: `Bearer ${valtownToken}`,
50 const { user } = params;
51 const endpoint = query
52 ? `https://api.val.town/v1/search/vals?query=${
53 encodeURIComponent(query)
54 }`
55 : `https://api.val.town/v1/users/${user}/vals`;
56 const resp = await fetch(endpoint, {
57 headers: {
96 app.post("/view-val", async (c) => {
97 const { params } = await c.req.json();
98 const resp = await fetch(`https://api.val.town/v1/vals/${params.val}`, {
99 headers: {
100 Authorization: `Bearer ${valtownToken}`,