1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function greenhouseToRSS(req: Request) {
7 const mode = searchParams.get("mode");
8 const SOURCE_URL = `https://boards-api.greenhouse.io/v1/boards/${account}/jobs`;
9 const { jobs: sourceJobs } = await fetch(SOURCE_URL).then((res) => res.json());
10
11 const getFeedLink = (mode) => `https://donmccurdy-greenhousetorss.express.val.run/?account=${account}&mode=${mode}`;
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function leverToRSS(req: Request) {
9 const SOURCE_URL = `https://api.lever.co/v0/postings/${account}?mode=xml`;
10 const parser = new XMLParser();
11 const sourceXML = await fetch(SOURCE_URL).then((res) => res.text());
12
13 const { job: sourceJobs } = parser.parse(sourceXML).jobs || { job: [] };
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface ValResponse {
39 };
40
41 return fetchJSON("https://api.val.town/v1/vals", {
42 headers: {
43 Authorization: `Bearer ${token}`,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface UpdateValArgs {
20 };
21
22 return fetchJSON(`https://api.val.town/v1/vals/${valId}`, {
23 headers: {
24 Authorization: `Bearer ${token}`,
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3interface UpdateValArgs {
14 };
15
16 return fetchJSON("https://api.val.town/v1/vals", {
17 headers: {
18 Authorization: `Bearer ${token}`,
99});
100
101export default app.fetch;
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import { querystring } from "https://esm.town/v/stevekrouse/querystring";
3
4export let spotifyRefreshToken = async ({ refresh_token, client_id, client_secret }) =>
5 fetchJSON("https://accounts.spotify.com/api/token", {
6 method: "POST",
7 body: await querystring({
2
3// Immediately invoked function that exports a function generating a URL as a string,
4// which fetches all comments from an article associated with the provided post_id.
5export const constructReadTangleUrl = (() => {
6 return (post_id) => {
20
21async function getNewThreads() {
22 const resp = await fetch(`https://discord.com/api/guilds/${guild}/threads/active`, {
23 headers: {
24 "Authorization": `Bot ${token}`,
119});
120
121export default app.fetch;