4 releases (2 breaking)
0.3.0 | Dec 3, 2021 |
---|---|
0.2.0 | Nov 28, 2021 |
0.1.1 | Nov 26, 2021 |
0.1.0 | Nov 23, 2021 |
#9 in #stories
25 downloads per month
Used in hn-cli
23KB
401 lines
hnapi
, a 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.
License
MIT, see LICENSE.
Dependencies
~13–30MB
~399K SLoC