Back to APIs list

Hacker News API examples & templates

Use these vals as a playground to view and fork Hacker News API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
stevedylandev avatar
fetchIpfsPosts
@stevedylandev
Script
An interactive, runnable TypeScript val by stevedylandev
rickygrassmuck avatar
staticChess
@rickygrassmuck
HTTP (deprecated)
Forked from maxm/staticChess
maxm avatar
staticChess
@maxm
HTTP
Check it out here: https://chess.maxmcd.com Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves? Functionality is quite limited, and things might be broken. Please let me know if you find bugs! Inspired by this HN discussion about sites that have all possible game states of tic-tac-toe. I plan on extending this to support real gameplay. I think it could be a nice simple interface for long form games with friends. Might also be fun to add a static AI to play against. Feel free to PR any changes if you'd like to see something added.
bjenhamin4alfredolvchenki avatar
staticChess
@bjenhamin4alfredolvchenki
HTTP (deprecated)
Forked from maxm/staticChess
petermillspaugh avatar
generateNewsletterJsx
@petermillspaugh
Script
Val Town email subscriptions: generate newsletter template Cousin Val to @petermillspaugh/emailSubscription — see docs there.
petermillspaugh avatar
createNewsletters
@petermillspaugh
Script
An interactive, runnable TypeScript val by petermillspaugh
janpaul123 avatar
valle_tmp_88140331236158369280490149661851
@janpaul123
HTTP (deprecated)
// Initialize blob with an empty array if it doesn't exist
stevedylandev avatar
fetchPinatsPosts
@stevedylandev
Script
An interactive, runnable TypeScript val by stevedylandev
petermillspaugh avatar
newsletters
@petermillspaugh
Script
Val Town email subscriptions: newsletters Cousin Val to @petermillspaugh/emailSubscription . Process for sending out a newsletter: Publish newsletter on the Web Fork and update monthly newsletter Val like january2024 Add new newsletter to this list Val sendEmailNewsletter cron val will attempt to send latest newsletter on the first of the month
avkv avatar
staticChess
@avkv
HTTP (deprecated)
Forked from maxm/staticChess
wesleychiyoka avatar
staticChess
@wesleychiyoka
HTTP (deprecated)
Forked from maxm/staticChess
fil avatar
cron_rezo_rss2bsky
@fil
Cron
Passerelle RSS vers BlueSky Ce script tourne une fois par heure et reposte les news de https://rezo.net/ vers le compte https://bsky.app/profile/rezo.net Il utilise 3 éléments: l'URL du flux RSS une variable de stockage de l'état, qu'il faut créer initialement comme let storage_rss_rezo = {} et qui sera mise à jour par le script les secrets du compte (username et mot de passe de l'application) Il appelle @me.bsky_rss_poll qui lit le flux, vérifie avec l'état s'il y a du nouveau, et au besoin nettoie le post, puis l'envoie avec le script @me.post_to_bsky . Sans oublier de mettre à jour l'état pour le prochain run. C'est un premier jet. Merci à @steve.krouse pour val.town et à @jordan pour ses scripts que j'ai bidouillés ici. À faire éventuellement: améliorer la logique; poster vers twitter .
kaz avatar
concentricCirclesApp
@kaz
HTTP
* This app displays a thick horizontal line with a color gradient from dark red to yellow to light green. * Below each section, there's a text input field. Each color section can have up to 8 values. * It uses React for the UI and CSS for styling the gradient line and inputs. * It includes a reorder functionality for the items in each section and an expandable "Learn more" section.
petermillspaugh avatar
sendEmailNewsletter
@petermillspaugh
Cron
Val Town email subscriptions: send email newsletter Cousin Val to @petermillspaugh/emailSubscription — see docs there. This Val has a few layers of protection to avoid double sending. Those mechanisms feel pretty hacky, so any suggestions are welcome! Feel free to comment on the Val or submit a PR.
compuives avatar
staticChess
@compuives
HTTP (deprecated)
Forked from maxm/staticChess
nishant avatar
flightRadar24
@nishant
Script
Forked from raylu/flightRadar24