Live data from Hacker News

Hacker News API

blog.ycombinator.com

151–160 of 315 posts

Re: Hacker News API

#151
post #144
post #143

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.

That's good to know - wasn't super clear on my first pass of the documentation.

Re: Hacker News API

#152
post #85

Earlier 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.

I would love it. Markdown would be the bee's knees there, if you can reverse it.

Re: Hacker News API

#153
post #59

This... 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…

Here's an example showing all topstories and updating in realtime. Obviously, in JS, but the other Firebase SDKs are similar: http://jsfiddle.net/firebase/96voj1xh/

Re: Hacker News API

#154

Oh 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…

Here are some line charts of his posting history: http://hnuser.herokuapp.com/user/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

#155
post #70
post #65

Earlier 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.

Are you referring to the WebSocket API that the Firebase SDKs use internally? It doesn't seem to be documented anywhere so I guess it's only slightly better than scraping HTML ;)

Re: Hacker News API

#156

Decided 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/

that is really cool seeing the numbers change (occasionally)

Re: Hacker News API

#158

Decided 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/

Very cool, but why not update the design a bit, while you're at it?

Re: Hacker News API

#159
post #65
post #50

I'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.

Well unfortunately there's no Firebase SDK for Windows Phone/C#/WinRT, and the WebSocket API is undocumented.

EDIT: After having played with the JS SDK a bit I'd like to add that it is indeed incredibly awesome.

Re: Hacker News API

#160
Smart move using Firebase. This instantly gives developers traction with the API and as a big API client guy, I love making clients but also very happy we'll have all the tools we need to get started using the API right off the bat. Considering Firebase doesn't have rate-limiting too, this means that the things people can build with this API are limitless.
Post reply on HN