get_top_stories: Hacker News top stories

Description Usage Arguments Details Value Examples

View source: R/api.R

Description

Retrieves top stories using Hacker News API

Usage

1
get_top_stories(max_items = NULL)

Arguments

max_items

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

Details

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

Value

List of top stories

Examples

1
2
3
4
5
6
7
8
# get the top story on Hacker News
top_story <- get_top_stories(max_items = 1)
top_story


# get all top stories on Hacker News
top_stories <- get_top_stories()
top_stories

hackeRnews documentation built on Dec. 16, 2019, 1:24 a.m.