Crates.io | sideko_hacker_news |
lib.rs | sideko_hacker_news |
version | 0.2.0 |
source | src |
created_at | 2023-10-12 18:00:56.253429 |
updated_at | 2023-12-01 17:06:13.457661 |
description | Rust API bindings - ssideko_hacker_news |
homepage | |
repository | |
max_upload_size | |
id | 1001584 |
size | 24,322 |
Hacker News makes the public their data available in near real time.
The v0 API is essentially a dump of our in-memory data structures. We know, what works great locally in memory isn't so hot over the network. Many of the awkward things are just the way HN works internally... It's not the ideal public API, but it's the one we could release in the time we had
This documentation and SDK libraries have been generated by Sideko which has no affiliation with Hacker News. Everything you see is generated from an OpenAPI specification.
Install and try the free beta SDK generator on our Github.
use sideko_hacker_news::Client;
let client = Client::default();
List the latest Ask HN story IDs. Will return maximum 200 IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_ask_story_ids(GetAskstoriesJsonRequest {..Default::default()});
List the best hacker news story IDs. Will return maximum 500 IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_best_story_ids(GetBeststoriesJsonRequest {..Default::default()});
Stories, Comments, Jobs, Ask HNs and even Polls are all considered items, with slightly different structures (see the examples).
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_item(GetItemIdJsonRequest {id: 123, ..Default::default()});
List the latest Job story IDs. Will return maximum 200 IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_job_story_ids(GetJobstoriesJsonRequest {..Default::default()});
The current largest item ID. Walking backwards from here allows you to list all items avialable through the API.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_max_item_id(GetMaxitemJsonRequest {..Default::default()});
List the top hacker news story IDs. Will return maximum 500 IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_new_story_ids(GetNewstoriesJsonRequest {..Default::default()});
List the latest Show HN story IDs. Will return maximum 200 IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_show_story_ids(GetShowstoriesJsonRequest {..Default::default()});
List the top hacker news story IDs. Will return maximum 500 IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_top_story_ids(GetTopstoriesJsonRequest {..Default::default()});
List recently updated item IDs and profile IDs.
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_updates(GetUpdatesJsonRequest {..Default::default()});
Retrieves user metadata given the user ID (HN username).
Documentation & SDKs generated by Sideko from OpenAPI. Install and try the free beta SDK generator on our Github.
let response = client.get_user(GetUserIdJsonRequest {id: "string".to_string(), ..Default::default()});