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.
seep
subaru
Script
An API for mysubaru.com to enable remote start and stop. Requires env vars (val.town secrets) named: SUBARU_USERNAME, SUBARU_PASSWORD, SUBARU_DEVICEID, SUBARU_VEHICLEKEY, SUBARU_PIN . The username, password, and PIN should match your mysubaru.com credentials. The device ID and vehicle key can be found by inspecting the request body of a login network request at mysubaru.com.
0
stevekrouse
processBufferDeno2Example
Script
Deno 2 Globals Now that Val Town is on Deno 2, you can access process and Buffer without needing to import them.
This means you'll be able to copy and paste more NodeJS code into Val Town,
and it'll 'just work' more of the time. If you want proper type support for them, you will still need to import them explicitly.
Our editor should walk you through this. The NodeJS types are fairly extensive, so we
think it's better for now to let you import them piecemeal, as you need them.
0
dglazkov
qdrant
HTTP
Since Qdrant Cloud has a fairly strict CORS policy, here's a simple val that proxies calls to Qdrant Cloud API and makes them accessible from Web apps. To set up: fork this val add your QDRANT_API_KEY to your environment variables. This would limit usage of your proxy to your API key only. start using val as a proxy Use it as a 1:1 replacement for Qdrant API, except for one additional query string parameter: cluster_id -- the part of the Qdrant API endpoint before cloud.qdrant.io .
1
g
ThumbMaker
HTTP
* This application creates a thumbnail maker using Hono for server-side routing and client-side JavaScript for image processing.
* It allows users to upload images, specify output options, and generate a composite thumbnail image.
* The app uses the HTML5 Canvas API for image manipulation and supports drag-and-drop functionality.
*
* The process is divided into two steps:
* 1. Generating thumbnails: Users choose thumbnail size options and create individual thumbnails.
* 2. Rendering: Users can create and export the final composite image with options for format and quality.
* This two-step process allows changing format or quality without re-rendering the entire canvas.
*
* Additional features:
* - Users can go back from the second step to the first one to regenerate thumbnails.
* - Dropping new files takes the user back to the first step.
* - A "Download Metadata" button is added to download a JSON file with thumbnail information.
0