You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You don't need to poll. HN API uses Firebase. You can use the Firebase JS lib that uses a websocket connection. Firebase has methods to observe a node, like v0/topstories and v0/newstories for changes. See documentation for .on('value', callback) at doc
A simple proof of concept that I made to demonstrate this: jsfiddle
It has detection of change of position of an article in the top 500 list and detection of additions in the new stories list.
The text was updated successfully, but these errors were encountered:
You don't need to poll. HN API uses Firebase. You can use the Firebase JS lib that uses a websocket connection. Firebase has methods to observe a node, like
v0/topstories
andv0/newstories
for changes. See documentation for.on('value', callback)
at docA simple proof of concept that I made to demonstrate this: jsfiddle
It has detection of change of position of an article in the top 500 list and detection of additions in the new stories list.
The text was updated successfully, but these errors were encountered: