{"_id":"x-api-sdk","_rev":"1-cbad963fbd6d76678e5135c0ae8817f8","name":"x-api-sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"x-api-sdk","version":"0.1.0","keywords":["typescript","sdk","api","openapi","developer-tools"],"license":"Apache-2.0","_id":"x-api-sdk@0.1.0","maintainers":[{"name":"jmartinn","email":"juamp_m@hotmail.com"}],"homepage":"https://github.com/jmartinn/x-api-typescript-sdk#readme","bugs":{"url":"https://github.com/jmartinn/jmartinn-api-typescript-sdk/issues"},"dist":{"shasum":"4c78eb3107f2f407bb1c6ff2da31888f244ad91f","tarball":"https://registry.npmjs.org/x-api-sdk/-/x-api-sdk-0.1.0.tgz","fileCount":39,"integrity":"sha512-YqXbJieT1nJm4gRc/UDhaF5bRGsYPa9yoE/91pPq5p6bRNdiYbuWa50FjgKZCBZOSIU5Z8IDSaGl3PcTSX1Fpg==","signatures":[{"sig":"MEUCIQCZYOn2VKKxfbqJUNHhq4AN/x5aT4gir6YCv/EAjkrTIAIgS2xF0dVDt1JdnVzh0C+UHwoJVu+EZ1hcsOGYBVYcyqY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":648229},"jest":{"preset":"ts-jest","testEnvironment":"node"},"main":"build/index.js","type":"module","_from":"file:x-api-sdk-0.1.0.tgz","types":"build/index.d.ts","engines":{"node":">=14"},"scripts":{"lint":"eslint . --ext .ts,.tsx","test":"jest","build":"tsc","check":"pnpm run format:check && pnpm run lint","clean":"rm -rf build","format":"prettier --write \"src/**/*.{ts,tsx}\"","generate":"ts-node scripts/generate.ts","lint:fix":"eslint . --ext .ts,.tsx --fix","prebuild":"pnpm clean","build:watch":"tsc --watch","format:check":"prettier --check \"src/**/*.{ts,tsx}\""},"_npmUser":{"name":"jmartinn","email":"juamp_m@hotmail.com"},"_resolved":"/private/var/folders/89/jhp2dbq51gx5y6dz84jv90sh0000gn/T/2683a4cc1543c83213667d55f772a368/x-api-sdk-0.1.0.tgz","_integrity":"sha512-YqXbJieT1nJm4gRc/UDhaF5bRGsYPa9yoE/91pPq5p6bRNdiYbuWa50FjgKZCBZOSIU5Z8IDSaGl3PcTSX1Fpg==","repository":{"url":"git+https://github.com/jmartinn/x-api-typescript-sdk.git","type":"git"},"_npmVersion":"10.9.0","description":"A TypeScript SDK for the X API","directories":{},"_nodeVersion":"22.12.0","dependencies":{"node-fetch":"^2.6.1","abort-controller":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.5.1","nock":"^13.2.4","eslint":"^8","ts-jest":"^27.0.3","ts-node":"^10.9.1","prettier":"^3.4.2","typescript":"^4.4.4","@types/jest":"^27.4.1","@changesets/cli":"^2.27.11","@commitlint/cli":"^19.6.1","@types/node-fetch":"^2.6.1","openapi-typescript":"^5.4.1","eslint-plugin-import":"^2.31.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.2.1","@typescript-eslint/parser":"^8.18.2","@changesets/changelog-github":"^0.5.0","@commitlint/config-conventional":"^19.6.0","@typescript-eslint/eslint-plugin":"^8.18.2","@apidevtools/json-schema-ref-parser":"^9.0.9"},"_npmOperationalInternal":{"tmp":"tmp/x-api-sdk_0.1.0_1735606652952_0.6917315608846564","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"x-api-sdk","version":"0.1.1","description":"A TypeScript SDK for the X API","keywords":["typescript","sdk","api","openapi","developer-tools"],"homepage":"https://github.com/jmartinn/x-api-typescript-sdk#readme","bugs":{"url":"https://github.com/jmartinn/jmartinn-api-typescript-sdk/issues"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/jmartinn/x-api-typescript-sdk.git"},"main":"build/index.js","types":"build/index.d.ts","engines":{"node":">=14"},"dependencies":{"abort-controller":"^3.0.0","node-fetch":"^2.6.1"},"devDependencies":{"@apidevtools/json-schema-ref-parser":"^9.0.9","@changesets/changelog-github":"^0.5.0","@changesets/cli":"^2.27.11","@commitlint/cli":"^19.6.1","@commitlint/config-conventional":"^19.6.0","@types/jest":"^27.4.1","@types/node-fetch":"^2.6.1","@typescript-eslint/eslint-plugin":"^8.18.2","@typescript-eslint/parser":"^8.18.2","eslint":"^8","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.31.0","eslint-plugin-prettier":"^5.2.1","jest":"^27.5.1","nock":"^13.2.4","openapi-typescript":"^5.4.1","prettier":"^3.4.2","ts-jest":"^27.0.3","ts-node":"^10.9.1","typescript":"^4.4.4"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"scripts":{"build":"tsc","build:watch":"tsc --watch","prebuild":"pnpm clean","generate":"ts-node scripts/generate.ts","lint":"eslint . --ext .ts,.tsx","lint:fix":"eslint . --ext .ts,.tsx --fix","format":"prettier --write \"src/**/*.{ts,tsx}\"","format:check":"prettier --check \"src/**/*.{ts,tsx}\"","check":"pnpm run format:check && pnpm run lint","test":"jest","clean":"rm -rf build"},"_id":"x-api-sdk@0.1.1","_integrity":"sha512-2XzOJ5PhslL0v8N6aF5Vvh8B5ZWYukCvUFgO4cO2ciyU5rYkTyGfj0upb4zCS0sjHspP8fS3OKHQ68CE8EecQg==","_resolved":"/private/var/folders/1j/4gwgxkl56qx1_j7mgdkw90rr0000gn/T/04aac09db0ffbb40e8d671bb3b677843/x-api-sdk-0.1.1.tgz","_from":"file:x-api-sdk-0.1.1.tgz","_nodeVersion":"23.1.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-2XzOJ5PhslL0v8N6aF5Vvh8B5ZWYukCvUFgO4cO2ciyU5rYkTyGfj0upb4zCS0sjHspP8fS3OKHQ68CE8EecQg==","shasum":"aae1ebbce35cb1218e91a8e1c6ad9bf8f70dbdcc","tarball":"https://registry.npmjs.org/x-api-sdk/-/x-api-sdk-0.1.1.tgz","fileCount":21,"unpackedSize":459079,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEXSpyd75+V+PKaVO7HTWU2ogPyKhiQxKxKxAdn83UPJAiEA7Sr6ECpGJAYoquqL8mJMdh0SuARiS9AZ2/18NgyfEmY="}]},"_npmUser":{"name":"jmartinn","email":"juamp_m@hotmail.com"},"directories":{},"maintainers":[{"name":"jmartinn","email":"juamp_m@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/x-api-sdk_0.1.1_1740076586442_0.3158337616738287"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-31T00:57:32.833Z","modified":"2025-02-20T18:36:26.828Z","0.1.0":"2024-12-31T00:57:33.153Z","0.1.1":"2025-02-20T18:36:26.655Z"},"bugs":{"url":"https://github.com/jmartinn/jmartinn-api-typescript-sdk/issues"},"license":"Apache-2.0","homepage":"https://github.com/jmartinn/x-api-typescript-sdk#readme","keywords":["typescript","sdk","api","openapi","developer-tools"],"repository":{"type":"git","url":"git+https://github.com/jmartinn/x-api-typescript-sdk.git"},"description":"A TypeScript SDK for the X API","maintainers":[{"name":"jmartinn","email":"juamp_m@hotmail.com"}],"readme":"# X API SDK for TypeScript\n\n## Introduction\n\nA TypeScript SDK for the X API (formerly Twitter API), built with modern TypeScript practices. This SDK is designed with developers in mind, providing full type safety, ease of use, and support for the latest X API features.\n\n**Note: This SDK is currently under development and not ready for production use.**\n\nThis project is a fork of the [official Twitter API SDK](https://github.com/twitterdev/twitter-api-typescript-sdk) and has been rebranded and updated to support the latest X API functionality.\n\n## Features\n\n- **Full type safety**: Comprehensive type definitions for requests and responses.\n- **OAuth2 support**: Authenticate securely using X's OAuth2 mechanisms.\n- **Built for modern Node.js**: Supports Node.js 16+.\n- **Streaming support**: Easy-to-use Async Generators for real-time data.\n- **Pagination made simple**: Handle paginated endpoints seamlessly.\n\n## Installing\n\n```bash\nnpm install x-api-sdk\n```\n\n## Quick Start\n\n### Setting Up the Client\n\n```typescript\nimport { Client } from 'x-api-sdk';\n\nconst client = new Client('MY-BEARER-TOKEN');\n```\n\n### Examples\n\n#### Consuming a Stream\n\n```typescript\nconst stream = client.tweets.sampleStream({\n  'tweet.fields': ['author_id'],\n});\nfor await (const tweet of stream) {\n  console.log(tweet.data?.author_id);\n}\n```\n\n#### Fetching a Tweet\n\n```typescript\nconst tweet = await client.tweets.findTweetById('20');\nconsole.log(tweet.data?.text);\n```\n\n## Authentication\n\nThis SDK supports App-only Bearer Tokens and OAuth 2.0 authentication. See [X API documentation](https://developer.twitter.com/en/docs) for more details.\n\n## Contributing\n\nWe welcome contributions to the SDK! If you're interested in helping, here's how to get started:\n\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/<your-username>/x-api-typescript-sdk\n   ```\n2. **Install Dependencies**:\n   ```bash\n   pnpm install\n   ```\n3. **Run the Generation Script**:\n   Generate the SDK using the latest OpenAPI spec:\n\n   ```bash\n   pnpm generate\n   ```\n\n4. **Build**:\n\n   ```bash\n   pnpm build\n   ```\n\n5. **Test**:\n   ```bash\n   pnpm test\n   ```\n\n## Acknowledgments\n\nThis SDK is based on the original [`twitter-api-typescript-sdk`](https://github.com/twitterdev/twitter-api-typescript-sdk), originally developed by Twitter, Inc. under the Apache 2.0 license.\n\n## License\n\nThis project is licensed under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details.\n","readmeFilename":"README.md"}