Struct hn_api::HnClient

source ·
pub struct HnClient { /* private fields */ }
Expand description

The API client.

Implementations§

Create a new HnClient instance.

Return the item with the specified id.

May return None if item id is invalid.

Return the user with the specified username.

May return None if username is invalid.

Return the id of the newest item.

To get the 10 latest items, you can decrement the id 10 times.

Return a list of top story item ids.

Return a list of new story item ids.

Return a list of best story item ids.

Return up to 200 latest Ask HN story item ids.

Return up to 200 latest Show HN story item ids.

Return up to 200 latest Job story item ids.

Return a list of items and users that have been updated recently.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.