Back to APIs list

Air quality API examples & templates

Use these vals as a playground to view and fork Air quality API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
nbbaier avatar
URLSearchParamsPuzzle
@nbbaier
Script
// Create a test URLSearchParams object
pa avatar
gifStory
@pa
HTTP (deprecated)
Forked from substrate/gifStory
jxnblk avatar
useCodemirror
@jxnblk
Script
// codemirror esm react hook
substrate avatar
gifStory
@substrate
HTTP (deprecated)
Generates a story and then a storyboard with 5 animated frames. Note : You'll need to fork this example (and un-comment some code) to run it with new input. Currently it renders cached output, for demo purposes (running takes 30-60s). 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits
std avatar
turso
@std
Script
Deprecated in favor of std/sqlite (also powered by Turso) std/turso was the initial version of our integration with Turso. It was so popular, we rebuilt it to be faster and easier to use: std/sqlite . Turso is a serverless SQLite platform designed for the edge. It runs libSQL , their open contribution fork of SQLite. Every Val Town user automatically gets their own Turso SQLite database! It's great for >100kb data (ie bigger than a val) or when you need SQL: relations, ACID transactions, etc. Storage used in Turso will count against your Val Town total storage (10mb for free users; 1gb for Pro users). Contact us if you'd need more – it should be no problem! Getting started This val uses our public key auth scheme . Generate your keypair On your publicKey click the lock icon🔒 to change the permissions to Unlisted . Fork this helper function replacing stevekrouse with your own username Try out some queries! Usage This val returns a Turso SDK's Client , which supports execute , batch , and transaction . await @me.turso().execute(`create table blobs( key text unique, value text )`) More example usage Architecture This @std.turso function is the client or SDK to @std.tursoAPI, which acts as a "proxy" to Turso. It handles authentication, creates databases, and forwards on your SQL queries. You can get lower latency (~200ms vs ~800ms), more storage, databases, CLI & API access by having your own Turso account.
arrudaricardo avatar
github_status_emoji_map
@arrudaricardo
Script
An interactive, runnable TypeScript val by arrudaricardo
stevekrouse avatar
truncateVal
@stevekrouse
Script
// Utility for saving a reasonable truncated version of a val
chet avatar
ValTupleStorage
@chet
Script
An interactive, runnable TypeScript val by chet
maxm avatar
URLSearchParamsPuzzle
@maxm
Script
Forked from nbbaier/URLSearchParamsPuzzle
rayyan avatar
blob
@rayyan
Script
Forked from janpaul123/blob
yawnxyz avatar
blobWithSqlite
@yawnxyz
Script
Forked from janpaul123/blob
pomdtr avatar
blob
@pomdtr
Script
Forked from janpaul123/blob
nichoth avatar
blob
@nichoth
Script
Forked from janpaul123/blob
neoneffect avatar
untitled_pinkSkunk
@neoneffect
Script
An interactive, runnable TypeScript val by neoneffect
boucher avatar
untitled_blackBee
@boucher
Script
Forked from std/turso
16
Next