10 data.append("file", file);
11
12 const res = await fetch("https://api.pinata.cloud/pinning/pinFileToIPFS", {
13 method: "POST",
14 headers: {
4- The GPT using it: [Game Idea Exchange GPT](https://chatgpt.com/g/g-8fryVV9cU-game-idea-exchange)
5
6Migrated from folder: Tuts/XkontiTech/gptApiTemplate
23
24 capturePostHogEvent(
25 Deno.env.get("phProjectAPIKey"),
26 webhookPayload.sender.login,
27 "GitHub Star",
3Get the Air Quality Index (AQI) for a location via open data sources.
4
5It's "easy" because it strings together multiple lower-level APIs to give you a simple interface for AQI.
6
71. Accepts a location in basically any string format (ie "downtown manhattan")
3const tokenBucket = new TokenBucket(5, 1/12);
4
5export async function getRecommendations(jobDescription, resume, apiKey) {
6
7 if (!tokenBucket.consume()) {
9 }
10
11 const endpoint = 'https://api.openai.com/v1/chat/completions';
12 const model = 'gpt-4';
13
30 method: 'POST',
31 headers: {
32 'Authorization': `Bearer ${apiKey}`,
33 'Content-Type': 'application/json'
34 },
94
95
96// Main function to execute the scraping process
97async function main() {
98 const baseUrl = "https://forums.spacebattles.com/search/69363141/?t=post&c[content]=thread&c[users]=3ndless&o=date";
104 console.log("Valid Feeds:", validFeeds);
105 } catch (error) {
106 console.error("Error during the scraping process:", error);
107 }
108}
9[](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO
113. 🤣🤣🤣🤣
12
13## API
14
15This val uses the [icanhazdadjoke API](https://icanhazdadjoke.com/api). You can find [more docs here](https://github.com/15Dkatz/official_joke_api), such as how to [filter by type](https://github.com/15Dkatz/official_joke_api?tab=readme-ov-file#grab-jokes-by-type).
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
7 text: punchline,
81. Set up a Slack bot/app and have the webhooks point at your forked Val
91. Add the following environment variables to Val.town:
10 - `DUB_API_KEY` your [Dub](https://dub.co) API key
11 - `DUB_WORKSPACE_ID` your Dub workspace ID
12 - `SLACK_MUX_LINK_SIGNING_SECRET` Signing secret for the app you created