1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function renderGithubReadme(req: express.Request, res: express.Response) {
6 repo: string;
7 };
8 const markdown = await fetch(`https://api.github.com/repos/${repo}/readme`)
9 .then((res) => res.json()).then(({ content }) => atob(content));
10 const html = await fetch("https://api.github.com/markdown", {
11 method: "POST",
12 headers: {
24 li.innerHTML = '<span class="font-semibold text-gray-900">Web</span>: ' + message;
25 ul.appendChild(li)
26 fetch("https://api.val.town/eval/@nimalu.messageMe('" + message + "','Web')")
27 }
28
1export let YoutubeTranscript = async (videoId) => {
2 const { YoutubeTranscript } = await import("npm:youtube-transcript");
3 return YoutubeTranscript.fetchTranscript(videoId);
4};
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export const fetchFile = async (url: string, options?: any) => {
4 const fileUrl =
5 "https://www.gcmgrosvenor.com/wp-content/uploads/Private-Credit-Co-investing-GCM-Grosvenor.pdf";
6 const blob = await fetch(fileUrl).then((r) => r.blob());
7 return blob;
8};
1import { email } from "https://esm.town/v/std/email?v=9";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
3
4export async function EmailNotifIfDidntCode() {
14 org?: any;
15 }
16 const githubEvents = await fetchJSON(
17 "https://api.github.com/users/daviddkkim/events",
18 ) as Data;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export async function githubFollowers() {
4 let followers = await fetchJSON(
5 "https://api.github.com/users/stungeye/followers",
6 );
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// when a request comes in fetch hpotter data
4export async function harryPotterData(req: express.Request, res) {
5 try {
6 const responseData = await fetch(
7 "https://hp-api.onrender.com/api/characters",
8 );
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export const getHolidays = (country, year = new Date().getFullYear()) => {
4 try {
5 return fetchJSON(
6 `https://date.nager.at/api/v2/publicholidays/${year}/${country}`
7 );
1import { fetch } from "https://esm.town/v/std/fetch";
2import { set } from "https://esm.town/v/std/set?v=11";
3import { postHogAPICapture } from "https://esm.town/v/ianvph/postHogAPICapture";
10 // gets newest status update from rss feed
11 const statusRSSLink = "https://status.posthog.com/history.rss";
12 const response = await fetch(statusRSSLink);
13 const newestEntry =
14 (await parseXML(await response.text())).rss.channel