I've been waiting forever for an API from HN, but unfortunately I will not be using it for my app ( https://github.com/bennyguitar/News-YC---iPhone ). I've built a library for iOS ( https://github.com/bennyguitar/libHN ) that handles scraping, commenting, submitting, voting, etc pretty well and allows me to make as few web calls as necessary to use HN. It looks like I'd have to drop functionality and completely chang…
If you use the Firebase iOS library they handle it all and use an efficient bidirectional streaming protocol.
Hacker News API
151–160 of 315 posts
Re: Hacker News API
#152Earlier quoted context omitted.
> (which is a mess even if you ignore all the tables – for example, the first paragraph in a comment usually isn't wrapped in tags) Oh, that's in the actual API. https://hacker-news.firebaseio.com/v0/item/8422922.json?prin... I strongly hope they add a plain-text field for returned comments.
What you're getting there is how the comment text happens to be stored (and presumably always has been). We've talked about changing that, because it would allow us to do some implementation improvements like... well, I forget just now. Might have had to do with caching. Anyhow, if enough people want it, we'll bump up the priority.
Re: Hacker News API
#153This... is cool, but also kinda sucks for me. I've invested dozens of hours into writing an extremely complicated scraper for my Android version of HN. https://play.google.com/store/apps/details?id=com.airlocksof... The newest version (still under development, probably a month or two from release) adds support for displaying polls, linking to subthreads, and full write support (voting, commenting, submitting, etc). I…
[Firebase Dev Advocate] @airlocksoftware - Yes, you should make separate requests for each story. You can attach a listener to the topstories node ( https://www.firebase.com/docs/web/guide/retrieving-data.html... ) and when that’s triggered, you can make a request for the data on each story. Using the Firebase SDK, each request will get made using the same connection. I'd recommend using our SDK instead of the REST A…
Re: Hacker News API
#154Oh man you guys, patio11 has generated massive amounts of content: https://hacker-news.firebaseio.com/v0/user/patio11.json?prin... I count 8,483 submissions. I'm sure there's something interesting to be done with all of this data. A word frequency chart? --- Edit: So apparently there's a ruby gem that lets you feed it a body of text and generates pseudo-random phrases based on that text. I present to you the patio11…
Click on the line chart to do an hnsearch for the time period.
Update: Site should be back up. It crashes occasionally (that's part of why I hadn't post it yet.)
Re: Hacker News API
#155Earlier quoted context omitted.
Use the Firebase libraries rather than the REST one to efficiently handle requests. I believe it uses a websocket internally. "It does all the work for you and is awesome." to quote Nick.
Also, while they don't have a Windows Phone API I previously wrote a COM Windows Scripting API to use it via Chackra from an ASP.Net app. I think it's even easier now that JS is a supported app language.
Re: Hacker News API
#156Decided to recreate the Hacker News homepage using Ember and the new API. I was really pleased with how easy it was! https://realtimehackernews.firebaseapp.com/
Re: Hacker News API
#157Re: Hacker News API
#158Decided to recreate the Hacker News homepage using Ember and the new API. I was really pleased with how easy it was! https://realtimehackernews.firebaseapp.com/
Re: Hacker News API
#159I've been working on a Hacker News client for Windows Phone over the past several weeks and am very close to an initial release, so I feel somewhat ambivalent about this. On the one hand, of course it's great that HN is finally getting a proper API and also modernizing its markup (which is a mess even if you ignore all the tables – for example, the first paragraph in a comment usually isn't wrapped in tags), but on t…
Use the Firebase libraries rather than the REST one to efficiently handle requests. I believe it uses a websocket internally. "It does all the work for you and is awesome." to quote Nick.
EDIT: After having played with the JS SDK a bit I'd like to add that it is indeed incredibly awesome.