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=fetch&page=351&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 7501 results for "fetch"(1251ms)

twitterAlertmain.tsx1 match

@rbm•Updated 3 months ago
19 : Math.floor((Date.now() - 2 * 24 * 60 * 60 * 1000) / 1000);
20
21 // Fetch and log tweets
22 const response = await socialDataSearch(`${query} since_time:${timeFrame}`);
23 console.log("Response from socialDataSearch:", response);

cerebras_codermain.tsx1 match

@javigrop•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

cerebras_codermain.tsx1 match

@Sushant_99•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

suttyCheckinBotmain.tsx3 matches

@nulo•Updated 3 months ago
36// Zulip API helpers
37async function getStreamId(streamName) {
38 const response = await fetch(`${ZULIP_URL}/api/v1/get_stream_id?stream=${encodeURIComponent(streamName)}`, {
39 headers: {
40 "Authorization": `Basic ${btoa(`${ZULIP_BOT_EMAIL}:${ZULIP_BOT_KEY}`)}`,
46
47async function getStreamTopics(streamId) {
48 const response = await fetch(`${ZULIP_URL}/api/v1/users/me/${streamId}/topics`, {
49 headers: {
50 "Authorization": `Basic ${btoa(`${ZULIP_BOT_EMAIL}:${ZULIP_BOT_KEY}`)}`,
56
57async function sendMessage(stream, topic, content) {
58 const response = await fetch(`${ZULIP_URL}/api/v1/messages`, {
59 method: "POST",
60 headers: {

spotifyAPImain.tsx2 matches

@neverstew•Updated 3 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let spotifyAPI = ({ token, endpoint, ...params }) =>
4 fetchJSON(
5 `https://api.spotify.com/v1/${endpoint}${
6 "method" in params && ["POST", "PUT", "DELETE"].includes(params["method"])

valtowntownmain.tsx1 match

@charmaine•Updated 3 months ago
172});
173
174export default app.fetch.bind(app);
175
176const css = `

getSpotifyAccessTokenmain.tsx1 match

@neverstew•Updated 3 months ago
52 try {
53 // Get access token
54 const response = await fetch("https://accounts.spotify.com/api/token", {
55 method: "POST",
56 headers: {

OpenTownieindex.tsx1 match

@pomdtr•Updated 3 months ago
26
27 try {
28 const response = await fetch("/", {
29 method: "POST",
30 headers: { "authorization": "Bearer " + bearerToken },

mightyAmberTakinmain.tsx1 match

@aashish•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

moralCoffeeSkinkmain.tsx1 match

@aashish•Updated 3 months ago
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

FetchBasic1 file match

@fredmoon•Updated 1 week ago