{"_id":"topics","_rev":"4-54c25861da66024a85917b487825f0d6","name":"topics","description":"Get and update GitHub repository topics.","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"topics","description":"Get and update GitHub repository topics.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/topics","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/topics.git"},"bugs":{"url":"https://github.com/jonschlinkert/topics/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.1.0","github-base":"^0.5.4","isobject":"^3.0.1"},"devDependencies":{"minimist":"^1.2.0","data-store":"^1.0.0","mocha":"^3.5.0","gulp-format-md":"^1.0.0"},"keywords":["topics"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"_id":"topics@0.1.0","_npmVersion":"5.3.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"integrity":"sha512-e5/lz6nOXDBvjHZorL22IIFgXWfNTuz1tyD/i7hlJJuX3s5b6x3QrjUzAuDQ2dSIegF/TsjgCa674FKmIhR47g==","shasum":"08fed52528d4b5e9b664d438512a529a3b1a3800","tarball":"https://registry.npmjs.org/topics/-/topics-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHNO9FLwazjYkbC4VtSpRP7eSdpOceQvMZNBAiYLnhIZAiEA489ZFMWOM8wy3BoPa5GJbzE+7zuHI0b2cStJbPoBJa8="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topics-0.1.0.tgz_1502656927222_0.44023565808311105"}},"0.1.1":{"name":"topics","description":"Get and update GitHub repository topics.","version":"0.1.1","homepage":"https://github.com/jonschlinkert/topics","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/topics.git"},"bugs":{"url":"https://github.com/jonschlinkert/topics/issues"},"license":"MIT","files":["index.js","example.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.1.0","github-base":"^0.5.4","isobject":"^3.0.1"},"devDependencies":{"minimist":"^1.2.0","data-store":"^1.0.0","mocha":"^3.5.0","gulp-format-md":"^1.0.0"},"keywords":["topics"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true}},"_id":"topics@0.1.1","_npmVersion":"5.3.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"integrity":"sha512-DQN7mfA2EfJjTBOFh9v/BK88LQWj2NcnRsfWYAOmRjFGwbBcm41s5aMDDt9XdZxYytcLRD4u0looblJUItmCAw==","shasum":"131de1546dbd0b67172bc756908f5703184a801b","tarball":"https://registry.npmjs.org/topics/-/topics-0.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID4g1WsnU6I5Pj8802/vw68oNidbfIieMkIGSbycr+vNAiBJSu6EZkLsNXV8broT5lhOwLdeLwXWfvgC6oulg07deg=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topics-0.1.1.tgz_1503190186170_0.2248164841439575"}},"1.0.0":{"name":"topics","description":"Get and update GitHub repository topics.","version":"1.0.0","homepage":"https://github.com/jonschlinkert/topics","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/topics.git"},"bugs":{"url":"https://github.com/jonschlinkert/topics/issues"},"license":"MIT","files":["index.js","example.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.1.0","github-base":"^0.5.4","isobject":"^3.0.1"},"devDependencies":{"minimist":"^1.2.0","data-store":"^1.0.0","mocha":"^3.5.0","gulp-format-md":"^1.0.0"},"keywords":["topics"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["github-base","github-contributors","github-metadata","github-traffic","repos"]},"lint":{"reflinks":true}},"gitHead":"3019b74d09b8fb771284028d3525486bb10188bc","_id":"topics@1.0.0","_npmVersion":"5.3.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"integrity":"sha512-rkyBNTsXO2XyFT1ad54wPAjI6l38vyGez8CroYf5w8vLitQl2Q22BltLybe2DLQQCiydsnyT2m2XZFIo8whOwQ==","shasum":"403a2c5a35d4e3402a72f2e3a93cd13a5f2826ef","tarball":"https://registry.npmjs.org/topics/-/topics-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCXcUYBOdxHkPSlicn71A2KYipd9Wv9L/4vcTgn+qxgAiEA1yoXVF+ga/xzNERIB9OrkkiIuPimazDx2aMgbufjFgg="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topics-1.0.0.tgz_1503345959307_0.9697425807826221"}},"1.0.1":{"name":"topics","description":"Get and update GitHub repository topics.","version":"1.0.1","homepage":"https://github.com/jonschlinkert/topics","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/topics.git"},"bugs":{"url":"https://github.com/jonschlinkert/topics/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4"},"scripts":{"test":"mocha"},"dependencies":{"arr-union":"^3.1.0","github-base":"^0.5.4","isobject":"^3.0.1"},"devDependencies":{"minimist":"^1.2.0","data-store":"^1.0.0","mocha":"^3.5.0","gulp-format-md":"^1.0.0"},"keywords":["topics"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["github-base","github-contributors","github-metadata","github-traffic","github-trees","commits","gists","repos"]},"lint":{"reflinks":true}},"gitHead":"472b2324e34d6574b36d0953c284a24141cb5c35","_id":"topics@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"integrity":"sha512-3hnmUMo1D97L9ouvfj3kesCPAibPtgU9FyfDtza3t2/fedTLvmx2+WgHXh97ekuo8Q3y2EQ++wudjH70R4EKgQ==","shasum":"4c610f886d1650acd00085e13ce687ba873bbf1a","tarball":"https://registry.npmjs.org/topics/-/topics-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVmflq2qUQ8rvNL9Rngx0OzkHpNkkbS3ujAWJxDnaP8wIgHlwnL7+rutYpcQB50naceqoAJr6DK2s/ha3FckziQxA="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/topics-1.0.1.tgz_1503351982112_0.5699035280849785"}}},"readme":"# topics [![NPM version](https://img.shields.io/npm/v/topics.svg?style=flat)](https://www.npmjs.com/package/topics) [![NPM monthly downloads](https://img.shields.io/npm/dm/topics.svg?style=flat)](https://npmjs.org/package/topics) [![NPM total downloads](https://img.shields.io/npm/dt/topics.svg?style=flat)](https://npmjs.org/package/topics) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/topics.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/topics)\n\n> Get and update GitHub repository topics.\n\nFollow this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), for updates on this project and others.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save topics\n```\n\n## Usage\n\nThis library uses [github-base](https://github.com/jonschlinkert/github-base). Visit that library's [github repository](https://github.com/jonschlinkert/github-base) for documentation about all available options and authentication options.\n\n```js\nvar topics = require('topics');\n```\n\n**Example response**\n\nStatus: 200 OK\n\n```json\n{\n  \"names\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"API\"\n  ]\n}\n```\n\n## API\n\n### [topics](index.js#L30)\n\nList all topics for a repository. The main export is a function that calls the [.get](#get) method.\n\n**Params**\n\n* `owner` **{String}**: Either `owner/repo` combination, or `owner` if `repo` is the second argument.\n* `repo` **{String|Object}**: Repository name or options.\n* `options` **{Object}**\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar options = {\n  username: 'your_username',\n  password: 'your_password'\n};\n\ntopics('micromatch/micromatch', options)\n  .then(function(topics) {\n    console.log('topics', topics);\n  })\n  .catch(console.error)\n```\n\n### [.request](index.js#L58)\n\nCreate a topics request with the given `method`, `owner`, `repo` and `options`.\n\n**Params**\n\n* `method` **{String}**\n* `owner` **{String}**: Either `owner/repo` combination, or `owner` if `repo` is the second argument.\n* `repo` **{String|Object}**: Repository name or options.\n* `options` **{Object}**\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar options = {\n  username: 'your_username',\n  password: 'your_password'\n};\n\ntopics.request('get', 'micromatch', 'micromatch', options)\n  .then(function(topics) {\n    console.log('topics', topics);\n  })\n  .catch(console.error)\n```\n\n### [.get](index.js#L109)\n\nList all topics for a repository.\n\n**Params**\n\n* `owner` **{String}**: Either `owner/repo` combination, or `owner` if `repo` is the second argument.\n* `repo` **{String|Object}**: Repository name or options.\n* `options` **{Object}**\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar options = {\n  username: 'your_username',\n  password: 'your_password'\n};\n\ntopics.get('micromatch/micromatch', options)\n  .then(function(topics) {\n    console.log('topics', topics);\n  })\n  .catch(console.error)\n```\n\n### [.put](index.js#L142)\n\nReplace all topics for a repository.\n\n**Params**\n\n* `owner` **{String}**: Either `owner/repo` combination, or `owner` if `repo` is the second argument.\n* `repo` **{String|Object}**: Repository name or options.\n* `options` **{Object}**\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar options = {\n  username: 'your_username',\n  password: 'your_password',\n\n  // new topics to use (overwrites all existing topics)\n  names: [\n    'foo',\n    'bar',\n    'baz'\n  ]\n};\n\ntopics.put('micromatch/micromatch', options)\n  .then(function(topics) {\n    console.log('topics', topics);\n  })\n  .catch(console.error)\n```\n\n### [.patch](index.js#L177)\n\nGets all topics for a repository and then replaces the existing topics with one or more additional topics defined on `options.names`. Send an empty array (`[]\n\n**Params**\n\n* `owner` **{String}**: Either `owner/repo` combination, or `owner` if `repo` is the second argument.\n* `repo` **{String|Object}**: Repository name or options.\n* `options` **{Object}**\n* `returns` **{Promise}**\n\n**Example**\n\n```js\nvar options = {\n  username: 'your_username',\n  password: 'your_password',\n\n  // new topics to use (overwrites all existing topics)\n  names: [\n    'foo',\n    'bar',\n    'baz'\n  ]\n};\n\ntopics.patch('micromatch/micromatch', options)\n  .then(function(topics) {\n    console.log('topics', topics);\n  })\n  .catch(console.error)\n```\n\n### [.normalize](index.js#L202)\n\nUtility for normalizing options. This is already used in\nnecessary places in the other request methods, but it's exposed for\nunit tests and debugging.\n\n**Params**\n\n* `owner` **{String}**\n* `repo` **{String}**\n* `options` **{String}**\n* `returns` **{Object}**: Returns the options object to use with the request methods.\n\n## About\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [commits](https://www.npmjs.com/package/commits): List the commits on a GitHub repository. | [homepage](https://github.com/jonschlinkert/commits \"List the commits on a GitHub repository.\")\n* [gists](https://www.npmjs.com/package/gists): Methods for working with the GitHub Gist API. Node.js/JavaScript | [homepage](https://github.com/jonschlinkert/gists \"Methods for working with the GitHub Gist API. Node.js/JavaScript\")\n* [github-base](https://www.npmjs.com/package/github-base): JavaScript wrapper that greatly simplifies working with GitHub's API. | [homepage](https://github.com/jonschlinkert/github-base \"JavaScript wrapper that greatly simplifies working with GitHub's API.\")\n* [github-contributors](https://www.npmjs.com/package/github-contributors): Generate a markdown or JSON list of contributors for a project using the GitHub API. | [homepage](https://github.com/jonschlinkert/github-contributors \"Generate a markdown or JSON list of contributors for a project using the GitHub API.\")\n* [github-metadata](https://www.npmjs.com/package/github-metadata): Gather GitHub metadata about a repository. | [homepage](https://github.com/doowb/github-metadata \"Gather GitHub metadata about a repository.\")\n* [github-traffic](https://www.npmjs.com/package/github-traffic): Get the Github traffic for the specified repository | [homepage](https://github.com/doowb/github-traffic \"Get the Github traffic for the specified repository\")\n* [github-trees](https://www.npmjs.com/package/github-trees): Get a tree from a GitHub repository. | [homepage](https://github.com/jonschlinkert/github-trees \"Get a tree from a GitHub repository.\")\n* [repos](https://www.npmjs.com/package/repos): Pull down a list of GitHub repositories for the specified user or org, and save… [more](https://github.com/jonschlinkert/repos) | [homepage](https://github.com/jonschlinkert/repos \"Pull down a list of GitHub repositories for the specified user or org, and save to a local JSON file.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 10 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 2 | [doowb](https://github.com/doowb) |\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 21, 2017._","maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2022-05-22T01:46:04.169Z","created":"2017-08-13T20:42:08.135Z","0.1.0":"2017-08-13T20:42:08.135Z","0.1.1":"2017-08-20T00:49:47.106Z","1.0.0":"2017-08-21T20:06:00.266Z","1.0.1":"2017-08-21T21:46:23.119Z"},"homepage":"https://github.com/jonschlinkert/topics","keywords":["topics"],"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/topics.git"},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"bugs":{"url":"https://github.com/jonschlinkert/topics/issues"},"license":"MIT","readmeFilename":"README.md"}