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=1587&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 18287 results for "api"(4893ms)

readmeGPTmain.tsx3 matches

@nbbaier•Updated 1 year ago
6 model: string;
7 openai: OpenAI;
8 apiKey: string;
9 valtownKey: string;
10
32 private async getVal(username: string, valName: string) {
33 try {
34 const res = await fetch(`https://api.val.town/v1/alias/${username}/${valName}`, {
35 method: "GET",
36 headers: {
72 private async updateReadme(id: string, readme: string) {
73 try {
74 const res = await fetch(`https://api.val.town/v1/vals/${id}`, {
75 method: "PUT",
76 headers: {

sqliteWritermain.tsx2 matches

@nbbaier•Updated 1 year ago
10 table: string;
11 model: string;
12 apiKey: string;
13 openai: OpenAI;
14
17 this.table = table;
18 this.model = model;
19 // this.apiKey = openaiOptions.apiKey ? openaiOptions.apiKey : Deno.env.get("OPENAI_API_KEY");
20 this.openai = new OpenAI(openaiOptions);
21 }

readmeGPTREADME.md2 matches

@nbbaier•Updated 1 year ago
30```
31
32## API Reference
33
34### Class: ReadmeWriter
43
44- `model` (optional): The model to be used for generating the readme. Defaults to "gpt-3.5-turbo".
45- `apiKey` (optional): An OpenAI API key. Defaults to `Deno.env.get("OPENAI_API_KEY")`.
46
47#### Methods

sqliteWriterREADME.md2 matches

@nbbaier•Updated 1 year ago
365. Handle the generated query or query result according to your application's needs.
37
38## API
39
40### `new QueryWriter(args: { table: string; model?: string }): QueryWriter`
44- `table`: The name of the database table to operate on.
45- `model` (optional): The model to use for generating SQL queries. Defaults to "gpt-3.5-turbo".
46- `apiKey` (optional): An OpenAI API key. Defaults to `Deno.env.get("OPENAI_API_KEY")`.
47
48

valTownQuotaUseagemain.tsx2 matches

@zarutian•Updated 1 year ago
1// @ts-check js
2import { API_URL } from "https://esm.town/v/std/API_URL";
3const VALTOWN_API_URL = API_URL.concat("/v1");
4import { getMyValTownUserUUID } from "https://esm.town/v/zarutian/getMyValTownUserUUID";
5import { getAllValsOfUser } from "https://esm.town/v/zarutian/getAllValsOfUser";

getMyValTownUserUUIDmain.tsx4 matches

@zarutian•Updated 1 year ago
1// @ts-check
2import { API_URL } from "https://esm.town/v/std/API_URL";
3const VALTOWN_API_URL = API_URL.concat("/v1");
4
5// const VALTOWN_API_URL = "https://api.val.town/v1";
6/**
7 * @returns {Promise<string>} the uuid of the user as an string
8 **/
9export const getMyValTownUserUUID = async () => {
10 return (await (await fetch(`${VALTOWN_API_URL}/me`, {
11 headers: {
12 Authorization: `Bearer ${Deno.env.get("valtown")}`,

llava_recipe_helpermain.tsx1 match

@zeke•Updated 1 year ago
1import process from "node:process";
2import Replicate from "npm:replicate";
3const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN });
4
5const output = await replicate.run(

add_to_notion_w_ai_webpagemain.tsx3 matches

@nerdymomocat•Updated 1 year ago
10const dbid = "DB_ID_GOES_HERE";
11
12const NOTION_API_KEY = process.env.NOTION_API_KEY;
13const notion = new Client({
14 auth: NOTION_API_KEY,
15});
16
31
32const oai = new OpenAI({
33 apiKey: process.env.OPENAI_API_KEY ?? undefined,
34});
35

add_to_notion_w_aimain.tsx3 matches

@nerdymomocat•Updated 1 year ago
6import { z } from "npm:zod";
7
8const NOTION_API_KEY = process.env.NOTION_API_KEY;
9const notion = new Client({
10 auth: NOTION_API_KEY,
11});
12
27
28const oai = new OpenAI({
29 apiKey: process.env.OPENAI_API_KEY ?? undefined,
30});
31

add_to_notion_w_aiREADME.md1 match

@nerdymomocat•Updated 1 year ago
14Supports: checkbox, date, multi_select, number, rich_text, select, status, title, url, email
15
16- Uses `NOTION_API_KEY`, `OPENAI_API_KEY` stored in env variables and uses [Valtown blob storage](https://esm.town/v/std/blob) to store information about the database.
17- Use `get_notion_db_info` to use the stored blob if exists or create one, use `get_and_save_notion_db_info` to create a new blob (and replace an existing one if exists).
18

github-api1 file match

@cricks_unmixed4u•Updated 17 hours ago

beeminder-api4 file matches

@cricks_unmixed4u•Updated 18 hours ago
Kapil01
apiv1