Doing Hacker News Stream from API but not getting data back

I am doing this tutorial:

This is my repo:

Using this API
http://hnstream.com/


Unofficial Hacker News Streaming API

uses HN's firebase API as the data source. endpoints below are powered by fanout.io.

contact: justin

Between this and HNSearch, maybe your programs don't have to hit HN itself too much.

All articles start: GET http://api.hnstream.com/news/items/

All articles next: GET http://api.hnstream.com/news/items/?since=cursor:{last_cursor}

All articles stream: GET http://api.hnstream.com/news/stream/

All comments start: GET http://api.hnstream.com/comments/items/

All comments next: GET http://api.hnstream.com/comments/items/?since=cursor:{last_cursor}

All comments stream: GET http://api.hnstream.com/comments/stream/

Per-article comments start: GET http://api.hnstream.com/news/{article-id}/comments/items/

Per-article comments next: GET http://api.hnstream.com/news/{article-id}/comments/items/?since=cursor:{last_cursor}

Per-article comments stream: GET http://api.hnstream.com/news/{article-id}/comments/stream/

The "all comments" API is being used below, to display the latest comments as they are posted.

Bug I am having

No data seems to come back from the call to the stream API or even via Postman


Time taken by addCount function: 5:40.278 (m:ss.mmm)

FINISHED

When I call


http://api.hnstream.com/comments/stream/

Or GET via postman

Hi @Tom_Connors,

Thanks for reaching out.
Indeed, looks like the unofficial HN API is down today at least. I just sent an email to the author of the API to notify him about the issue: Justin Karneges justin@fanout.io.

For the bots that I have that are notifying us in Slack, I’m now using the official HN API: GitHub - HackerNews/API: Documentation and Samples for the Official HN API. No stream there so I had to build my own system to pull the posts and put them in a MongoDB cluster but… It’s been more reliable to me so far.

Cheers,
Maxime.

2 Likes

@Tom_Connors,

Justin replied to me, the problem is fixed, the API is back online \o/ !

curl http://api.hnstream.com/comments/stream/

The above command starts to return comments after a few seconds.

Cheers,
Maxime.

1 Like

Wow it works. Thank you very much!!
btw, about this other tutorial, I am wondering how the files in GitHub are supposed to populate the MongoDB dashboard - do I paste them in and if so how do they get updated when I change them in my local and push via GitHub?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.