github_trend 0.1.7 copy "github_trend: ^0.1.7" to clipboard
github_trend: ^0.1.7 copied to clipboard

outdated

Get the popular repository on github,You can also get all the languages.And convert the data into Map, List, JSON

example/github_trend_example.dart

import 'package:github_trend/github_trend.dart';
import 'dart:convert';

main() async {
  GithubTrend githubTrend = GithubTrend();

  // fetch languages
  List<String> languages = await githubTrend.fetchLanguages();
  print(languages);
  print(json.encode(languages));
  // default time language
  try {
    List<Map<String, dynamic>> defaultArray =
        await githubTrend.fetchRepos();
    print(defaultArray);
  } catch (e) {
    // get origin response
    githubTrend.response;
    print(e);
  }

  // rust language and default time
  List<Map<String, dynamic>> rustArray =
      await githubTrend.fetchRepos(language: 'rust');
  print(rustArray);

  // rust language and last weekly
  List<Map<String, dynamic>> rustWeekArray = await githubTrend
      .fetchRepos(language: 'rust', since: 'weekly');
  print(rustWeekArray);

  // return default trending when pass error time and language params.
  List<Map<String, dynamic>> rustWeekArrayerror = await githubTrend
      .fetchRepos(language: 'error', since: 'error');
  print(rustWeekArrayerror);
}
0
likes
0
pub points
13%
popularity

Publisher

unverified uploader

Get the popular repository on github,You can also get all the languages.And convert the data into Map, List, JSON

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

html, http

More

Packages that depend on github_trend