Back to APIs list

Github API examples & templates

Use these vals as a playground to view and fork Github API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
willthereader avatar
ReadmeWriter
@willthereader
Script
Forked from nbbaier/readmeGPT
dazzag24 avatar
dailyDadJoke
@dazzag24
Cron
Forked from stevekrouse/dailyDadJoke
kamalnrf avatar
sqliteAdmin
@kamalnrf
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp
stevekrouse avatar
Time_Blindness_Loud_Calendar_via_iOS_shortcuts
@stevekrouse
HTTP (deprecated)
Forked from willthereader/Time_Blindness_Loud_Calendar_via_iOS_shortcuts
ni554n avatar
pollRSSFeeds
@ni554n
Cron
Forked from stevekrouse/pollRSSFeeds
tmcw avatar
jsYAMLExample
@tmcw
Script
js-yaml YAML is a popular format for data which is an alternative to JSON . In contrast to JSON, YAML can look more user-friendly: you can write text without worrying about quoting strings You can write comments in YAML But, on the other side, it's more possible to write YAML that is parsed in an unexpected way. JSON is more explicit and predictable. js-yaml is the most popular YAML parser for JavaScript.
tmcw avatar
poll
@tmcw
Express
Quick poll https://tmcw-poll.express.val.run This val, along with a val called poll_results and a val called poll_options , lets you conduct a little poll using just Val Town! With the express API , this exposes a web interface in which people can click an option and vote. We make sure everyone only votes once by setting a cookie in their browser. This uses htmx to make the voting experience slick, Tailwind to style the UI, and htm to generate HTML for the pages. If you want to use this yourself, fork this val, the poll_results val, and the poll_options val, and customize the options list. You can delete the existing results as well to clear the data.
megafredrik avatar
dailyDadJoke
@megafredrik
Cron
Forked from stevekrouse/dailyDadJoke
augustohp avatar
ghProjectFieldsFromIssue
@augustohp
Script
* Given an issue (GraphQL's Node ID), lists all available * "fields" (from Projects V2) attached to it - without their * values. * * @example ghProjectFieldsFromIssue("I_kwDOJYe5Es5qSNa2", 2, "github_pat_yadayada")
yawnxyz avatar
diesel
@yawnxyz
Script
Diesel Diesel is a lightweight data manipulation library inspired by Tom Wright's Dasel, designed for easy querying and transformation of various data formats such as JSON, YAML, CSV, and TOML. It allows users to select, update, and delete data using a simple selector syntax. Heavily adapted from https://github.com/TomWright/dasel Features Multi-format Support : Works with JSON, YAML, CSV, and TOML. Dynamic Selectors : Use conditions to filter data dynamically. Function Support : Built-in functions for data manipulation (e.g., length, sum, avg). Easy Integration : Can be used in both Deno and Val Town environments. Usage import Diesel from "https://esm.town/v/yawnxyz/diesel"; async function main() { const jsonData = ` { "users": [ {"id": 1, "name": "Alice", "age": 30}, {"id": 2, "name": "Bob", "age": 25}, {"id": 3, "name": "Charlie", "age": 35} ], "settings": { "theme": "dark", "notifications": true } } `;**** const diesel = new Diesel(jsonData, 'json'); try { console.log("All data:", await diesel.select('')); console.log("All users:", await diesel.select('users')); console.log("First user's name:", await diesel.select('users.[0].name')); console.log("Users over 30:", await diesel.select('users.(age>30)')); await diesel.put('settings.theme', 'light'); console.log("Updated settings:", await diesel.select('settings')); // await diesel.delete('users.[1]'); // console.log("Users after deletion:", await diesel.select('users')); console.log("Data in YAML format:"); console.log(await diesel.convert('yaml')); console.log("Data in TOML format:"); console.log(await diesel.convert('toml')); console.log("Number of users:", await diesel.select('users.length()')); console.log("User names in uppercase:", await diesel.select('users.[*].name.toUpper()')); } catch (error) { console.error("An error occurred:", error); } } main(); Installation To use Diesel, simply import it in your Deno project as shown in the usage example. License This project is licensed under the MIT License.
hobbs avatar
dailyDadJoke
@hobbs
Cron
Forked from stevekrouse/dailyDadJoke
benvinegar avatar
counterscaleWeeklyReport
@benvinegar
Cron
// borrowed from: https://github.com/benvinegar/counterscale/blob/main/app/analytics/query.ts#L24
tmcw avatar
acornExample
@tmcw
Script
acorn Acorn is a JavaScript parser written in JavaScript! It's one of the most established, and best, options - written by the same main contributor as CodeMirror and ProseMirror. At Val Town, we use Acorn internally, as well as CodeMirror for the code editor. With Acorn, you can parse JavaScript, modify it, and generate strings from that parsed JavaScript. It's a lot more robust and productive than processing source code as strings.
std avatar
oss_pledge
@std
HTTP (deprecated)
An interactive, runnable TypeScript val by std
dthyresson avatar
tracksAPI
@dthyresson
HTTP
Forked from dthyresson/graphQLYoga
jeffreyyoung avatar
poe_bot
@jeffreyyoung
Script
// copied from https://github.com/poe-platform/fastapi_poe/blob/72e0ffdd00553d24ef23755138ca9b8d5f08b201/src/fastapi_poe/types.py