{"name":"ghreleases","version":"3.0.1","description":"Interact with the GitHub releases API","main":"ghreleases.js","scripts":{"test":"standard && node test.js"},"repository":{"type":"git","url":"git+https://github.com/ralphtheninja/ghreleases.git"},"keywords":["github","api","releases"],"author":{"name":"Magnus Skog","email":"ralphtheninja@riseup.net"},"license":"MIT","dependencies":{"after":"~0.8.1","ghrepos":"~2.1.0","ghutils":"~3.2.0","lodash.uniq":"^4.5.0","simple-mime":"~0.1.0","url-template":"~2.0.6"},"devDependencies":{"standard":"^12.0.0","tape":"^4.5.1"},"engines":{"node":">=6"},"gitHead":"9f15f128ed30b6cae40f331d692a61ea23fdecba","bugs":{"url":"https://github.com/ralphtheninja/ghreleases/issues"},"homepage":"https://github.com/ralphtheninja/ghreleases#readme","_id":"ghreleases@3.0.1","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-arTcwCx8+5ovMg00KM4Xo/CGJB1zR1if8HZMe+/i6qj0sbzF4H9IoafT/+8gMUkXCsOLZ5rUeeUaG37mh96zyQ==","shasum":"ab9a6b4a10c87abf1b6c248de287784c75624dee","tarball":"http://registry-npm.ywwl.com/ghreleases/download/ghreleases-3.0.1.tgz","fileCount":6,"unpackedSize":37020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbxjHSCRA9TVsSAnZWagAAF4UP/1K+zMUCeW4dI4KoxMOY\nwhxMoscQILHCSPQoBXL4X0sn8nEqaeyNOXC7WdNyXcuEe7cK2Y4xnyea4hZv\nP0F1Pa+N2iPg4GPFnCxHae3AeZPQZLso3yLOqHvtgoq6XNTOhU8UVMRi1Quj\nz/VZ8yHzWHwKOo6pHC+uOR/uxe2q5Z9U6qkTVsVO1c5eDRqb6lWWpdJ5SGoq\n3GKC5Jnh0ZHKjuBkvgA/4TPCzjqlSWpzFrFdA8fkVCMT18n4aV8S72YGMKBy\nQMauWwv0jc419o8j22W3teBBR0KzVbX9QqkRbKsggA6hhMtHnASjTnNscF+w\n5EyFNq0SahmqOC4vVFhTmYmcU+A5m0D3BcyaIkkmetnz8PEgG09mji2KM8Fg\nxcJvTDsyIebQa0LSgFWByIaXBzQtWEQ3ZwcXuwnveqSpCYtJt2hDD6PXAH/9\n641GvS/5fJO3gDwutSZOkYHBop37WgL3GknqLs/5m4YwimDL6l08hb5d6PKL\nbmUjjy+4y2/LXw6ekGThT9niYxVRGysSbHZ3WGOTeQaAhKpTLZDBLS63YpuE\neSrWgJmAUKj25CjNjI2UOl+/VRKRMRIotFHDUkBGYiBzmTBHu9dhv5J+AUdT\nC+nSPbLiDsiUmmqAvOLAEDxbG6fQO6U+1DIgBrlOVXMmEU2DnmaxGWDpgD/1\nn/Ux\r\n=mhc5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBv+1sG3gj2BdxcEHK/Oeu267y8oIr1U1URXgh3qK6nzAiAm+oDC74vHVEjkmrYOImAMAZFLQGTrqGpiUujYsXFp6g=="}],"size":28212,"noattachment":false,"key":"/ghreleases/-/ghreleases-3.0.1.tgz"},"maintainers":[{"email":"ralphtheninja@riseup.net","name":"ralphtheninja"},{"email":"r@va.gg","name":"rvagg"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ghreleases_3.0.1_1539715537834_0.7878854348268252"},"_hasShrinkwrap":false,"readme":"# ghreleases\n\n> Interact with the GitHub releases API.\n\n[![npm](https://img.shields.io/npm/v/ghreleases.svg)](https://www.npmjs.com/package/ghreleases)\n![node](https://img.shields.io/node/v/ghreleases.svg)\n[![travis](https://secure.travis-ci.org/ralphtheninja/ghreleases.png)](http://travis-ci.org/ralphtheninja/ghreleases)\n[![david](https://david-dm.org/ralphtheninja/ghreleases.svg)](https://david-dm.org/ralphtheninja/ghreleases)\n[![standard](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)\n[![npm](https://img.shields.io/npm/dm/ghreleases.svg)](https://www.npmjs.com/package/ghreleases)\n\n## API\n\n### `list(auth, org, repo[, options], cb)`\n\nList all releases for a repo. Calls back with an array of releases.\n\n```js\nconst gh = require('ghreleases')\nconst auth = {\n  token: '90230948aef88723eca2309880fea09789234',\n  user: 'ralphtheninja'\n}\ngh.list(auth, 'level', 'leveldown', (err, list) => {\n  console.log(list)\n})\n```\n\nGitHub [docs](https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository).\n\n### `getLatest(auth, org, repo[, options], cb)`\n\nGet latest release.\n\n```js\ngh.getLatest(auth, 'level', 'leveldown', (err, release) => {\n  console.log(release)\n})\n```\n\nGitHub [docs](https://developer.github.com/v3/repos/releases/#get-the-latest-release).\n\n### `getById(auth, org, repo, id[, options], cb)`\n\nGet data for a single release.\n\n```js\ngh.getById(auth, 'level', 'leveldown', '1363866', (err, release) => {\n  console.log(release)\n})\n```\n\nGitHub [docs](https://developer.github.com/v3/repos/releases/#get-a-single-release).\n\n### `getByTag(auth, org, repo, tag[, options], cb)`\n\nGet release by tag.\n\n```js\ngh.getByTag(auth, 'level', 'leveldown', 'v1.2.2', (err, release) => {\n  console.log(release)\n})\n```\n\nGitHub [docs](https://developer.github.com/v3/repos/releases/#get-a-release-by-tag-name).\n\n### `create(auth, org, repo, data[, options], cb)`\n\nCreate a release.\n\n```js\nconst data = {\n  tag_name: '1.2.3-test',\n  name: 'Release name for 1.2.3-test',\n  body: 'Body text of release goes here'\n}\ngh.create(auth, 'level', 'leveldown', data, (err, release) => {\n  console.log(release)\n})\n```\n\nThe release on GitHub would then look as follows:\n\n![1.2.3-test release](images/github-release.png?raw=true \"1.2.3-test release\")\n\nGitHub [docs](https://developer.github.com/v3/repos/releases/#create-a-release)\n\n### `uploadAssets(auth, org, repo, release, files[, options], cb)`\n\nUpload assets to a release. Calls back with an array of results for each upload request.\n\n* The `release` parameter accepts either a release `id`, `'latest'` or a valid ref, e.g. `'tags/v1.0.0'`\n* The `files` parameter is an array of absolute file paths that should be uploaded and associated with this release\n\n```js\nconst ref = 'tags/v1.3.0'\nconst files = [\n  '/path/to/README.md',\n  '/path/to/prebuilt/binary.tar.gz'\n]\ngh.uploadAssets(auth, 'level', 'leveldown', ref, files, (err, res) => {\n  console.log(res)\n})\n```\n\nGitHub [docs](https://developer.github.com/v3/repos/releases/#upload-a-release-asset)\n\n## Also See\n\nFor interacting with other parts of the GitHub API, check out the modules below.\n\n* [`ghissues`](https://github.com/rvagg/ghissues)\n* [`ghusers`](https://github.com/rvagg/ghusers)\n* [`ghteams`](https://github.com/rvagg/ghteams)\n* [`ghrepos`](https://github.com/rvagg/ghrepos)\n* [`ghpulls`](https://github.com/rvagg/ghpulls)\n* [`ghauth`](https://github.com/rvagg/ghauth)\n* [`ghutils`](https://github.com/rvagg/ghutils)\n\n## License\n\nMIT\n","publish_time":1539715538105,"_cnpm_publish_time":1539715538105,"dist-tags":{"latest":"3.0.2"}}