{"bugs":{"url":"https://github.com/tanepiper/node-bitly/issues"},"dist":{"shasum":"69ceb784aeb31cfad35fdab9e7c5b0e3849ddee2","tarball":"https://registry.npmjs.org/bitly/-/bitly-5.1.6.tgz","fileCount":16,"integrity":"sha512-/fKkRKId887cdEDYNetjLxSzIznIxlWvPwOS2SEuS1p4+1601dtyN99v4T3ZklvROYUiJfYnXc3cfpsACZSPdw==","signatures":[{"sig":"MEQCIGXxqoYWCp2IwWxscpNpkAf2hylGujaNG242MeQ6oFIDAiABpl2siGgHxv3huV3jW8oXUAaWH8xhUUd2EXjWc9z2Iw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":74288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIRvqCRA9TVsSAnZWagAATR8P/3qEDzeho5c/BlVAlyf1\nSjQaE6REYuj7li0VsVajZTzBGMh90PTF/ow9lmUnCgEacPJgiRFTmqG2KE+A\nGhnZEYKAyumLcWJkPoy1TmaRCd8nhB7j0MuvWQHVRUxZ2eUPtPR3xlTRrDoj\nWHq0YqQxyhYxT+o4JqoU7EmFQJQRSZSFRe8QOCf3Fhyqm61MeqHDpfcm+6ua\njLb6jR0ZNtnQ4zWwQTPRJrXplbutLSikXQWpGbguO5dCAsNafIJAKFoux9rs\nszvkWWwd5I+UFbnapiZsB9LPaos3zn2MIVSqL/EEc65Y6OzeBRkB8tMjw4ue\nyhl1DvjOSpZj1icskAbacXHqCd0NdRx1KP3C/IxjDYdDP7fAa9o34agCXi6Z\nBPhWGK5kI0MwP58muqRcquEsjUm2r6mnyr6zcKpHtTi1ctxBu/KggB1v0Nqf\n66M7veDJSvekHojCUVYlbd8YaOdCYmctLtNgq5VtN/rhWzzD+3D5ht/tJ1Lx\nrxXDzd127yzRnNBFDYCgWqJxSEusAjV98rX8DJxknp3NmcD200Chc4/kk1Af\nUvDU+dLyVQmN3sFaMTLu+zXi+KeGNuo4VCUUYZG+4SqhlaYOjX+8sBLJ8cac\nTxwDZrvn9fshqUolV5/0p9KErUVlsvl9MGgfzRkdCjNvTWH245hT80m0OY9y\nMidA\r\n=BOHz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/bitly.js","name":"bitly","author":{"url":"https://github.com/tanepiper","name":"Tane Piper","email":"piper.tane@gmail.com"},"readme":"# node-bitly - Bitly API for nodejs\n\n[![CircleCI](https://circleci.com/gh/tanepiper/node-bitly.svg?style=svg)](https://circleci.com/gh/tanepiper/node-bitly) [![NPM version](https://badge.fury.io/js/bitly.png)](http://badge.fury.io/js/bitly) [![Dependencies](https://david-dm.org/tanepiper/node-bitly.svg)](https://david-dm.org/tanepiper/node-bitly)\n\nThis module provides calls to the [Bitly](http://bitly.com) API for [Nodejs](http://nodejs.org).\nFor more information on the API request and responses visit the [Bitly API docs](http://dev.bitly.com/api.html)\n\n`node-bitly` is programmed with ES7 `async/await` but uses the `typescript` compiler to ES5, so the library has\nbeen tested back to support `node v4.8.4`\n\n## Installation\n\nTo install via NPM type the following: `npm install bitly`\n\nYou can also install via git by cloning: `git clone https://github.com/tanepiper/node-bitly.git /path/to/bitly`\n\n## Usage\n\nThis library uses the API provided by bitly and requires an OAuth token to use.\nTo get your access token, visit [OAuth Apps](https://bitly.com/a/oauth_apps) (under Generic Access Token)\n\nSee [http://dev.bitly.com](http://dev.bitly.com/) for format of returned objects from the API\n\nTo see the available libary APIs, you can view the [API Documentation](docs/api.md)\n\n### Code\n\n```js\nconst BitlyClient = require('bitly');\nconst bitly = BitlyClient('<accessToken>');\n\ntry {\n  return await bitly.shorten(uri);\n} catch(e) {\n  throw e;\n}\n```\n\nIf you are not using `node 8` then you can still use the library with `Promise` values:\n\n```js\nconst BitlyClient = require('bitly');\nconst bitly = BitlyClient('<accessToken>');\n\nbitly.shorten('https://github.com/tanepiper/node-bitly')\n.then(function(result) {\n  console.log(result);\n})\n.catch(function(error) {\n  console.error(error);\n});\n```\n\nYou can also do raw requests to any Bitly endpoint.  With this you need to pass the access\ntoken to the method\n\n```js\nconst BitlyClient = require('bitly');\nconst bitly = BitlyClient('<accessToken>');\n\ntry {\n  return await bitly.bitlyRequest('link/referrers_by_domain', {\n    link: 'https://github.com/tanepiper/node-bitly',\n    unit: 'hour',\n    timezone: 'Europe/Amsterdam'\n  });\n} catch(e) {\n  throw e;\n}\n```\n\n### Tests\n\nTo run tests type `npm test`.\n","engines":{"node":">= 4.8.0"},"gitHead":"3b84e4bfa8618b9bd58c85c7acb7b2f2f5c48dfe","license":"MIT","scripts":{"docs":"jsdoc -c jsdoc.json -R README.md","lint":"eslint --config=./.eslintrc.json src/**.js","test":"VCR_MODE=cache mocha-webpack --reporter list src/*.spec.js","build":"webpack --config=webpack.config.js","ghdocs":"jsdoc2md --configure jsdoc.json src/*.js > docs/api.md"},"_npmUser":{"name":"tanepiper","email":"piper.tane@gmail.com"},"homepage":"https://github.com/tanepiper/node-bitly","keywords":["url","bitly","shortner","util"],"deprecated":"Please use >=7.0.0 as this version no longer works with the Bitly API","repository":{"url":"git+https://github.com/tanepiper/node-bitly.git","type":"git"},"_npmVersion":"5.6.0","description":"A Bit.ly API library for Node.JS","directories":{},"maintainers":[{"name":"tanepiper","email":"piper.tane@gmail.com"}],"_nodeVersion":"8.11.2","contributors":[{"name":"Tane Piper","email":"piper.tane@gmail.com"},{"name":"François de Metz","email":"francois@2metz.fr"},{"name":"zephrax"},{"name":"jessefulton"},{"name":"coaxial","email":"coaxial@cxial.tk"},{"name":"Ildar Sagdejev","email":"specious@gmail.com"}],"dependencies":{"request":"^2.83.0","valid-url":"^1.0.9","babel-polyfill":"^6.26.0","request-promise":"^4.2.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"np":"^2.20.1","chai":"^4.1.2","jsdoc":"^3.5.5","mocha":"^4.1.0","sepia":"^2.0.2","eslint":"^4.19.1","minami":"^1.2.3","webpack":"^3.12.0","ts-loader":"^3.5.0","babel-core":"^6.26.3","typescript":"^2.9.1","jsdoc-babel":"^0.3.0","babel-eslint":"^8.2.3","mocha-webpack":"^1.1.0","@babel/preset-env":"^7.0.0-beta.51","jsdoc-to-markdown":"^3.0.4","babel-preset-es2017":"^6.24.1","webpack-node-externals":"^1.7.2","babel-plugin-transform-runtime":"^6.23.0","babel-plugin-transform-async-to-generator":"^6.24.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/bitly_5.1.6_1528896489637_0.05816092104190851","host":"s3://npm-registry-packages"},"_id":"bitly@5.1.6","version":"5.1.6"}