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=1382&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 15454 results for "api"(3833ms)

friendIdsmain.tsx1 match

@charles2•Updated 1 year ago
3
4export let friendIds = twitterJSON({
5 url: `https://api.twitter.com/1.1/friends/ids.json?screen_name=stevekrouse`,
6 bearerToken: twitterCredentials.bearerToken
7}).then(x => x.ids)

satsNameApimain.tsx2 matches

@ryanwaits•Updated 1 year ago
1import { hexToUtf8 } from "https://esm.town/v/ryanwaits/hexToUtf8";
2
3export const satsNameApi = async (req: Request) => {
4 const { Hono } = await import("npm:hono");
5 const app = new Hono();
6 let events = [];
7 app.post("/api/events", async (c) => {
8 const body = await c.req.json();
9 const { apply } = body;

myApimain.tsx1 match

@willye•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

sha256main.tsx1 match

@vtdocs•Updated 1 year ago
1// Copied from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
2export const sha256 = async function digestMessage(message) {
3 const msgUint8 = new TextEncoder().encode(message); // encode as (utf-8) Uint8Array

myApimain.tsx1 match

@eufracio•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@sudocss•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

userValsmain.tsx1 match

@neverstew•Updated 1 year ago
37 : {};
38 return fetchJSON(
39 `https://api.val.town/v1/users/${id}/vals`,
40 { headers },
41 );

myApimain.tsx1 match

@turtlebits•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@csellis•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

myApimain.tsx1 match

@mmcc•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

HN-fetch-call2 file matches

@ImGqb•Updated 1 day ago
fetch HackerNews by API

token-server1 file match

@kwhinnery_openai•Updated 3 days ago
Mint tokens to use with the OpenAI Realtime API for WebRTC
Kapil01
apiv1