Skip to content

stormasm/hn-api-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a fork of hn_api

with the following added capabilities:

  • add in an item_type

Start Switch

So the idea behind the start switch is to figure out where in the Hacker News feed you want to start grabbing ids. For now the switch will only define the upper bound and will assume that the lower bound will be calculated based on the number of ids you define you want to pull.

The starting id can come from one of three places in order of selection.

  1. A number you read from a Redis key
  2. A number you pass into the code from which to start
  3. The max_item_id based on this code
    let max_item_id = api.get_max_item_id().unwrap();

Max Item Id which is located here

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Languages