- A current R installation.
We will soon submit the hackernews4r package to CRAN. Until then, you can install it via the devtools
package:
install.packages(c('devtools'))
devtools::install_github('poplav/hackernews4r')
- Search the existing open and closed issues.
- If you are sure that this is a new problem, file an issue.
library(hackernews4r)
# get top 10 stories and return their original json structure
get_stories()
# get top 5 stories and pretty print them to console
get_stories(type = "top", limit = 5, pretty_print = TRUE)
# get story by id and return their original json structure
get_story(12508356)
# get story by id and pretty print them to console
get_story(12508356, pretty_print = TRUE)