News for hackers. Stuff that matters.
Re:Hacker News API by kevin on Tuesday October 07, 2014 @02:49PM (#8423131)
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.
Re:Hacker News API by Livven on Tuesday October 07, 2014 @04:38PM (#8423877)
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 by jamest on Tuesday October 07, 2014 @04:53PM (#8423956)
[Firebase founder] There is a Firebase C# SDK on the way. We've had some other things, that we've been working on for the last year, that are shipping in the next few weeks which have taken priority. After that, we'll be shifting focus to new SDKs (they're a little complicated and take a bit of time to build)
Re:Hacker News API by meursault334 on Tuesday October 07, 2014 @10:35PM (#8425053)
I'm really glad to hear this. I have been loving Firebase for the app I'm making but one of the components has to run in C# and talking to Firebase from the C# app was much more painful than the other Firebase portions of the application.
Re:Hacker News API by localhost on Thursday October 09, 2014 @01:48AM (#8430991)
This would be awesome. Right now I'm experimenting using raw HTTP requests and Newtonsoft.Json as the JSON [de]serializer. I presume that you will make your C# SDK a portable class library so we can use it in iOS and Android apps as well via Xamarin?
Re:Hacker News API by Avalaxy on Wednesday October 08, 2014 @04:29AM (#8425853)
"C# SDK" doesn't say much. SilverLight can use C#, WinRT can use C#, .NET can use C#, but that doesn't mean your "C# library" will run everywhere. C# is just the syntax.
Re:Hacker News API by kogir on Tuesday October 07, 2014 @02:55PM (#8423171)
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 by Livven on Tuesday October 07, 2014 @04:36PM (#8423863)
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 by kogir on Tuesday October 07, 2014 @05:23PM (#8424094)
I set things up so I could actually run their whole JS SDK and talk to it from C#.
Re:Hacker News API by Livven on Tuesday October 07, 2014 @05:34PM (#8424149)
Thanks 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.

Re:Hacker News API by ptx on Tuesday October 07, 2014 @06:31PM (#8424367)
Didn'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.)