42 fillBlank: FILL_BLANK,
43 quiz: QUIZ,
44 fetchHtml: (email: string, lesson: number) =>
45 generateLessonHtml({
46 email,
52 fillBlank: FILL_BLANK,
53 quiz: QUIZ,
54 fetchHtml: (email: string, lesson: number) =>
55 generateLessonHtml({
56 email,
36 fillBlank: FILL_BLANK,
37 quiz: QUIZ,
38 fetchHtml: (email: string, lesson: number) =>
39 generateLessonHtml({
40 email,
92 fillBlank: FILL_BLANK,
93 quiz: QUIZ,
94 fetchHtml: (email: string, lesson: number) =>
95 generateLessonHtml({
96 email,
17
18 url.host = notionDomain;
19 const response = await fetch(url, req);
20
21 const contents = await response.text();
8 **/
9export const getMyValTownUserUUID = async () => {
10 return (await (await fetch(`${VALTOWN_API_URL}/me`, {
11 headers: {
12 Authorization: `Bearer ${Deno.env.get("valtown")}`,
16Deno.exit(0);
17
18// Fetching reports
19// const reports = await masto.v1.admin.reports.list();
20// console.log(reports);
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Helper function to format the date for GitHub API query
8}
9
10// Function to fetch top GitHub repositories based on stars and creation date
11async function topGitHubRepos(stars: number, daysAgo: number, timeframeDescription: string) {
12 const date = formatDate(daysAgo);
13 const query = `stars:>${stars} created:>${date}`;
14 const response = await fetch(
15 `https://api.github.com/search/repositories?q=${query}&sort=stars&order=desc&per_page=10`,
16 )
5 commit = false,
6): Promise<void> {
7 const resp = await fetch(`https://api.val.town/v1/vals/${val_id}`, {
8 headers: {
9 Authorization: "Bearer " + Deno.env.get("valtown"),
11 });
12 if (resp.status !== 200) {
13 console.error("Error fetching val:", resp);
14 return;
15 }
30 for (const v of versions_to_delete) {
31 console.log(`Deleting Version ${v}`);
32 const resp = await fetch(
33 `https://api.val.town/v1/vals/${val_id}/versions/${v}`,
34 {
41 case 200: {
42 if (commit) {
43 const resp = await fetch(
44 `https://api.val.town/v1/vals/${val_id}/versions/${v}`,
45 {
64 }
65 default:
66 console.error("Error fetching val version:", resp);
67 return;
68 }
1export default async function() {
2 const res = await fetch("https://api.manifold.markets/request-loan", {
3 headers: {
4 Authorization: `Key ${Deno.env.get("manifoldApiKey")}`,