{"_id":"@brunoalbuquerque/twitter.ts","name":"@brunoalbuquerque/twitter.ts","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@brunoalbuquerque/twitter.ts","version":"0.1.0","author":{"name":"Bruno Albuquerque","email":"bruno.felipe.albuquerque@gmail.com"},"description":"Another fork of twitter.js","main":"./dist/index.js","types":"./dist/types/index.d.ts","scripts":{"build":"tsc -p tsconfig.json && tsc -p tsconfig.declaration.json","build:dev":"tsc -w","doc":"typedoc --json docs/typedoc-out.json src/index.ts && node scripts/DocsBuilder.mjs","test":"vitest","prepare":"husky","lint:check":"eslint . --ext .js,.ts","lint:fix":"eslint . --ext .js,.ts --fix","format:check":"prettier --check .","format:fix":"prettier --write .","changelog":"git-cliff --output CHANGELOG.md","prepublishOnly":"npm run build"},"dependencies":{"@discordjs/collection":"^2.1.0","@sapphire/async-queue":"^1.5.2","@typescript-eslint/eslint-plugin":"^7.9.0","@typescript-eslint/parser":"^7.9.0","oauth-1.0a":"^2.2.6","twitter-types":"^0.26.0","undici":"^6.16.1"},"devDependencies":{"@commitlint/cli":"^19.3.0","@commitlint/config-angular":"^19.3.0","@discordjs/ts-docgen":"^0.4.1","@types/node":"^20.12.12","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","git-cliff":"^2.2.2","husky":"^9.0.11","lint-staged":"^15.2.2","prettier":"^3.2.5","typedoc":"^0.25.13","typescript":"^5.4.5","vitest":"^1.6.0"},"engines":{"node":">=16.0.0","npm":">=7.0.0"},"repository":{"type":"git","url":"git+https://github.com/twitterjs/twitter.js.git"},"bugs":{"url":"https://github.com/twitterjs/twitter.js/issues"},"license":"Apache-2.0","homepage":"https://github.com/twitterjs/twitter.js#readme","keywords":["twitter.js","twitter","tjs","typescript","bots","api"],"gitHead":"e636128b523a130a43dc9b2aa3d036c0d1fb0a71","_id":"@brunoalbuquerque/twitter.ts@0.1.0","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-dOsYtLXqOO/JGRIq/V65FTeU1EIJw0ziO3SQ0UtR/B8KiGW+YeKr628iFO/iWn7/5vaJMMP3LlNr2Ldwab2fhQ==","shasum":"59b6eaaca148997a91a89bfc070a66e316d24c29","tarball":"https://registry.npmjs.org/@brunoalbuquerque/twitter.ts/-/twitter.ts-0.1.0.tgz","fileCount":281,"unpackedSize":593480,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDB0e2UYO028eu0AG9sMtHDBK1JAhYE5xKcSftL6gAY2gIhAPXFUM6ceArpfJn34oaFZ/4R6Yhg9+3a3iAYtk+vejvm"}]},"_npmUser":{"name":"brunoalbuquerque","email":"bruno.felipe.albuquerque@gmail.com"},"directories":{},"maintainers":[{"name":"brunoalbuquerque","email":"bruno.felipe.albuquerque@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/twitter.ts_0.1.0_1715946107094_0.0524353642216433"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-17T11:41:46.991Z","0.1.0":"2024-05-17T11:41:47.267Z","modified":"2024-05-17T11:41:47.509Z"},"maintainers":[{"name":"brunoalbuquerque","email":"bruno.felipe.albuquerque@gmail.com"}],"description":"Another fork of twitter.js","homepage":"https://github.com/twitterjs/twitter.js#readme","keywords":["twitter.js","twitter","tjs","typescript","bots","api"],"repository":{"type":"git","url":"git+https://github.com/twitterjs/twitter.js.git"},"author":{"name":"Bruno Albuquerque","email":"bruno.felipe.albuquerque@gmail.com"},"bugs":{"url":"https://github.com/twitterjs/twitter.js/issues"},"license":"Apache-2.0","readme":"<div align=\"center\">\n  <p>\n    <a href=\"https://github.com/twitterjs/twitter.js\"><img src=\"https://raw.githubusercontent.com/twitterjs/guide/main/src/.vuepress/public/branding/banner_small.png\" title=\"Twitter.js\" alt=\"twitter.js github\" /></a>\n  </p>\n  <p>\n    <a href=\"https://discord.gg/f5Pefuskx4\"><img src=\"https://img.shields.io/discord/791722432896434237?color=5865F2&label=discord&logo=discord&logoColor=white&style=flat-square\" alt=\"twitter.js official discord server\" /></a>\n    <a href=\"https://www.npmjs.com/package/twitter.js\"><img src=\"https://img.shields.io/npm/v/twitter.js?color=ff2511&style=flat-square\" alt=\"NPM version\" /></a>\n    <a href=\"https://www.npmjs.com/package/twitter.js\"><img src=\"https://img.shields.io/npm/dt/twitter.js?color=1DB954&style=flat-square\" alt=\"NPM downloads\" /></a>\n    <a href=\"https://developer.twitter.com/en/docs/twitter-api/early-access\"><img src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Ftwbadges.glitch.me%2Fbadges%2Fv2&style=flat-square\" alt=\"Twitter API v2\" /></a>\n  </p>\n</div>\n\n# Twitter.js\n\nA Node.js and TypeScript library for interacting with Twitter API v2\n\n## Installation\n\n```bash\nnpm i twitter.js\n```\n\n## Usage\n\n🚀 Fetch details about a twitter user in no time:\n\n```js\nimport { Client } from 'twitter.js';\nimport { bearerToken } from './secrets.js';\n\nconst client = new Client();\nawait client.loginWithBearerToken(bearerToken);\n\nconst user = await client.users.fetchByUsername('iShiibi');\nconsole.log(user.description); // Contributing to open-source 🌐\n```\n\n🔒 Make [`user-context`](https://developer.twitter.com/en/docs/authentication/oauth-1-0a) authorized requests without any hassle:\n\n```js\nimport { Client } from 'twitter.js';\nimport { credentials } from './secrets.js';\n\nconst client = new Client();\nawait client.login(credentials);\n\nconst tweet = await client.tweets.fetch('1336749579228745728');\nawait tweet.like();\n```\n\n📈 Want real-time events listening? We got you covered:\n\n```js\nimport { Client } from 'twitter.js';\nimport { credentials } from './secrets.js';\n\nconst client = new Client({ events: ['FILTERED_TWEET_CREATE'] });\nawait client.login(credentials);\n\nawait client.filteredStreamRules.create({ value: '@tjs_test' });\n\nclient.on('filteredTweetCreate', async tweet => {\n\tconsole.log(tweet.text); // hey @tjs_test, like this tweet if you're listening!\n\tawait tweet.like();\n});\n```\n\n## Future\n\nThe `twitter.js` library is not ready for production use yet. You can expect breaking changes without any major version bump until we release `v1.0.0` of the library.\n","readmeFilename":"README.md"}