stacker.news
stacker.news copied to clipboard
Provide API
Hacker News has an API to their data, providing an interface to query data from their site in JSON (see here). Hacker News provides it through firebaseio, so maybe it's worth pushing this to another service but the basic form would be something in the form of https://stacker.news/items/1130.json?print=pretty with the resulting item JSON closely mirroring the database schema.
Other tables in the database schema could be accessed similarly.
I do see an api directory so maybe this is already implemented? If so, it would be good to document. If not, then having an API so that other hackers can look at the data would be cool.
There's a graphql API that's effectively public but I have not documented it. Good rec!
Recently learned about LSATs. We could gate the API with LSATs possibly and not need to have a rate limiting service - not that that's really a huge concern at this point.
There's a graphql API that's effectively public but I have not documented it. Good rec!
Does the graphql API let users post news as well? Would love to integrate this with my other media. Thanks for building this!
Posting news programmatically is going to be tricky ... because it'll make it trivial to create spam. AFAICT to start it'll be public read and on a case-by-case basis public write access.
We'll see though.
One of the items I was thinking of was to integrate my posts with LNURLp either with or without LNBits. Even if programmatic, would paying sats to post be a deterrent b/c it would be too expensive to spam?
would paying sats to post be a deterrent b/c it would be too expensive to spam?
At 1 sat per post, no. At 1000 sats per post, probably.