Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=api&page=812&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 11605 results for "api"(2155ms)

simpleLoginmain.tsx3 matches

@yawnxyzUpdated 8 months ago
22 clientId: Deno.env.get("GITHUB_OAUTH_TEST1_CLIENT"),
23 clientSecret: Deno.env.get("GITHUB_OAUTH_TEST1_SECRET"),
24 userInfoUrl: "https://api.github.com/user"
25 },
26 google: {
28 clientSecret: Deno.env.get("GOOGLE_OAUTH_COVERSHEET_SECRET"),
29 redirectUri: "https://yawnxyz-hnclonehtmx.web.val.run/auth/google/callback",
30 userInfoUrl: "https://openidconnect.googleapis.com/v1/userinfo"
31 }
32 }
49 <a href="/auth/google">Sign in with Google</a>
50 <br>
51 <br>Note that Github and Google should work in principle, I just didn't configure them to work on this example in Google's API console or Github's thing :P
52 `);
53});

zillowScrapermain.tsx3 matches

@rochambeau314Updated 8 months ago
1// This scraper provides a simple HTML form to input a Zillow URL.
2// It then uses the fetch API to get the HTML content of the Zillow listing page,
3// parses it using cheerio to extract the required information,
4// and displays the results in a table.
75 `;
76 } catch (error) {
77 console.error("Error scraping Zillow:", error);
78 resultHtml = '<p>Error scraping Zillow listing</p>';
79 }
80 }

craigslistScrapermain.tsx1 match

@rochambeau314Updated 8 months ago
1// This approach will use the fetch API to get the Craigslist page content,
2// parse it using cheerio, extract the required information,
3// and render it in a table format. We'll use React for the client-side rendering.

emailREADME.md1 match

@aroyanUpdated 8 months ago
54You can attach files to your emails by using the `attachments` field.
55Attachments need to be [Base64](https://en.wikipedia.org/wiki/Base64) encoded,
56which is that the [btoa](https://developer.mozilla.org/en-US/docs/Web/API/btoa)
57method is doing in this example:
58

emailmain.tsx2 matches

@aroyanUpdated 8 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { parseSendGridEmail } from "https://esm.town/v/stevekrouse/parseSendGridEmail?v=8";
3import { parseSendGridEmails } from "https://esm.town/v/stevekrouse/parseSendGridEmails?v=10";
69}) => {
70 let result = await fetch(
71 `${API_URL}/v1/email`,
72 {
73 method: "POST",

ruralCrimsonGuppymain.tsx2 matches

@jamisonlUpdated 8 months ago
2import { blob } from "https://esm.town/v/std/blob";
3// Bump version
4import { Routes } from "npm:@discord-api-types/v9";
5import { REST } from "npm:@discordjs/rest";
6import { createAudioPlayer, createAudioResource, joinVoiceChannel } from "npm:@discordjs/voice";
7import googleTTS from "npm:google-tts-api";
8let bank = await blob.getJSON("bank");
9let bets = await blob.getJSON("bets");

valTopicGenmain.tsx1 match

@roramigatorUpdated 8 months ago
17 "Collaborative Whiteboard",
18 "Cryptocurrency Price Tracker",
19 "Custom API Wrapper",
20 "Data Visualization Dashboard",
21 "Distributed Computing Project",

aloneBronzeCattlemain.tsx2 matches

@jamisonlUpdated 8 months ago
4import { REST } from "@discordjs/rest";
5import { createAudioPlayer, createAudioResource, joinVoiceChannel } from "@discordjs/voice";
6import { Routes } from "discord-api-types/v9";
7import googleTTS from "google-tts-api";
8let bank = await blob.getJSON("bank");
9let bets = await blob.getJSON("bets");

darkMagentaFlamingomain.tsx1 match

@jamisonlUpdated 8 months ago
6import { createAudioResource, createAudioPlayer, joinVoiceChannel, VoiceConnectionStatus } from '@discordjs/voice';
7import { Client, GatewayIntentBits } from 'discord.js';
8import googleTTS from 'google-tts-api';
9const starting_amount = 5;
10const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates] });

convenientAzureSparrowmain.tsx4 matches

@gioUpdated 8 months ago
1const axios = require("axios");
2
3// Your Telnyx API Key
4const apiKey = "your_api_key";
5
6// Function to send SMS
8 try {
9 const response = await axios.post(
10 "https://api.telnyx.com/v2/messages",
11 {
12 from: from, // Your Telnyx phone number
16 {
17 headers: {
18 "Authorization": `Bearer ${apiKey}`,
19 "Content-Type": "application/json",
20 },

new-val-api-21 file match

@shouserUpdated 14 hours ago
This is an example of using the API to create a val.

gptApiTemplate2 file matches

@charmaineUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration