Public
HTTP (deprecated)
  • std avatar
    sqlite
    @std
    SQLite - Docs ↗ SQLite is a lightweight, standard database. Every Val Town account comes with its own private SQLite database that is accessible from any of your vals via std/sqlite . Val Town SQLite is powered by Turso . Usage Migrations ORMs You may find these admin viewers helpful managing your database: SQLite Explorer (built in Val Town) LibSQL Studio Limits You can store 10mb on the free plan and up to 1gb on the paid plan. Contact us if you need more space. 📝 Edit docs
    Script
  • stevekrouse avatar
    tailwindURL
    @stevekrouse
    An interactive, runnable TypeScript val by stevekrouse
    Script
  • dthyresson avatar
    processTrackBlobsJob
    @dthyresson
    processTracksBlobsJob Periodically fetch all Spotify tracks from Blob storage and update the tracks database with a subset of display information. Keys take the format: spotify_track_id:4tVhBXOhSlqYCL2IjyoUNu .
    Cron
  • dthyresson avatar
    getSpotifyTrackUrl
    @dthyresson
    getSpotifyTrackUrl Get a Spotify Track Url using the Spotify Web API given an artist and a song title. Track info is cached by the query and also the spotify track id, so your popular queries won't have to fetch from Spotify over and over. Examples import { getSpotifyTrackUrl } from "https://esm.town/v/dthyresson/getSpotifyTrackUrl"; const reni = await getSpotifyTrackUrl("Stone Roses", "Fools Gold"); const ian = await getSpotifyTrackUrl("Joy Division", "Love Will Tear Us Apart"); const kim = await getSpotifyTrackUrl("Pixies", "Velouria"); console.log(reni) console.log(ian) console.log(kim) Info Uses getSpotifyAccessToken which requires you to set environment variables from your Spotify Developers account. SPOTIFY_CLIENT_ID SPOTIFY_CLIENT_SECRET Your access token is cached by getSpotifyAccessToken to avoid fetching over and over.
    Script
1
Next
dthyresson-playmeasong.web.val.run
July 29, 2024