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/$%7Bart_info.art.src%7D?q=fetch&page=10&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 15666 results for "fetch"(5286ms)

moduleFetch1 file match

@easrng•Updated 1 year ago

fetchReadable1 file match

@hvlck•Updated 1 year ago

testFetchCommentsVal2 file matches

@willthereader•Updated 1 year ago

fetchConfirmationHtml2 file matches

@petermillspaugh•Updated 1 year ago

fetchPinatsPosts1 file match

@stevedylandev•Updated 1 year ago

fetchVerificationEmailHtml2 file matches

@petermillspaugh•Updated 1 year ago

fetchText2 file matches

@stevekrouse•Updated 1 year ago

fetchTextWithCaching2 file matches

@iakovos•Updated 1 year ago

fetchAndParseFeeds2 file matches

@iakovos•Updated 1 year ago

fetchWeatherPrediction1 file match

@jamiedubs•Updated 1 year ago

aimixmain.tsx2 matches

@wizos•Updated 2 hours ago
100 }
101
102 return fetch(requestParams.url, preload).catch((err) => new Response(err.stack, { status: 500 }));
103});
104
112// app.post("/v1/chat/completions", handleChatCompletionWrap);
113
114export default app.fetch;

Sonarneynar.ts21 matches

@moe•Updated 4 hours ago
2// const baseUrl = "https://api.neynar.com/v2/farcaster/";
3
4export async function fetchNeynarGet(path: string) {
5 const res = await fetch(baseUrl + encodeURIComponent(path), {
6 method: 'GET',
7 headers: {
15}
16
17export async function fetchNeynarGetPages(path: string, pages: number, dataKey: string) {
18 let data: any = []
19 let cursor = ''
20 let pagesLeft = pages
21 while (true) {
22 const res = await fetchNeynarGet(`${path}&cursor=${cursor}`)
23 data = [...data, ...res[dataKey]]
24 cursor = res?.next?.cursor
35//////////
36
37export function fetchUser(username: string) {
38 if (username.startsWith('fid:')) {
39 return fetchUsersById(username.replace('fid:', '')).then((users) => users[0])
40 }
41 return fetchNeynarGet(`user/by_username?username=${username}`).then((r) => r.user)
42}
43export function fetchUsersById(fids: string) {
44 return fetchNeynarGet(`user/bulk?fids=${fids}`).then((r) => r.users)
45}
46
47export function fetchUserFeed(fid: string) {
48 return fetchNeynarGet(
49 `feed?feed_type=filter&filter_type=fids&fids=${fid}&with_recasts=false&with_replies=false&limit=100&cursor=`
50 ).then((r) => r.casts)
51}
52
53export function fetchChannel(channelId: string) {
54 return fetchNeynarGet(`channel?id=${channelId}`).then((r) => r.channel)
55}
56
57export function fetchChannelFeed(channelId: string) {
58 return fetchNeynarGet(`feed/channels?channel_ids=${channelId}&with_recasts=false&limit=100`).then((r) => r.casts)
59}
60
61export function fetchChannelsFeed(channelIds: string[]) {
62 return fetchNeynarGet(`feed/channels?channel_ids=${channelIds.join(',')}&with_recasts=false&limit=100`).then(
63 (r) => r.casts
64 )
65}
66
67export function fetchCast(hash: string) {
68 return fetchNeynarGet(`cast?type=hash&identifier=${hash}`).then((r) => r.cast)
69}
70
71export function fetchCastReplies(hash: string) {
72 return fetchNeynarGet(
73 `cast/conversation?identifier=${hash}&type=hash&reply_depth=2&include_chronological_parent_casts=false&sort_type=algorithmic&fold=above&limit=20`
74 ).then((r) => r?.conversation?.cast?.direct_replies)