flutter_gh_fetch 0.0.3 copy "flutter_gh_fetch: ^0.0.3" to clipboard
flutter_gh_fetch: ^0.0.3 copied to clipboard

discontinued

Minimal package for fetching GitHub user info and paginated list of repositories

example/flutter_gh_fetch_example.dart

import 'package:flutter_gh_fetch/flutter_gh_fetch.dart';

/// Example class showcasing the use of the library
/// in an object-oriented syntax
class FlutterGhFetchExample {
  FlutterGHFetch _ghFetch;

  FlutterGhFetchExample() {
    // Initialize FlutterGhFetch
    final String accessToken = "my-access-token";
    _ghFetch = FlutterGHFetch(accessToken);
  }

  Future<void> allMethods() async {
    // First, call the init() method to initialize the whole thingy
    await _ghFetch.init();

    // Query user data
    print(await _ghFetch.queryUserData());

    // Repository queries and combos you can use
    print(await _ghFetch.queryRepositoryData(5));
    print(await _ghFetch.queryRepositoryData(
      5,
      after: 'insert-cursor',
    ));
    print(await _ghFetch.queryRepositoryData(
      5,
      filterPrivate: true,
    ));
    print(await _ghFetch.queryRepositoryData(
      5,
      after: 'insert-cursor',
      filterPrivate: true,
    ));

    // Query total number of repos
    print(await _ghFetch.queryTotalRepoCount());
  }
}
0
likes
40
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Minimal package for fetching GitHub user info and paginated list of repositories

Homepage

License

MIT (license)

Dependencies

flutter, graphql

More

Packages that depend on flutter_gh_fetch