getPagesInfo method

Future<RepositoryPages> getPagesInfo(
  1. RepositorySlug slug
)

Fetches the GitHub pages information for the specified repository.

API docs: https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site

Implementation

Future<RepositoryPages> getPagesInfo(RepositorySlug slug) async {
  ArgumentError.checkNotNull(slug);
  return github.getJSON<Map<String, dynamic>, RepositoryPages>(
    '/repos/${slug.fullName}/pages',
    statusCode: StatusCodes.OK,
    convert: (i) => RepositoryPages.fromJson(i),
  );
}