Learn R Programming

hackeRnews (version 0.1.0)

get_new_stories: Hacker News newest stories

Description

Retrieves newest stories using Hacker News API

Usage

get_new_stories(max_items = NULL)

Arguments

max_items

Maximum number of items to retrieve. If max_items = NULL, returns all available

Value

list of new stories

Details

Parallel api requests can be enabled by running future::plan(future::multiprocess)

Examples

Run this code
# NOT RUN {
# get the newest story on Hacker News
newest_story <- get_new_stories(max_items = 1)
newest_story

# }
# NOT RUN {
# get all new stories on Hacker News
new_stories <- get_new_stories()
new_stories
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab