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=953&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 11919 results for "api"(2523ms)

sqliteWriterREADME.md2 matches

@nbbaierUpdated 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

@zarutianUpdated 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

@zarutianUpdated 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

@zekeUpdated 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(
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

@nerdymomocatUpdated 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

@nerdymomocatUpdated 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

masto_timeout_prmain.tsx2 matches

@andreterronUpdated 1 year ago
1import { createRestAPIClient } from "npm:masto";
2
3const masto = createRestAPIClient({
4 url: Deno.env.get("MASTO_INSTANCE_URL"),
5 accessToken: Deno.env.get("MASTO_ACCESS_TOKEN"),

trendingreposmain.tsx2 matches

@jameswUpdated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3// Helper function to format the date for GitHub API query
4function formatDate(daysAgo: number): string {
5 const date = new Date();
13 const query = `stars:>${stars} created:>${date}`;
14 const response = await fetch(
15 `https://api.github.com/search/repositories?q=${query}&sort=stars&order=desc&per_page=10`,
16 )
17 .then((res) => res.json());

prune_valmain.tsx3 matches

@saolsenUpdated 1 year ago
5 commit = false,
6): Promise<void> {
7 const resp = await fetch(`https://api.val.town/v1/vals/${val_id}`, {
8 headers: {
9 Authorization: "Bearer " + Deno.env.get("valtown"),
31 console.log(`Deleting Version ${v}`);
32 const resp = await fetch(
33 `https://api.val.town/v1/vals/${val_id}/versions/${v}`,
34 {
35 headers: {
42 if (commit) {
43 const resp = await fetch(
44 `https://api.val.town/v1/vals/${val_id}/versions/${v}`,
45 {
46 method: "DELETE",

social_data_api_project3 file matches

@tsuchi_yaUpdated 1 hour ago

simple-scrabble-api1 file match

@bryUpdated 2 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