Skip to content
This repository has been archived by the owner on Oct 22, 2022. It is now read-only.

Latest commit

 

History

History
44 lines (28 loc) · 1.36 KB

README.md

File metadata and controls

44 lines (28 loc) · 1.36 KB

[DEPRECATED] Codebase moved to GitTouch

github_trending

pub test

A Dart library to get GitHub trending repositories and developers via github-trending-api.

Installation

Add github_trending as a dependency in your pubspec.yaml file

Usage

import 'package:github_trending/github_trending.dart';

void main() async {
  final trending = GithubTrending(prefix: 'https://gtrend.yapie.me');

  // get trending repositories
  var repos = await trending.getTrendingRepositories();
  print(repos[0].name);

  // specify time period
  var weeklyRepos = await trending.getTrendingRepositories(since: 'weekly');
  print(weeklyRepos[0].name);

  // specify language
  var dartRepos = await trending.getTrendingRepositories(language: 'dart');
  print(dartRepos[0].language); // Dart
  print(dartRepos[0].languageColor); // #00B4AB
}

Credits

License

MIT