Public
Script
  • stevekrouse avatar
    resyAuth
    @stevekrouse
    Forked from vtdocs/resyAuth
    Script
  • kora avatar
    redAnglerfish
    @kora
    Fetch Learn how to use proxied fetch
    Script
  • johndturn avatar
    quotableApiProxy
    @johndturn
    Quotable API Proxy Small HTTP proxy to the Quotable API ( https://api.quotable.io ). I built this due to some DNSSEC issues that the Quotable API is currently experiencing. See this Github issue here for more information.
    HTTP
  • weaverwhale avatar
    GistGPT
    @weaverwhale
    GistGPT A helpful assistant who provides the gist of a gist How to use / and /gist - Default response is to explain this file. I believe this is effectively real-time recursion ? /gist?url={URL} - Provide a RAW file URL from Github, BitBucket, GitLab, Val Town, etc. and GistGPT will provide you the gist of the code. /about - "Tell me a little bit about yourself"
    HTTP (deprecated)
  • vtdocs avatar
    resyBookSlot
    @vtdocs
    (Part of: https://www.val.town/v/vtdocs.resyBot) Given a valid booking token, this val attempts to make a reservation for the booking token's slot. There is some retry logic as the API route (rarely) returns an internal server error.
    Script
  • pranjaldotdev avatar
    pushover
    @pranjaldotdev
    // Send a pushover message.
    Script
  • pomdtr avatar
    raw
    @pomdtr
    Fetch the source of a val This val was created before the introduction of https://esm.town Usage curl https://pomdtr-raw.web.val.run/v/<author>/<name>.<extension>[?v=<version>] To see the code of this val, use https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts Examples Fetching the val code $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.tsx You can also use js , jsx and ts extension (only the content-type change, there is no transpilation). Fetching private val Pass an api token as an username $ curl "https://<token>@pomdtr-raw.web.val.run/v/pomdtr/privateVal.ts" Fetching the val README $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.md Getting an image $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.png Fetching a specific version of a val $ curl https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts?v=66 You need to be authenticated to use this method. Fetching the val metadata $ curl https://pomdtr-raw.web.val.run/v/pomdtr/add.json Running vals locally using Deno Create a new val.ts file referencing the @pomdtr.add import { add } from "https://pomdtr-raw.web.val.run/v/pomdtr/add.ts"; console.log(add(1, 2)); then use deno run $ deno run ./val.ts 3 If you val accept a request and return a response, you can pass it to Deno.Serve to run it locally! import {raw} from "https://pomdtr-raw.web.val.run/v/pomdtr/raw.ts"; Deno.serve(raw); If your val is private, you can set the DENO_AUTH_TOKENS env. DENO_AUTH_TOKENS=<val-town-token>@pomdtr-raw.web.val.run deno run val.ts
    HTTP (deprecated)
  • karfau avatar
    githubEmoji
    @karfau
    Usage import {githubEmojiUrl} from "https://esm.town/v/karfau/githubEmoji"; console.log(githubEmojiUrl('+1')) //"https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8" or in a browser <img src="https://karfau-githubEmoji.web.val.run/+1"></img> Looks like in the preview. curl https://karfau-githubEmoji.web.val.run/+1 (prints "https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8" ) If the name you pass (as argument or in the request path) is not in the list, it returns The list of names can be accessed using githubEmojiNames or by calling https://karfau-githubemoji.web.val.run/names
    HTTP (deprecated)
  • tempguy avatar
    copperScorpion
    @tempguy
    An interactive, runnable TypeScript val by tempguy
    HTTP (deprecated)
  • abhudson3 avatar
    tanCrane
    @abhudson3
    Forked from abhudson3/webscrapeMinhaBibliotecaCatolicaBoxList
    HTTP (deprecated)
  • byjp avatar
    addShortlink
    @byjp
    Shortlinks for the decentralised web This is a script to allow API-based updating of the shortlinks/redirects in an IPFS-based shortlink repo (using val.town). I've written up how all this works on my blog at https://byjp.me/posts/link-shortener
    Express
  • janpaul123 avatar
    valwriter_output
    @janpaul123
    // This approach fetches weather data for Brooklyn, NY from the Open Meteo API
    Script
  • tempguy avatar
    amberPig
    @tempguy
    An interactive, runnable TypeScript val by tempguy
    Script
  • yawnxyz avatar
    unpaywall
    @yawnxyz
    // Unpaywall DOI access function
    HTTP (deprecated)
  • vladimyr avatar
    fetch_impl_examples
    @vladimyr
    An interactive, runnable TypeScript val by vladimyr
    Script
  • stevekrouse avatar
    discordWebhook
    @stevekrouse
    Send a Discord message Send a message to a Discord channel from Val Town. It's useful for notifying your team or community when someone interesting happens, like a user signup, Stripe payment, mention on social media, etc. import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook"; await discordWebhook({ url: Deno.env.get("engDiscord"), content: "Hi from val town!", }); Example val: https://www.val.town/v/stevekrouse.discordWebhookEx Setup 1. Create a Discord Webhook Follow the instructions here: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks It really only takes 2 minutes. 2. Copy webhook URL Paste it into your secrets as discordWebhook . 3. Send a message! import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook"; await discordWebhook({ url: Deno.env.get("engDiscord"), content: "Hi from val town!", }); Example val: https://www.val.town/v/stevekrouse.discordWebhookEx
    Script
April 3, 2024