hacker_news_client 0.1.0 copy "hacker_news_client: ^0.1.0" to clipboard
hacker_news_client: ^0.1.0 copied to clipboard

A client for the Hacker News API. Works on Flutter, Server, and Web.

hacker_news_client #

Build Status codecov

A Dart client for the Hacker News API. Works on Flutter, Server, and Web.

Usage #

No need for an API key or anything, just create an instance of the client and fetch results!

// Create a client and pass in an http.Client.
//   - For Flutter & Server, use IOClient
//   - For Web, use BrowserClient
final client = HackerNewsClient(IOClient());

// Fetch the top stories. Does not include all comments.
final topStories = await client.topStories();

// Fetch the newest stories. Does not include all comments
final newStories = await client.newStories();

// Fetch a story with all comments
final newStories = await client.story(8863);

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A client for the Hacker News API. Works on Flutter, Server, and Web.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

built_collection, built_value, http

More

Packages that depend on hacker_news_client