Back to APIs list

Google Drive API examples & templates

Use these vals as a playground to view and fork Google Drive API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
triptych avatar
litExample
@triptych
Script
Forked from tmcw/litExample
rlesser avatar
getNextSSR
@rlesser
Script
getNextSSR - fetch data from Next.js SSR-based sites Many modern websites use Next.js and Server-side Rendering (SSR) to serve their website and the data to populate it. Instead of standard API calls, this manifests in the browser as calls routed through dynamic endpoints. This val handles the url construction and response parsing, giving you access to the endpoint and data. Input websiteUrl - The website's url, like google.com or val.town let getNextSSR: (websiteUrl: string) => Promise<(endpoint: string) => Promise<Record<string, any>>> Returns fetching function - A function that takes in an endpoint and returns the endpoint's response data: Input endpoint - The endpoint string, like results.json or trending.json?page=2 Returns data - The endpoint response data, without NextJS artifacts. Example const fetch = await @rlesser.getNextSSR("example.com"); const data = fetch("results.json"); return data;
andreterron avatar
server
@andreterron
HTTP (deprecated)
Forked from tfayyaz/react_tldraw
nbbaier avatar
extension_config
@nbbaier
Script
An interactive, runnable TypeScript val by nbbaier
robsimmons avatar
aoc_2023_9
@robsimmons
Script
An interactive, runnable TypeScript val by robsimmons
jacoblee93 avatar
runAgent
@jacoblee93
Script
An interactive, runnable TypeScript val by jacoblee93
iamseeley avatar
RootLayout
@iamseeley
Script
@jsxImportSource https://esm.sh/hono@latest/jsx
tmcw avatar
litExample
@tmcw
Script
lit Lit is kind of like Google's answer to React: it's a little more reliant on browser APIs like custom elements and the shadow DOM, a little less 'magic', like using JSX. This is an example of using Lit and rendering it straight to a string, which is something that's recently popular. It works pretty well, right off the bat: Lit provides nice ESM modules and a pretty smooth workflow!
jxnblk avatar
tuna_example
@jxnblk
HTTP (deprecated)
// Example of using tuna and caviar with React (resrv) on Val Town
dthyresson avatar
bedtimeStoryActivities
@dthyresson
Script
An interactive, runnable TypeScript val by dthyresson
arrudaricardo avatar
github_status_emoji_map
@arrudaricardo
Script
An interactive, runnable TypeScript val by arrudaricardo
tmcw avatar
recipes
@tmcw
Script
An interactive, runnable TypeScript val by tmcw
g avatar
dataUriGenApp
@g
HTTP
* This application creates a client-side data URI generator with the following features: * - File upload through input and drag-and-drop * - Automatic MIME type detection * - Preview of the uploaded file (image, video, audio, or text) * - Copy button to easily copy the generated data URI * * We'll use the FileReader API for file handling and data URI generation. * The application will be built using HTML, CSS, and JavaScript, served by a Hono app.
lolocoo avatar
untitled_sapphireSlug
@lolocoo
HTTP (deprecated)
An interactive, runnable TypeScript val by lolocoo
ingenieroariel avatar
untitled_limeHornet
@ingenieroariel
Script
// investigate how to load duckdb with spatial extensions in this context in order to load buildings from s3.
stevekrouse avatar
untitled_blackBoa
@stevekrouse
Script
An interactive, runnable TypeScript val by stevekrouse