hackernews_api

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

hackernews api

A Flutter package of Hacker News API for accessing top and new stories.
⭐ Installing #
dependencies:
updater: ^0.0.6
copied to clipboard
⚡ Import #
import 'package:hackernews_api/hackernews_api.dart';
copied to clipboard
Properties #
newsType → NewsType
copied to clipboard
NewsType #
NewsType.topStories
NewsType.newStories
NewsType.askStories
NewsType.showStories
NewsType.jobStories
copied to clipboard
Properties #




Type
Story
Poll
Comment




id
int





text
String





title
String





parent
int





deleted
bool





type
String





by
String





time
int





kids
List<int>





dead
bool





descendants
int





score
int





url
String





parts
int






📙 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]);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.