hackernews_api 0.0.5 icon indicating copy to clipboard operation
hackernews_api: ^0.0.5 copied to clipboard

A Flutter package of Hacker News API for accessing top and new stories.

Version Tag

A Flutter package of Hacker News API for accessing top and new stories.

⭐ Installing #

dependencies:
    updater: ^0.0.5

⚡ Import #

import 'package:hackernews_api/hackernews_api.dart';

Properties #

newsType → NewsType

NewsType #

NewsType.topStories
NewsType.newStories
NewsType.askStories
NewsType.showStories
NewsType.jobStories

Properties #

TypeStoryPollComment
idint
textString
titleString
parentint
deletedbool
typeString
byString
timeint
kidsList<int>
deadbool
descendantsint
scoreint
urlString
partsint

📙 How To Use #

HackerNews news = HackerNews(
    newsType: NewsType.newStories,
);

//get stories
List<Story> story = await news.getStories();

//get List of story ids
final storyIds = await news.getStoryIds();

//get story data
final story = await news.getStory(storyIds[0]);
1
likes
130
pub points
26%
popularity

Publisher

verified publisher iconmarsad.dev

A Flutter package of Hacker News API for accessing top and new stories.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter, http

More

Packages that depend on hackernews_api