{"name":"ghreleases","version":"3.0.0","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","xtend":"~4.0.0"},"devDependencies":{"standard":"^12.0.0","tape":"^4.5.1"},"engines":{"node":">=6"},"gitHead":"7ae9230cf1265b565d5cc99192be94f2591337f2","bugs":{"url":"https://github.com/ralphtheninja/ghreleases/issues"},"homepage":"https://github.com/ralphtheninja/ghreleases#readme","_id":"ghreleases@3.0.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-lf9Ydx/D8nr6UYlF2f5IUpfRzp+QQkqQWo9PJLrDhMrHjppxzQSDZPkvX9rre1aEDG/BURtI645K0fRbcvBhiw==","shasum":"314a96becd51361104dfcb84f069d0dcea8f5fbf","tarball":"http://registry-npm.ywwl.com/ghreleases/download/ghreleases-3.0.0.tgz","fileCount":6,"unpackedSize":37062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbhn+xCRA9TVsSAnZWagAABeAQAIP7iEh5LXhjY2IykLq1\n42PoNs8mTAmzUY03tSTzJYhImuZJ1iZOOv6tWsgCVqSF3HKDFD6q8wznYoHT\nsHGEGWGQxvmCixbTltTKQM3GIOiC34fM64XdLfuJyTzCfJm6I5eoKFhaOb85\nDSG7+q46hkKXdbD9Ypa1KD2kJ78ERcI5jXy3Ea3X/83O5XAqGEwHvRw03S6C\n14tt04B6MCcdz2NeuY/fSrGfggZeCB7Kgc9jlXCDjcLLJcc6zo5IqPIDYRTK\nB/69bTLKpONyEcTlGHxfy8Kls1qfPgyBnGR6NV8dDBFmRvDzIpIb3RPuRbbp\na4NqEwukzbZpl0sMubFWRck+q88FbcaP7dAS99rak/y+14hArFKgxWQibsmW\nHsVSP5Nj+FCukXcOH4G3NsxWWVaCi0GxQmKSCCJij9wZk2QEuF+zWqmtHqHh\niEZ4iUh2wirql161LFb0KMEyfa2i6k6z1CcAoE47J5fvvbN2NIJ2i/vLKAIg\n0048EeY1KDLUZvo/OjZDwqmZHtK6AvdpQFGDVxPGCCA3NWW412+eAoCeHX+W\nLK/s83Z3ZoPibyBBR4atmJfP4S332RBylAtxo5qYFtG6PPyQ/eVYuzrNc4j4\nDau1G2eYTN9QDR4yk+vnUa/7W2xwOdD3k9A9uR6uyOPMRcEvAlG70a5NlvTH\nZ5tq\r\n=iYSO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHyKv1UwZfw/Cf6x12x8Dx0u5/jCnGQabrCQ8cpYib3sCICOwj9RB5c9GqEuxbSBAgWNlYwCD2HePbACtDE6640AE"}],"size":28217,"noattachment":false,"key":"/ghreleases/-/ghreleases-3.0.0.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.0_1535541168926_0.903355388631703"},"_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":1535541169069,"_cnpm_publish_time":1535541169069,"dist-tags":{"latest":"3.0.2"}}