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/$%7Burl%7D?q=api&page=1049&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 11759 results for "api"(3280ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

ipmain.tsx1 match

@ianUpdated 1 year ago
1import { fetchJSON } from "https://esm.town/v/ian/fetchJSON";
2
3export let ip = await fetchJSON("https://api.ipify.org?format=json ");

myApimain.tsx1 match

@vandyandUpdated 1 year ago
1export function myApi(name) {
2 if (!name) {
3 return "hi you!";

myApimain.tsx1 match

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

gitlabUserContributionEventsmain.tsx3 matches

@rwevUpdated 1 year ago
5 const after = new Date(afterDateMs).toISOString().split("T")[0];
6 console.log(after);
7 // https://docs.gitlab.com/ee/api/events.html#get-user-contribution-events
8 let userEvents = await fetchJSON(
9 `gitlab.com/api/v4/users/rwev/events?after=${after}`,
10 {
11 headers: {
12 Authorization: `Bearer ${process.env.GITLAB_API_READ_USER}`,
13 },
14 }

myApimain.tsx1 match

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

duckAndWafflemain.tsx1 match

@dotUpdated 1 year ago
9
10 let response = await fetch(
11 `https://www.sevenrooms.com/api-yoa/availability/widget/range?venue=${venue}&time_slot=${time_slot}&party_size=${party_size}&halo_size_interval=5&start_date=${start_date}&num_days=1&channel=SEVENROOMS_WIDGET`
12 );
13 let body = await response.json();

myApimain.tsx1 match

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

githubEventsmain.tsx1 match

@bramUpdated 1 year ago
3// GitHub events
4export let githubEvents = fetchJSON(
5 "https://api.github.com/users/bramses/events"
6);

new-val-api-21 file match

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

gpt-image-test

@CaptainJackUpdated 18 hours ago
测试 gpt image 的不同 api 能否满足图片生成要求
apiv1
papimark21