{"name":"ghreleases","version":"3.0.2","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":"6d8929d4e8c35379ccfdf75f64d04175a58d1837","bugs":{"url":"https://github.com/ralphtheninja/ghreleases/issues"},"homepage":"https://github.com/ralphtheninja/ghreleases#readme","_id":"ghreleases@3.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-QiR9mIYvRG7hd8JuQYoxeBNOelVuTp2DpdiByRywbCDBSJufK9Vq7VuhD8B+5uviMxZx2AEkCzye61Us9gYgnw==","shasum":"1bdb6d31ec03a24a0d80f58f5e9a84a4db725818","tarball":"http://registry-npm.ywwl.com/ghreleases/download/ghreleases-3.0.2.tgz","fileCount":7,"unpackedSize":38102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/bCaCRA9TVsSAnZWagAANngQAIvoICJAtKf+B8eOovxC\nBx9xjRS5cu6A5AZPqPthXu9KSH30jnXa5KaEGp0llyoUYg6qmcNCh1BKNAab\nvNH1Jy4gokb6ahWIpuBS7LwVleDoaag/FdlaYkYEZWH42ib8terwHGK9ae42\nGZaFY9ZIq9AxRCxk5LZq+YETPpTZTKIYfQT0DBHmWx9t+CJzPKXawzqYwtLQ\nrKOwi8GTU7ZkCh7X8Q7qK3pYE7JXhXukoaQvgQPKgjE1lIU7L1gxQZVgoL+k\nbapxA6wcMMv5xmZ2c+PRcG18Ed9mCGcy0+gi7g8O5lD2ajS5gIW1qWX+8jvt\nZNPxasEqB0oOzJba0IU6d1QGhZclQqM80jgLgZKjdkOOUWDjhUZlGjRZ+6De\nUieHrfF3Rs1k/UA5LKzvQ3JysC++YJxqKsaQ2tEUZ7/yqSmCK9AXjEgoA5Tz\nAUt2y+154lqpHmNyWI6XcBIm3uumUeOv7XTcOtmgnpW+VA7rna2I7lhxh+2W\nF3i7/QApdCEpfWGdBE/E1iiTUz3suaPpLHQ9jXJNb2teLibvwvdPD+KgN0rI\nS5ivN9gAzqP1S6erplfuYQ3cCWVtGvDjRTngNTgdOpPdaBvqSygR1BtFkUQ+\nJ1wUe62pREpH8y/Tp2ipVSCH81TMF2EF6/jyW9X1kt3zQrHQGpB+hSp4CJNf\n3L2p\r\n=PIu8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHeYx2Jeec4OHoY5lwbD+FNp//4IZrqI7IaRR4W44fRaAiAXFR8HugwHHQEUNKmhN8AwlK8Oy3hSYmGAkHHmwNT3OA=="}],"size":28977,"noattachment":false,"key":"/ghreleases/-/ghreleases-3.0.2.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.2_1543352472370_0.15803157822804925"},"_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":1543352473082,"_cnpm_publish_time":1543352473082,"dist-tags":{"latest":"3.0.2"}}