Questions tagged [hacker-news-api]

Use this tag for questions about the Hacker News API. That is the API for the website that features computer news and startup companies. General questions about that site or hacking or being hacked are still off-topic.

Hacker News is a website for news primarily related to topics within computer science and entrepreneurship. The Hacker News API is used to access content posted on Hacker News.

Links

39 questions
33
votes
1 answer

JavaScript - Converting a Date() into seconds

I'm using the Hacker News API made at Algolia here: https://hn.algolia.com/api I'm a bit confused as it says to search for posts since a certain time it says to run the following query: Comments since timestamp X (in…
germainelol
  • 3,231
  • 15
  • 46
  • 82
3
votes
1 answer

Accessing HackerNews API

I'm trying to access the HackerNews API to practice Go. Anytime I go to my localhost to try see an output from Firebase database (where the data is stored) I am met with a Google Accounts authentication form. Any help on this would be appreciated.…
mangokitty
  • 1,759
  • 3
  • 12
  • 17
2
votes
1 answer

How to display all stories from the Hacker News API on my React app when loading the website?

I've made a copy of the Hacker News Search but I can't display all stories from the API when I get on my website. No stories appear at all. I have to type something on the searchbar to display them all. I've fetched the data with axios, I…
Steven N
  • 185
  • 1
  • 8
2
votes
1 answer

python calling django's render function in an async callback not working

To better understand the language I started working on building out a client that consumes the Hacker News api. The below code is supposed to pull in the first 10 items from their jobs feed. It first gathers a list of the id's, iterates through…
jeffskelton3
  • 482
  • 2
  • 14
2
votes
1 answer

Algolia Hacker News search api #browse endpoint

It seems that the Algolia Hacker News search API is limited to returning 1000 records: hn.algolia.com/api Algolia provides a #browse endpoint that can be used to gather all search…
jnmcc
  • 21
  • 3
1
vote
0 answers

How to use Hacker News firebase realtime api using the Firebase SDK?

I'm trying to use the HN firebase api to get realtime updates from HN but none of my event listeners are firing. I tried to do things like in this post: How can I access the Hacker News API using the Firebase SDK? but couldn't get it to work. Here's…
1
vote
3 answers

xidel: wrong order of results on hacker news

To scrape hacker news, I use: xidel -e '//span[@class="titleline"]/a/@href|//span[@class="titleline"]' https://news.ycombinator.com/newest But the output in not in the expected order, the URL come after the text, so it's very difficult to…
1
vote
1 answer

How to Output More than Once In frontend In DJango

I am building a web app that makes use of the HackerNews API and I keep running into the same error. I am trying to Output the 10 requested result from API but everytime i use the return response it only outputs the first result. I want it to output…
1
vote
1 answer

How can I access the Hacker News API using the Firebase SDK?

The Hacker News API documentation says: If you can use one of the many Firebase client libraries, you really should. The libraries handle networking efficiently and can raise events when things change. Be sure to check them out. It doesn't specify…
smitop
  • 4,770
  • 2
  • 20
  • 53
1
vote
2 answers

Python 3 Requests errors

I'm working through Python Crash Course 2nd Ed. and in the text is some code for accessing APIs. My code is copied from the text and is as follows: import requests import json from operator import itemgetter #Fetch top stories and store in…
iducam
  • 67
  • 1
  • 11
1
vote
3 answers

Check login credentials of remote website with Angular

I'm creating an interface for hackers news with angular 7. Normally I use the public APIs available, but for login services they are not available. I'm trying to make a POST call, as done by an OpenSource Android Client app for HN, specifically in…
Gabriele Picco
  • 457
  • 4
  • 22
1
vote
0 answers

Windows phone ListView infinite scrolling with skip().take() methods?

I'm trying to get TopStories from hackernews API into a ListView. I want infinite scrolling so I'm using ISupportIncrementalLoading interface. Below is the code in LoadMoreItemsAsync method. var httpClient = new HttpClient(); var response = await…
monik
  • 11
  • 1
1
vote
1 answer

Hacker News API - Get the most popular items

I stumbled upon Hacker News API (https://hn.algolia.com/api) and I was wondering if I am missing how to get the list of the most popular stories featured in the homepage. Is there another API to do this or should I just implement a crawler myself to…
Spearfisher
  • 8,445
  • 19
  • 70
  • 124
0
votes
0 answers

Hacker Rank SQL Binary Trees Nodes

Link Syntax SQL for Binary trees HackerRank I have 2 questions related this answer. First, can you explain where's 1 come from? Second, while I used B as my shorten name not b, this code cant work out, please help me why this is happened? I expect…
0
votes
0 answers

How to do free hosting of a website which using NewsAPI.org Api (restricted for hosting)

I made my first website have great frontend and I'm using NewsAPI.org api for fetch news data. But it's restricted for hosting and i want to host my site to show my project to others. When i host the site and go for that particular domain page works…
1
2 3