forkGist method

Future<Gist> forkGist(
  1. String id
)

Forks the specified Gist.

API docs: https://developer.github.com/v3/gists/#check-if-a-gist-is-starred

Implementation

Future<Gist> forkGist(String id) {
  return github.request('POST', '/gists/$id/forks', statusCode: 201).then((
    response,
  ) {
    return Gist.fromJson(jsonDecode(response.body) as Map<String, dynamic>);
  });
}