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.
iamseeley avatar
pythonHTTPVal
@iamseeley
HTTP (deprecated)
pyodide 🤝 deno trick pyodide to execute python code in the deno runtime deno module source: py-town not all python packages are supported by pyodide
iamseeley avatar
resumeDetails
@iamseeley
HTTP (deprecated)
💼 Thomas Seeley's resume in the JSON Resume standard
yieldray avatar
translate
@yieldray
HTTP (deprecated)
Translator using a public deepl api
pomdtr avatar
codemirror_demo
@pomdtr
HTTP
CodeMirror Web Component Available Attributes language readonly code theme API You can access the code using the code property: document.getElementById("editor").code
iamseeley avatar
sqliteExplorerApp
@iamseeley
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp
kamek avatar
sqliteExplorerApp
@kamek
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp
stevekrouse avatar
firmIvorySawfish
@stevekrouse
Script
Forked from stevekrouse/demoSDK
tomasholub avatar
dailyDadJoke
@tomasholub
Cron
Forked from stevekrouse/dailyDadJoke
dtkav avatar
sqliteExplorerApp
@dtkav
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp
dglazkov avatar
googlenews
@dglazkov
HTTP (deprecated)
A sample implementation of Breadboard Service Endpoint (BSE) protocol. For more information, see Breadboard service node .
pomdtr avatar
lastlogin
@pomdtr
Script
Lastlogin Authentication for val.town Looking for an hono integration ? See @pomdtr/lastloginHono Support login in trough: Email Link QR Code Google Oauth Github Oauth Gitlab Oauth Facebook Oauth Demo You can try a demo at https://pomdtr-lastloginhonoexample.web.val.run (see @pomdtr/lastLoginHonoExample for code) Usage Wrap your http handlers in a lastlogin middleware (sessions will be persisted in the lastlogin_session table on your sqlite account). If you want to be the only one able to access your val, you can use @pomdtr/verifyUserEmail. import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail"; export default lastlogin((req) => { return new Response(`You are logged in as ${req.headers.get("X-LastLogin-Email")}`); }, { // check that the user email match your val town email verifyEmail: verifyUserEmail }); If you want to customize how is allowed to signup, you can set the verifyEmail option: import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; export default lastlogin((req) => { return new Response(`You are logged in as ${req.headers.get("X-LastLogin-Email")}`); }, { verifyEmail: (email) => { email == "steve@valtown" } }); You can allow anyone to signup by returning a boolean from the verifyEmail function: import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; export default lastlogin((req) => { return new Response(`You are logged in as ${req.headers.get("X-LastLogin-Email")}`); }, { verifyEmail: (_email) => true }); Public Routes import { lastlogin } from "https://esm.town/v/pomdtr/lastlogin"; import { verifyUserEmail } from "https://esm.town/v/pomdtr/verifyUserEmail"; export default lastlogin(() => { return new Response("Hi!"); }, { verifyEmail: verifyUserEmail, public_routes: ["/", "/public/*"], }); See the URLPattern API for reference. Logout Just redirect the user to /auth/logout
viniciuscainelli avatar
dailyDadJoke
@viniciuscainelli
Cron
Forked from stevekrouse/dailyDadJoke
stevekrouse avatar
button
@stevekrouse
HTTP
Forked from easrng/button
flymaster avatar
sqliteExplorerApp
@flymaster
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp
hunty avatar
sqliteExplorerApp
@hunty
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp
feb avatar
sqliteExplorerApp
@feb
HTTP (deprecated)
Forked from nbbaier/sqliteExplorerApp