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%22Optional%20title%22?q=api&page=1076&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 11762 results for "api"(3562ms)

autoGPT_Test2main.tsx3 matches

@stevekrouseβ€’Updated 1 year ago
3
4export let autoGPT_Test2 = (async () => {
5 const { Configuration, OpenAIApi } = await import("npm:openai");
6 const configuration = new Configuration({
7 apiKey: process.env.openai,
8 });
9 const openai = new OpenAIApi(configuration);
10 const completion = await openai.createChatCompletion({
11 model: "gpt-3.5-turbo",
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const authenticatedCanMutateAnotherSetter = (api) =>
4 testMutateSemantics({
5 stateName: "@steveVT.myTestState",
6 api,
7 mutateExpected: true,
8 mutator: (now) => `@steveVT.mutateMyState(${now})`,

testAndroidBingAppsmain.tsx1 match

@xuangongβ€’Updated 1 year ago
5 const { default: axios } = await import("npm:axios");
6 const url =
7 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
8 try {
9 const response = await fetch(url, {

weddingAPImain.tsx1 match

@schwankstaβ€’Updated 1 year ago
5sending an email each time. I'm using this to send this information
6to an RSVP sheet. */
7export let weddingAPI = (guest, yesno, count, additional, email) => {
8 const gsheet_append_example = gsheet_call(
9 process.env.google_service_account, // This is the file you download from the service account in Google. Just paste it in.

myApimain.tsx3 matches

@parwebβ€’Updated 1 year ago
1import { myApi as myApi2 } from "https://esm.town/v/parweb/myApi";
2
3export function myApi(name) {
4 return myApi2("chris");
5}

pushovermain.tsx2 matches

@meatcarβ€’Updated 1 year ago
2
3// Send a pushover message.
4// token, user, and other opts are as specified at https://pushover.net/api
5export async function pushover({ token, user, message, title, url, ...opts }) {
6 return await fetch("https://api.pushover.net/1/messages.json", {
7 method: "POST",
8 body: JSON.stringify({

myApimain.tsx1 match

@onemanwenttomowβ€’Updated 1 year ago
1export function myApi(name) {
2 return "hello " + name + " πŸŽ‰";
3}

myApimain.tsx1 match

@ralphiteβ€’Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

githubReposmain.tsx1 match

@eburritoβ€’Updated 1 year ago
3// GitHub repos
4export let githubRepos = fetchJSON(
5 "https://api.github.com/users/stevekrouse/repos"
6);

getSeattleSubwayTweetsmain.tsx1 match

@stevenβ€’Updated 1 year ago
3export let getSeattleSubwayTweets = async (request: Request): Promise<Response> => {
4 let data = await fetch(
5 `https://api.apify.com/v2/acts/quacker~twitter-url-scraper/runs/last/dataset/items?token=apify_api_wi6mnWH8aJ5yiwv3ePmYV7BI31yTE13ameye`,
6 );
7 let jsonData = await data.json();

new-val-api-21 file match

@shouserβ€’Updated 3 hours ago
This is an example of using the API to create a val.

gpt-image-test

@CaptainJackβ€’Updated 19 hours ago
ζ΅‹θ―• gpt image ηš„δΈεŒ api θƒ½ε¦ζ»‘θΆ³ε›Ύη‰‡η”Ÿζˆθ¦ζ±‚
mux
Your friendly, neighborhood video API.
api