isStarred method

Future<bool> isStarred(
  1. RepositorySlug slug
)

Checks if the currently authenticated user has starred the specified repository.

API docs: https://developer.github.com/v3/activity/starring/#check-if-you-are-starring-a-repository

Implementation

Future<bool> isStarred(RepositorySlug slug) {
  return github
      .request('GET', '/user/starred/${slug.fullName}')
      .then((response) {
    return response.statusCode == 204;
  });
}