github_trending 0.1.2 github_trending: ^0.1.2 copied to clipboard
A library to get GitHub trending repositories, with languages and period options.
example/github_trending_example.dart
import 'package:github_trending/github_trending.dart';
main() async {
// get trending repositories
var repos = await getTrendingRepositories();
print(repos[0].owner);
// specify time period
var weeklyRepos =
await getTrendingRepositories(since: TrendingRepositorySince.weekly);
print(weeklyRepos[0].name);
// specify language
var dartRepos = await getTrendingRepositories(language: 'dart');
print(dartRepos[0].primaryLanguage.name); // Dart
print(dartRepos[0].primaryLanguage.color); // #00B4AB
}