Learn R Programming

hackeRnews (version 0.1.0)

get_latest_ask_stories: Hacker News latest ask stories

Description

Retrieves latest ask stories using Hacker News API

Usage

get_latest_ask_stories(max_items = NULL)

Arguments

max_items

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

Value

list of latest ask HN stories ids

Details

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

Examples

Run this code
# NOT RUN {
# get the lastest ask story on Hacker News
latest_ask_story <- get_latest_ask_stories(max_items = 1)
latest_ask_story

# }
# NOT RUN {
# get 10 latest ask stories on Hacker News
latest_10_ask_stories <- get_latest_ask_stories(max_items = 10)
latest_10_ask_stories

# get all latest ask stories on Hacker News
latest_ask_stories <- get_latest_ask_stories()
latest_ask_stories
# }

Run the code above in your browser using DataLab