4 ms·
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 a
by Livven 12y ago
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 <p> tags), but on the other hand this current v0 version is very lacking and impractical for a regular client application.
Since the top stories (limited to 100) and child comments are only available as a list of IDs a client app would have to make a separate HTTP request for every single item, which is obviously not something you'd want to do especially in a mobile environment. Other lists apart from the top stories (new, show, ask, best, active etc.) don't seem to be available at all right now.
Of course this is just the first version, and the documentation promises improvements over time – which I don't doubt at all – but there's no clear indication that the API will be at feature-parity with the current website, even excluding anything that requires authentication, by October 28. So this means that I – and other developers of client apps or unofficial APIs – will probably have to write new scraping code once the new rendering engine (which I assume refers to the website) arrives instead of being able to switch to the new API immediately.
Now I guess I might just be needlessly worried, especially since the blog post explicitly says that the new API "should hopefully making switching your apps fairly painless", but then why not wait until it's actually ready for that before making the announcement? Putting a half-baked API out there a few days/weeks (?) in advance before it's fully fleshed out doesn't seem all that helpful, at least to me.
- minimaxir 12y ago> (which is a mess even if you ignore all the tables – for example, the first paragraph in a comment usually isn't wrapped in <p> tags) Oh, that's in the actual API. https://hacker-news.firebaseio.com/v0/item/8422922.json?print=pretty https://hacker-news.firebaseio.com/v0/item/8422922.json?prin... I strongly hope they add a plain-text field for returned comments.
- dang 12y agoWhat 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.
- rcsorensen 12y agoI would love it. Markdown would be the bee's knees there, if you can reverse it.
- kevin 12y agoUse 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.
- kogir 12y agoAlso, 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.
- Livven 12y agoAre 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 ;)
- kogir 12y agoI set things up so I could actually run their whole JS SDK and talk to it from C#.
- Livven 12y agoThanks for the tip, I actually just figured that out myself a few minutes ago. Should be good enough until a proper SDK arrives. With access to a Firebase SDK the only major additions the API needs to become a viable replacement for existing read-only client apps would be support for all the other lists apart from top stories (new, show, show new, ask, jobs, best, active) and more than 100 items for each. For apps that need write access I'd suggest keeping the current website on a separate subdomain until that is implemented into the API.
- ptx 12y agoDidn't they remove support for calling COM APIs (i.e. ActiveX) in Chakra? (At least in IE 10 and later, I think - the versions with proper EcmaScript 5 support.)
- miguelrochefort 12y agoOr use my Hacker News client for Windows Phone: http://www.windowsphone.com/en-us/store/app/hacker-news/a5275a3f-6611-48f6-bd62-7382eda4c028 http://www.windowsphone.com/en-us/store/app/hacker-news/a527...
- Livven 12y agoI've tried your app, it's functional but obviously I wasn't satisfied with any of the existing options which is why I wrote my own ;) It should be coming out this week, just a few finishing touches now...
- Avalaxy 12y agoGreat you're here. I'm using this app, but I'm sorry to say this... It's pretty bad. Here's a list of issues that I encounter very often: - It often crashes during startup - There are massive encoding issues, I see question mark symbols pretty often. - Comments often won't load, without any error message whatsoever. I uninstalled the app multiple times for these reasons, but unfortunately there isn't anything that's better.
- Livven 12y agoWould you be willing to beta test my application? It's pretty much finished already and doesn't have any of the issues you listed (in addition to having a, in my opinion, much nicer design), I'd just be looking for some general feedback regarding the discoverability of some features. I could submit a beta today or tomorrow.
- Avalaxy 12y agoI would love that. Invite me at leoncullens @ live . nl
- FlyingLawnmower 12y agoI'd love an invite as well, if possible.
- loneranger_11x 12y agoSee if this helps: http://filr.io/channel/hackernews/stream http://filr.io/channel/hackernews/stream queryparams: pageSize (no of items to return in one go) before (takes an epoch timestamp and returns results before that timestamp) this is a stream of HN stories that have made it to the front page, in order of the time that they made it to the frontapge.