{"_id":"@carlos0934/clickup","name":"@carlos0934/clickup","dist-tags":{"latest":"3.1.9"},"versions":{"3.1.9":{"name":"@carlos0934/clickup","version":"3.1.9","description":"A Node.js typescript wrapper for the Clickup API","main":"dist/index.js","keywords":["clickup","clickupjs","clickup-js","clickup.js","api","typescript","wrapper","wrapper-api"],"scripts":{"build":"tsc","test":" mocha -r ts-node/register 'test/**/*.ts'","lint":"eslint src test --fix","format":"prettier --write ."},"dependencies":{"form-data":"^4.0.0","got":"^11.8.2"},"devDependencies":{"@types/chai":"^4.3.1","@types/mocha":"^9.1.1","@types/node":"^17.0.34","@types/sinon":"^10.0.11","chai":"^4.3.6","eslint":"^8.4.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-prettier":"^4.0.0","mocha":"^9.2.2","prettier":"^2.5.1","sinon":"^12.0.1","ts-node":"^10.7.0","ts-node-dev":"^1.1.8","typescript":"^4.6.4"},"author":{"name":"@ComfortablyCoding"},"repository":{"type":"git","url":"git+https://github.com/ComfortablyCoding/clickup.js.git"},"homepage":"https://github.com/ComfortablyCoding/clickup.js#readme","bugs":{"url":"https://github.com/ComfortablyCoding/clickup.js/issues"},"license":"MIT","types":"./dist\\index.d.ts","gitHead":"481e29066cef65773121747585f861af23ff9275","_id":"@carlos0934/clickup@3.1.9","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Wveyp1m/kM2kztCRE1fumZyHFeih51/E+CPWvcbIGAuue0KcXbTWRh8Mui4zxEXakJNz17iWZmnXBISCUHjAYw==","shasum":"ec1172f13732f263ed985c9f6ba172472f55e9b5","tarball":"https://registry.npmjs.org/@carlos0934/clickup/-/clickup-3.1.9.tgz","fileCount":67,"unpackedSize":177097,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIUdZPCwhAssaLYPPeVRGNaEOsF8HfQqaqSrSM5NS6XQIhANNxC799k8GBTt6MB+P4+D3XweytTinQ5rk5r5HUR+o0"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJig/49ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoVxBAAlCSwSeWzYxjgPs9/csXj4sHwMmh0pAzQ0Rzz/IoJ9clmmPmz\r\n5v/vfnv8J1Av4fvBH0dWpmOlK31G/EzzxD56Kz0xRltbnJNWO9cq4k4fSj8b\r\nHw/B9ZNDpubZsHkKUnA/kgNebCpJ9oivdf/bS+ypKuTxu8oBno0r1P3CQuMn\r\nZsGJhI7agUAjajpqT3i7P1Btk9TjrsCjE1vdi8DqvMm5RSbQUnoSbJIdNgc2\r\nKwYCFRgEcPsI42O9kQ8lyJZuR848zatLBAs/+GUO9bveVXNdn7tobSJx0OYr\r\nsUuuVTY9MEYzRZ6w3O8YJXyLTcJNTbAi3liK3CybD8B1iUKFBuqesgftOQpb\r\nFYUyHItWHip9CbzwieiVMxrUtKEdKQz1nl0bkSK9mEOxMs1R9AVBurlFSWFe\r\nyxJUrj8IlC5BKsbd+d8mCg76ddBZsL0E2IDJeXPznWMOi0kU2pYkzBbBu8MU\r\n0Ka2IDSrlLRC8q7seD+4H5O1hlJI+mSjr4aeSJIn9h0RmavVYkStpyo4Lhi+\r\n+mZLiqDEnH7u8OnOKIt1ehckhDNiMQU1ESNzeMOpuo3GwoQeGOYFRkv7iXLk\r\nZxYr7k48EzFWcNSyBud/TpcRdhCme5u0vgA7FBUJNGKQIpR4xwzqABeNTBGb\r\nHt6L5SNDQzvdJg1m+7z1MKCcu+l7m8H+BMo=\r\n=pach\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"carlos0934","email":"carlosengel011@gmail.com"},"directories":{},"maintainers":[{"name":"carlos0934","email":"carlosengel011@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/clickup_3.1.9_1652817469573_0.7601820877164347"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-17T19:57:49.487Z","3.1.9":"2022-05-17T19:57:49.739Z","modified":"2022-05-17T19:57:49.868Z"},"maintainers":[{"name":"carlos0934","email":"carlosengel011@gmail.com"}],"description":"A Node.js typescript wrapper for the Clickup API","homepage":"https://github.com/ComfortablyCoding/clickup.js#readme","keywords":["clickup","clickupjs","clickup-js","clickup.js","api","typescript","wrapper","wrapper-api"],"repository":{"type":"git","url":"git+https://github.com/ComfortablyCoding/clickup.js.git"},"author":{"name":"@ComfortablyCoding"},"bugs":{"url":"https://github.com/ComfortablyCoding/clickup.js/issues"},"license":"MIT","readme":"# clickup.js\n\nA Node.js wrapper for the [Clickup API](https://clickup.com/api).\n\n[![Downloads](https://img.shields.io/npm/dm/clickup.js.svg?style=for-the-badge)](https://www.npmjs.com/package/clickup.js)\n[![Install size](https://img.shields.io/bundlephobia/min/clickup.js?style=for-the-badge)](https://packagephobia.now.sh/result?p=clickup.js)\n![Package version](https://img.shields.io/github/package-json/v/ComfortablyCoding/clickup.js?style=for-the-badge)\n\n## Install\n\n```sh\nnpm install clickup.js\n```\n\nor\n\n```sh\nyarn add clickup.js\n```\n\n## Usage\n\nBefore you can use this library you will need to first authenticate with the Clickup API and obtain an `Access Token`. You can read how to do so at the [Clickup API docs](https://clickup.com/api).\n\nIn your project, initialize an instance of clickup.js:\n\n```js\nconst { Clickup } = require('clickup.js');\nconst token = '...'; // API access token\nconst clickup = new Clickup(token);\n```\n\nOnce you've created an instance, you can use it to access all the features provided by the wrapper, the following example fetches a task by id and displays the response to the console:\n\n```js\n(async () => {\n\ttry {\n\t\t// get a specific task\n\t\tconst { body } = await clickup.tasks.get('9hz');\n\t\tconsole.log(body);\n\t} catch (error) {\n\t\tif (error.response) {\n\t\t\t// The request was made and the server responded with a status code\n\t\t\t// that falls out of the range of 2xx\n\t\t\tconsole.log(error.response.body);\n\t\t\tconsole.log(error.response.statusCode);\n\t\t\tconsole.log(error.response.headers);\n\t\t} else if (error.request) {\n\t\t\t// The request was made but no response was received\n\t\t\tconsole.log(error.request);\n\t\t} else {\n\t\t\t// Something happened in setting up the request that triggered an Error\n\t\t\tconsole.log('Error', error.message);\n\t\t}\n\t\tconsole.log(error.options);\n\t}\n})();\n```\n\n**Note:** Due to the HTTP request library being used each error contains an `options` property which are the options Got used to create a request - just to make debugging easier. Additionally, the errors may have `request` and `response` properties depending on which phase of the request failed. Read more about HTTP request library [Got](https://github.com/sindresorhus/got).\n\n## Important Note\n\nThe library is structured to match classes with their respective routes, **NOT** how they are sectioned in the Clickup API docs. For example adding a guest to a task is under the `Tasks` class instead of the `Guests` class as its route is via `task` and not `guest`. Due to this a request to add a guest to a task will look like so:\n\n```js\n(async () => {\n\ttry {\n\t\t// guest data\n\t\tconst guestData = {\n\t\t\tpermission_level: 'read',\n\t\t};\n\t\t// add guest to task\n\t\tconst { body } = await clickup.tasks.addGuest('c04', 403, guestData);\n\t\tconsole.log(body);\n\t} catch (error) {\n\t\tif (error.response) {\n\t\t\t// The request was made and the server responded with a status code\n\t\t\t// that falls out of the range of 2xx\n\t\t\tconsole.log(error.response.body);\n\t\t\tconsole.log(error.response.statusCode);\n\t\t\tconsole.log(error.response.headers);\n\t\t} else if (error.request) {\n\t\t\t// The request was made but no response was received\n\t\t\tconsole.log(error.request);\n\t\t} else {\n\t\t\t// Something happened in setting up the request that triggered an Error\n\t\t\tconsole.log('Error', error.message);\n\t\t}\n\t\tconsole.log(error.options);\n\t}\n})();\n```\n\n## Documentation\n\nYou can read the library documentation at the [clickup.js docs](https://clickup-js.netlify.app)\n\n## Features\n\nThe available features are:\n\n- `Authorization`\n- `Checklists`\n- `Comments`\n- `Folders`\n- `Goals`\n- `KeyResults`\n- `Lists`\n- `Spaces`\n- `Tasks`\n- `Teams`\n- `Views`\n- `Webhooks`\n\n## Disclaimer\n\nThe [clickup.js](https://github.com/ComfortablyCoding/clickup.js) package is **unofficial** and therefor not endorsed or affiliated with ClickUp or it's subsidiaries.\n","readmeFilename":"README.md"}