
Show HN: Free HN User Favorites API Endpoint (MIT) - sbr464
I needed a way to access my hn favorites since I use them like bookmarks. This was put together very quickly. Uses x-ray (nodejs)<p>API Endpoint:
<a href="https:&#x2F;&#x2F;reactual.lib.id&#x2F;hnfavs@dev" rel="nofollow">https:&#x2F;&#x2F;reactual.lib.id&#x2F;hnfavs@dev</a><p>Example GET request for user: sbr464, 1 page (30 favs):
<a href="https:&#x2F;&#x2F;reactual.lib.id&#x2F;hnfavs@dev&#x2F;?id=sbr464&amp;limit=1" rel="nofollow">https:&#x2F;&#x2F;reactual.lib.id&#x2F;hnfavs@dev&#x2F;?id=sbr464&amp;limit=1</a><p>It currently accepts 2 query params:<p>id (string = &#x27;&#x27;) - hn user id
limit (number = 1) - pagination 30&#x2F;page<p>Will error if you don&#x27;t include an id.<p>I&#x27;ll put it up on a more permanent URL and may move it to a different cloud function provider. I just used stdlib.com for now to get feedback.<p>If the url changes, I&#x27;ll put the updated url in my hn profile&#x2F;source and include it in the JSON response error for a while.<p>Link to source code (MIT): 
<a href="https:&#x2F;&#x2F;github.com&#x2F;reactual&#x2F;hacker-news-favorites-api&#x2F;tree&#x2F;master" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reactual&#x2F;hacker-news-favorites-api&#x2F;tree&#x2F;m...</a>
======
sbr464
Also accepts the query param offset (number, optional, default is 1). There is
a 30 second timeout, so if you need older pages of favorites, just provide an
offset. Usually over 10 pages, it becomes relevant (limit=10/300 favorites)

