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=859&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 11029 results for "api"(1738ms)

fetchTweetmain.tsx1 match

@vladimyrUpdated 1 year ago
15}
16
17// @see: https://github.com/vercel/react-tweet/blob/a292ca7/packages/react-tweet/src/api/fetch-tweet.ts#L27-L31
18function getToken(id: string) {
19 return ((Number(id) / 1e15) * Math.PI)

youTubeCommentWatcherREADME.md1 match

@muxUpdated 1 year ago
5## Usage
6
71. Set the environment variables for `YOUTUBE_API_KEY` and `YOUTUBE_CHANNEL_ID`
81. Fork this
91. Go
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3await fetchJSON("https://api.val.town/v1/vals", {
4 headers: {
5 Authorization: `Bearer ${Deno.env.get("valtown")}`,

sqliteStylemain.tsx1 match

@stevekrouseUpdated 1 year ago
148 font-size: 1rem;
149 font-family: var(--main-font);
150 text-transform: capitalize;
151 display: flex;
152 align-items: center;
1// https://api.val.town/v1/express/liamdanielduffy.reactTodoListWebsite
2export const REACT_TODO_LIST_CONTENTS = {
3 body: `<div id="root"></div>

submitPRREADME.md2 matches

@nbbaierUpdated 1 year ago
1# Submit a PR from Val Town
2
3This val provides a (very) thin wrapper around the GH rest API methods for creating a pull request. It handles the creation of a Octokit client for you.
4
5## Usage
20## Parameters
21
22The function takes two parameters: your gh access token and an object that's identical to the object submitted to the gh API. See [GH's documentation](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request) for more info!
23
24

aliasmain.tsx1 match

@stevekrouseUpdated 1 year ago
3export function alias<P extends Params>(params: P): Promise<Result<P>> {
4 const username = params.username;
5 let url = `https://api.val.town/v1/alias/${username}`;
6 if ("valName" in params)
7 url = url + `/${params.valName}`;

telegramWebhookEchoMessagemain.tsx1 match

@enyoUpdated 1 year ago
4 // Verify this webhook came from our bot
5 if (
6 req.headers.get("x-telegram-bot-api-secret-token")
7 !== Deno.env.get("telegramWebhookSecret")
8 ) {

muxWebhookHandlermain.tsx1 match

@mmccUpdated 1 year ago
5
6const replicate = new Replicate({
7 auth: process.env.REPLICATE_API_TOKEN,
8});
9

scrape2mdREADME.md1 match

@tarasUpdated 1 year ago
11
12### TODO
13https://chatcraft.org/api/share/tarasglek/IDYChVAilfePgVZb_T5pH POST from browser
14https://www.val.town/v/nbbaier/valToGH sync to github
15

daily-advice-app1 file match

@dcm31Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaineUpdated 3 days ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration