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
willthereader
projects
HTTP
@jsxImportSource https://esm.sh/hono@latest/jsx
0
vtdocs avatar
vtdocs
githubPayloadStringToNormalizedJSON
Script
An interactive, runnable TypeScript val by vtdocs
1
jshawl avatar
jshawl
initialCommit
Script
An interactive, runnable TypeScript val by jshawl
0
pomdtr avatar
pomdtr
emulatorJS
HTTP
An interactive, runnable TypeScript val by pomdtr
0
stevekrouse avatar
stevekrouse
code_search_is_easy
HTTP
Forked from pomdtr/code_search_is_easy
0
ianvph avatar
ianvph
posthogGitHubStarCapture
HTTP
A GitHub webhook handler to capture stars in PostHog
1
stevekrouse avatar
stevekrouse
hiNicoFromGists
Script
Import from Github Gists You can import from Github Gist's raw URL: await import("https://gist.githubusercontent.com/...") This example pulls from this gist: example.js Which has this code: export const hi = function() { return "Hi Nico!" }
1
nbbaier avatar
nbbaier
gfm
Script
Forked from pomdtr/gfm
0
pomdtr avatar
pomdtr
sunbeamGithubNotifications
Script
An interactive, runnable TypeScript val by pomdtr
1
pomdtr avatar
pomdtr
renderGist
HTTP
Render Gist Usage Go to a gist page, and replace gist.github.com by pomdtr-renderGist.web.val.run Example: https://pomdtr-renderGist.web.val.run/probonopd/9feb7c20257af5dd915e3a9f2d1f2277
1
pomdtr avatar
pomdtr
valTownSearch
HTTP
Val Town Search Search for vals using the Github API. Either use the provided UI, or the query param: https://val-town-search.pomdtr.me/search?q=fetchJSON How does it work ? I've wrote about it! Todos [x] Embed the results in the UI [x] Refresh the vals on a cron using a github action [ ] Improve layout on small screens [ ] Support json Accept header [ ] Add pagination params [ ] Allow to filter by authors
1
stevekrouse avatar
stevekrouse
linkInBioTemplate
HTTP
@jsxImportSource https://esm.sh/react
0
pomdtr avatar
pomdtr
githubOauth
HTTP
An interactive, runnable TypeScript val by pomdtr
0
ajax avatar
ajax
resume
Script
// set by ajax.resumeHtml at 2023-06-07T20:30:59.005Z
0
georgemandis avatar
georgemandis
convertEmailToBlogDraft
Email
Convert Emails to Blog Drafts This val will receive inbound emails and create a new Markdown file in a specified GitHub repository. Create drafts for your static site (or, for the bold, publish directly!) by simply sending an email! Notes This script assumes you're using some kind of static site generator that can read from a GitHub repository. There are many to choose from in this space. I'm partial to 11ty Gmail is doing some heavy-lifting for me here in terms of kindly converting my HTML email to Markdown behind the scenes. It's not a guarantee all email providers do this. If yours does not, you may have to investigate an HTML-to-Markdown conversion step. We'll use the GitHub API via Octokit to create the file. You'll need to create a token and store it an an environmental variable in your Val Town settings. Enjoy! — George https://george.mand.is/2024/09/using-email-and-val-town-to-draft-blog-posts/
1
danphilibin avatar
danphilibin
what_did_i_work_on_today
HTTP
@jsxImportSource https://esm.sh/react
0