hacker_news_client 0.1.0

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
40
pub points
0%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

brian@brianegan.com

License

MIT (LICENSE)

Dependencies

built_collection, built_value, http

More

Packages that depend on hacker_news_client