Expand description
Use this crate to query stories from HackerNews.
For now, it supports the following operations:
- list stories using
stories_list
- get details and comments for a story using
story_details
- get details about a user using
user_details
- login and get an auth token using
login
- upvote a story using
upvote_story
Refer to their respective documentations to see usage examples.
Note: information is obtained by scraping the HackerNews website. The reason this crate does not use the official API is that it does not provide a convenient way to get all the comments for a given story, and only allows read operations.
Structs§
- Comment
- Comment posted on a story. A comment can have a parent if it is a reply to another comment, and can have children.
- Story
- Information about a story.
- Story
With Details - Combination of a story, its HTML content, and its comments.
- User
- Information about a user.
Enums§
- Story
List - Available story lists.
Functions§
- login
- stories_
list - Get all the stories for a given list at a given page.
- story_
details - Get the details about a given story. Will return
null
for a non-existent story ID. - upvote_
story - user_
details - Get the details about a given user. Will return
null
for a non-existent user ID.