listPublicKeys method

Stream<PublicKey> listPublicKeys([
  1. String? userLogin
])

Lists the verified public keys for a userLogin. If no userLogin is specified, the public keys for the authenticated user are fetched.

API docs: https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user and https://developer.github.com/v3/users/keys/#list-your-public-keys

Implementation

Stream<PublicKey> listPublicKeys([String? userLogin]) {
  final path = userLogin == null ? '/user/keys' : '/users/$userLogin/keys';
  return PaginationHelper(github)
      .objects('GET', path, (dynamic i) => PublicKey.fromJson(i));
}