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=818&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 10642 results for "api"(1043ms)

gsheet_callREADME.md3 matches

@apois•Updated 1 year ago
1# gsheet_call
2Wrapper around Google Sheets API v4.
3
4## Parameters
6- sheet_id: Google Sheet ID
7- method: HTTP method to use
8- action: Full URL with `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/` removed
9- data: HTTP request body
10
11## Requirements
12- a Google Cloud service account
13- the Google Sheets API v4 enabled in your Google Cloud project
14- the spreadsheet ID (provide it in the sheet_id parameter)
15

gsheet_callmain.tsx2 matches

@apois•Updated 1 year ago
6 );
7 const googleAuthOptions = {
8 scope: ["https://www.googleapis.com/auth/spreadsheets"],
9 };
10 const token = await getToken(service_account, googleAuthOptions);
11 const result = fetchJSON(
12 `https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`,
13 {
14 method,

amaranthYakmain.tsx2 matches

@stevekrouse•Updated 1 year ago
23 <head>
24 <title>SQLite Explorer</title>
25 <link rel="preconnect" href="https://fonts.googleapis.com" />
26 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
27 <link
28 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
29 rel="stylesheet"
30 />

amaranthYakREADME.md1 match

@stevekrouse•Updated 1 year ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

OpenAImain.tsx7 matches

@pomdtr•Updated 1 year ago
2
3/**
4 * API Client for interfacing with the OpenAI API. Uses Val Town credentials.
5 */
6export class OpenAI {
8
9 /**
10 * API Client for interfacing with the OpenAI API. Uses Val Town credentials.
11 *
12 * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
14 * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation.
15 * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request.
16 * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API.
17 * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API.
18 * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers.
19 */
20 constructor(options: Omit<ClientOptions, "baseURL" | "apiKey" | "organization"> = {}) {
21 this.rawOpenAIClient = new RawOpenAI({
22 ...options,
23 baseURL: "https://std-openaiproxy.web.val.run/v1",
24 apiKey: Deno.env.get("valtown"),
25 organization: null,
26 });

OpenAIREADME.md1 match

@pomdtr•Updated 1 year ago
1# OpenAI
2
3Get started using OpenAI's chat completion without the need to set your own API keys.
4
5## Usage

email_docsmain.tsx2 matches

@appan•Updated 1 year ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { parseSendGridEmail } from "https://esm.town/v/stevekrouse/parseSendGridEmail?v=8";
3import { parseSendGridEmails } from "https://esm.town/v/stevekrouse/parseSendGridEmails?v=10";
62}) => {
63 let result = await fetch(
64 `${API_URL}/v1/email`,
65 {
66 method: "POST",

readabilityHTTPProxymain.tsx2 matches

@nbbaier•Updated 1 year ago
25 <meta charset="UTF-8" />
26 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
27 <link rel="preconnect" href="https://fonts.googleapis.com">
28<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
29<link href="https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap" rel="stylesheet">
30 <title>${title}</title>
31 <style>

example_articleREADME.md1 match

@pomdtr•Updated 1 year ago
49## References
50https://discord.com/channels/1020432421243592714/1221021689627017236
51https://chatcraft.org/api/share/tarasglek/7B_nXLYazAyEryn4Z9Yz0
52https://github.com/neverstew/valtown-search/

insecureSSLCertExamplemain.tsx2 matches

@vladimyr•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
4const proxyURL = new URL("https://unsecure-fetch.val-town.workers.dev");
5proxyURL.searchParams.set("url", url);
6
7// console.debug("proxyUrl: %s", proxyURL);
8// ==> proxyUrl: https://unsecure-fetch.val-town.workers.dev/?url=https%3A%2F%2Fassignment-api.uspto.gov%2Fpatent%2FbasicSearch%3Fquery%3D1234567%26fields%3Dmain%26rows%3D20
9console.log(await fetchText(proxyURL.href));

daily-advice-app1 file match

@dcm31•Updated 1 day ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 2 days ago
apiv1
papimark21