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/image-url.jpg%20%22Image%20title%22?q=api&page=1640&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 17972 results for "api"(3095ms)

myApimain.tsx1 match

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

myApimain.tsx1 match

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

myApimain.tsx1 match

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

GetPelotonWorkoutsmain.tsx2 matches

@steveb1313•Updated 1 year ago
6 res: express.Response,
7) {
8 let response = await fetch("https://api.onepeloton.com/auth/login", {
9 method: "POST",
10 mode: "no-cors",
21 const session = await response.json();
22 let workoutResponse = await fetch(
23 `https://api.onepeloton.com/api/user/${session["user_id"]}/workouts`,
24 {
25 method: "GET",

myApimain.tsx1 match

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

boredActivitiesmain.tsx1 match

@roniemeque•Updated 1 year ago
3// Activity suggestions for when you're bored
4export let boredActivities = fetchJSON(
5 "https://www.boredapi.com/api/activity",
6);

getWeatherGovDatamain.tsx2 matches

@wilt•Updated 1 year ago
2
3// Currently broken! Val.Town cannot fetch from .gov sites
4// You can get these input values by calling https://api.weather.gov/points/{latitude},{longitude}
5export async function getWeatherGovData({ office, gridX, gridY }) {
6 const data = await fetchJSON(
7 `https://api.weather.gov/gridpoints/${office}/${gridX},${gridY}/forecast`
8 );
9 return data.properties;

untitled_y63gGz3Gmain.tsx1 match

@xrayboastful•Updated 1 year ago
1export const untitled_y63gGz3G = (async () => {
2 function myApi(name: Interval) {
3 return "hi " + name;
4 }

githubWebhookApproveDependencyPRsmain.tsx6 matches

@karfau•Updated 1 year ago
13 const webhookSecret = process.env.githubWebhookApproveDependencyPRs;
14 // the token to make github requests (needs `repo` permissions)
15 const githubApiToken = process.env.githubApproveDependencyPRsToken;
16 const valHttpUrl = thisValUrl();
17 const approvalMessage = `Automatically approved by ${valHttpUrl}`;
48 const { Octokit } = await import("npm:@octokit/core");
49 const octokit = new Octokit({
50 auth: githubApiToken,
51 });
52 const { repository, organization } = payload;
66 const checks = (await octokit.request(pr.statuses_url, {
67 headers: {
68 "X-GitHub-Api-Version": "2022-11-28",
69 },
70 })).data;
80 branch: pull_request.base.ref,
81 headers: {
82 "X-GitHub-Api-Version": "2022-11-28",
83 },
84 },
102 event: "APPROVE",
103 headers: {
104 "X-GitHub-Api-Version": "2022-11-28",
105 },
106 },
131};
132// Forked from @vtdocs.githubWebhookWithVerify
133// switched from express to WebApi using https://www.val.town/v/neverstew.githubWebhookApproveDependencyPRs

myApimain.tsx1 match

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

dailyQuoteAPI

@Souky•Updated 1 day ago

HTTP

@Ncharity•Updated 1 day ago
Daily Quote API
Kapil01
apiv1