getHook method
Fetches a single hook by id
.
API docs: https://developer.github.com/v3/repos/hooks/#get-single-hook
Implementation
Future<Hook> getHook(RepositorySlug slug, int id) async {
ArgumentError.checkNotNull(slug);
ArgumentError.checkNotNull(id);
return github.getJSON<Map<String, dynamic>, Hook>(
'/repos/${slug.fullName}/hooks/$id',
convert: (i) => Hook.fromJson(i)..repoName = slug.fullName,
);
}