hackeRnews0.1.0 package

Wrapper for the 'Official Hacker News' API

assert_max_items

Checks whether max_items is correctly defined. If not throws an error

comment_to_dataframe_row

Converts comment to a dataframe row

create_hn_api_response

Creates an object representing a response from the Hacker News API

create_hn_item

Creates an object representing Hacker News item

create_hn_user

Creates an object representing Hacker News user

create_request_url

Creates a request url based on the given base url and passed paths. Th...

default_if_null

return specified variable or default value if specified variable is nu...

dot-base_url

Returns the base url of the Hacker News API

dot-send_request

Sends a request to the specified url and retrieves it's content.

get_best_stories

Hacker News best stories

get_best_stories_ids

Hacker News best stories ids

get_comments

Hacker News nested comments

get_comments_with_root

Hacker News nested comments with root comment

get_content

Retrieves the response content

get_item_by_id

Get Hacker News by Id

get_items_by_ids

Get Hacker News by ids

get_latest_ask_stories

Hacker News latest ask stories

get_latest_ask_stories_ids

Hacker News latest ask stories ids

get_latest_job_stories

Hacker News latest job stories

get_latest_job_stories_ids

Hacker News latest job stories ids

get_latest_show_stories

Hacker News latest show stories

get_latest_show_stories_ids

Hacker News latest show stories ids

get_max_item_id

Hacker News item largest id

get_new_stories

Hacker News newest stories

get_new_stories_ids

Hacker News newest stories ids

get_top_stories

Hacker News top stories

get_top_stories_ids

Hacker News top stories ids

get_updates

Hacker News updated profiles

get_user_by_username

Get Hacker News user

is_hn_api_response

Checks whether the given object is of the class hn_api_response.

is_hn_item

Checks whether the given object is of the class hn_item

is_hn_user

Checks whether the given object is of the class hn_user

parse_json

Parses a json response

print.hn_item

Print for "hn_item" type objects

print.hn_user

Print for "hn_user" type objects

to_datetime_origin

Converts numeric value into POSIXct datetime type

trim_ids_list

Selects only limited number of ids

validate_hn_api_response

Checks if the given response is not empty and that it did not return a...

validate_hn_item

Checks whether the given object is correctly defined hn_item class

validate_hn_user

Checks whether the given object is correctly defined hn_user class

add_json_extension

Adds the json extension to the given url

add_path

Adds the given path to the given url

assert

Asserts a given expression and throws an error if it returns FALSE

assert_ids

Checks whether ids are correctly defined. If not throws an error

Use the <https://hacker-news.firebaseio.com/v0/> API through R. Retrieve posts, articles and other items in form of convenient R objects.

  • Maintainer: Ryszard Szymanski
  • License: MIT + file LICENSE
  • Last published: 2019-12-13