1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! [Hacker News](https://news.ycombinator.com/) API bindings for Rust with full async support.
//!
//! ```
//! use newswrap::{client::HackerNewsClient, errors::HackerNewsClientError};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), HackerNewsClientError> {
//! // Build your client at the start of your application process
//! let client = HackerNewsClient::new();
//!
//! // Call various endpoints with your client instance
//! let generic_item = client.items.get_item(69).await?;
//! dbg!(&generic_item);
//!
//! // Determine what the item type is
//! let item_type = generic_item.get_item_type();
//! dbg!(item_type);
//!
//! // Check if the item is job
//! assert!(generic_item.is_story());
//!
//! // Retrieve user information
//! let user = client.users.get_user("joeymckenzie").await?;
//! dbg!(user);
//!
//! Ok(())
//! }
//! ```
/// The ID associated to all Hacker News items and users.
pub type HackerNewsID = u32;