gh-verified-public-keys

Get the verified public keys associated with a given Github account

Usage no npm install needed!

<script type="module">
  import ghVerifiedPublicKeys from 'https://cdn.skypack.dev/gh-verified-public-keys';
</script>

README

gh-verified-public-keys

NPM version Build Status Coverage Status Dependency Status devDependency Status

Get the verified public keys associated with a given Github account

const ghVerifiedPublicKeys = require('gh-verified-public-keys');

ghVerifiedPublicKeys('othiym23').then(keys => {
  keys; //=> [{id: 1965441, key: 'ssh-dss AAAAB3Nza...'}, {id: 3322010, key: '...'}, ...] 
});

Installation

Use npm.

npm install gh-verified-public-keys

API

const ghVerifiedPublicKeys = require('gh-verified-public-keys');

ghVerifiedPublicKeys(username [, options])

username: String (a Github username, for example https://github.com/shinnn'shinnn')
options: Object (gh-get options)
Return: Promise instance

It makes an API request to get an array of the verified public keys for a Github account, and returns a promise.

The promise will be fulfilled with a JSON object if successful, otherwise rejected with an error.

License

Copyright (c) 2015 Shinnosuke Watanabe

Licensed under the MIT License.