{"name":"ghreleases","version":"2.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","xtend":"~4.0.0"},"devDependencies":{"standard":"^11.0.0","tape":"^4.5.1"},"engines":{"node":">=4.0.0"},"gitHead":"6c9dcb834591c286f1aea14b8ef4f8594b3844c7","bugs":{"url":"https://github.com/ralphtheninja/ghreleases/issues"},"homepage":"https://github.com/ralphtheninja/ghreleases#readme","_id":"ghreleases@2.0.2","_npmVersion":"6.2.0","_nodeVersion":"10.8.0","_npmUser":{"name":"ralphtheninja","email":"ralphtheninja@riseup.net"},"dist":{"integrity":"sha512-532plx7BQvHnc6Xg2cuFtU1lAcfZjyKdGc7oSDhAw8lOOeISZzIPFNtVVymCx9txCPgx0wmUCdTYZfjvFgChWA==","shasum":"780f4db6c8cad3e4042ca5b53fee84c9dfea9aa8","tarball":"http://registry-npm.ywwl.com/ghreleases/download/ghreleases-2.0.2.tgz","fileCount":6,"unpackedSize":37078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbaVofCRA9TVsSAnZWagAAcGMP/1oLBCNEyYyEFPjmhGyu\ns6Itdw6EvUgTbz+eLtNj7tJcUO2tl8cHOUlDiqhFshtrhiJcAGiw27H1zJNF\naIJPiUdcNW3ZjDx+rNrFJIFlS97oHYfVcobJ8Ic6r5aH6VKC8i/9zDpFQ+n0\nG5KPOvoFQMxigr13msEM2vDkMEqptqeHOxCZ+xqzZ2SNgqijE90MoEfvbM8d\nmmjTexuMEgXsAWWqrSFy5ppw2TaJWEDO7pEE3ZkAbveiznRMNJZoZbRdZUD2\n/4C6JApnLm7qBZmKwPcU/RNoaJYTFpNMdd5kK4qnPxgrIM7eCOnsfyXbBR/M\naEkzAgnzxDBO/v9D9FRCMRX4ndWGO3j9wqoSuqsDvc4F8QxqbmLsV627NS91\njftRIH0+rlh5llvIMKNikIu3JtY7eoQYJNSq8IDR9FMerfSuf370uhR+P9lE\n0HtMiyE6quvCn/w4S+gyWS/CmF1P03CmBr6bIgHGD533n+Zek5iDxFLvZmwR\nJProqYTCExW9uAYwlFyul/C3MqBaSp5aPXj0UT/M+lKyGM1a6rkz4UuopRW7\nCyKwgSivgYDAZO6ca48BZ4z6N+wuCRdrw8VmCSc8032Nxa4wm30PqONlmw4C\nvUcRvVCSPZtCKBVvHu2z/OAiF8R5LcTxAYxSvUc43XRdOXnLjfYu0iUtyUhR\nWqXz\r\n=Z3Qe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGm/q0UD7gjmE3Ghm4x4M9S65NEYMKfoIIXRre9oYckQIhAPY1RGheFFH+X3Pm5LXQ88eaGr/SmOhABVROzrgUWg2k"}],"size":28222,"noattachment":false,"key":"/ghreleases/-/ghreleases-2.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_2.0.2_1533631006814_0.8406182624622527"},"_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":1533631006911,"_cnpm_publish_time":1533631006911,"dist-tags":{"latest":"3.0.2"}}