star method

Future star(
  1. RepositorySlug slug
)

Stars the specified repository for the currently authenticated user.

API docs: https://developer.github.com/v3/activity/starring/#star-a-repository

Implementation

Future star(RepositorySlug slug) {
  return github.request('PUT', '/user/starred/${slug.fullName}',
      headers: {'Content-Length': '0'}).then((response) {
    return null;
  });
}