{"_id":"@akomalabs/voe","name":"@akomalabs/voe","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@akomalabs/voe","version":"1.0.0","description":"A TypeScript client for the Voe.sx API","module":"dist/index.js","main":"dist/index.js","types":"dist/index.d.ts","type":"module","scripts":{"build":"tsc","test":"bun test","test:coverage":"bun test --coverage","test:watch":"bun test --watch","prepublishOnly":"bun run build","prepare":"bun run build"},"keywords":["voe","api","video","hosting","typescript","api-client"],"author":{"name":"akomalabs"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/akomalabs/voe.git"},"bugs":{"url":"https://github.com/akomalabs/voe/issues"},"homepage":"https://github.com/akomalabs/voe#readme","devDependencies":{"@types/bun":"latest","@types/axios":"^0.14.0","typescript":"^5.0.0"},"dependencies":{"axios":"^1.6.7"},"publishConfig":{"access":"public"},"_id":"@akomalabs/voe@1.0.0","gitHead":"04916af1a710cbdeed21854ae0ecbdff4cfcfebd","_nodeVersion":"20.11.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-YXAAhLYYoMFqf6FSTaznt2rXW+9w9Os9PxUcA2nK0WuH2yNXeKmNXQHLLxwwj+VUi6X05J3fm3qEpXI8Z6enHA==","shasum":"4731b60731edcaa1cc27ce04720fa883601edf60","tarball":"https://registry.npmjs.org/@akomalabs/voe/-/voe-1.0.0.tgz","fileCount":41,"unpackedSize":44103,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9AQapbH1z+PEPcVmBy9cxNUj3tIy9EdMzz3U8ykbTdAIhAPwYOVzrN7s8VWyNAGSXtampW+MbavHq9JslhWGJW5Am"}]},"_npmUser":{"name":"akomalabs","email":"info@akomalabs.com"},"directories":{},"maintainers":[{"name":"akomalabs","email":"info@akomalabs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/voe_1.0.0_1732142562190_0.7908019761602301"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-20T22:42:42.088Z","1.0.0":"2024-11-20T22:42:42.392Z","modified":"2024-11-20T22:42:42.688Z"},"maintainers":[{"name":"akomalabs","email":"info@akomalabs.com"}],"description":"A TypeScript client for the Voe.sx API","homepage":"https://github.com/akomalabs/voe#readme","keywords":["voe","api","video","hosting","typescript","api-client"],"repository":{"type":"git","url":"git+https://github.com/akomalabs/voe.git"},"author":{"name":"akomalabs"},"bugs":{"url":"https://github.com/akomalabs/voe/issues"},"license":"MIT","readme":"# Voe Client\n\nA robust, fully-typed TypeScript client for interacting with the Voe.sx API. Built with modularity, type safety, and developer experience in mind.\n\n[![npm version](https://badge.fury.io/js/voe-client.svg)](https://badge.fury.io/js/voe-client)\n[![TypeScript](https://badges.frapsoft.com/typescript/code/typescript.svg?v=101)](https://github.com/ellerbrock/typescript-badges/)\n\n## Features\n\n- 🔒 Full TypeScript support with comprehensive type definitions\n- 🚦 Built-in rate limiting (3-4 requests/second)\n- 🔄 Automatic request retries and error handling\n- 📦 Modular architecture for maintainability\n- 📝 Detailed error messages and stack traces\n- 🔍 Extensive JSDoc documentation\n- ⚡ Built with Bun for optimal performance\n\n## Installation\n\nUsing bun (recommended)\n\n```bash\nbun add @akomalabs/voe\n```\n\nUsing npm\n\n```bash\nnpm install @akomalabs/voe\n```\n\nUsing yarn\n\n```bash\nyarn add @akomalabs/voe\n```\n\nUsing pnpm\n\n```bash\npnpm add @akomalabs/voe\n```\n\n## Usage\n\n```typescript\nimport { VoeClient } from \"@akomalabs/voe\"\n\nconst client = new VoeClient({\n  apiKey: \"your-api-key\", // Get from Account -> Settings -> API Details\n})\n\n// Basic usage\ntry {\n  // Get account info\n  const accountInfo = await client.account.getInfo()\n  // Upload a file\n  const uploadResult = await client.upload.uploadFile(file)\n  // List files in a folder\n  const files = await client.folders.listContents(0)\n} catch (error) {\n  if (error instanceof VoeError) {\n    console.error(`API Error: ${error.message} (Code: ${error.code})`)\n  }\n}\n```\n\n## API Documentation\n\n### Account Operations\n\n```typescript\n// Get account information\nconst info = await client.account.getInfo()\n// Get account statistics\nconst stats = await client.account.getStats()\n```\n\n### Upload Operations\n\n```typescript\n// Get upload server\nconst serverUrl = await client.upload.getServer()\n// Upload file\nconst uploadResult = await client.upload.uploadFile(file)\n// Remote upload\nconst remoteUpload = await client.upload.addRemoteUpload(\n  \"https://example.com/file.mp4\",\n)\n// List remote uploads\nconst uploads = await client.upload.getRemoteUploadList()\n```\n\n### Folder Operations\n\n```typescript\n// List folder contents\nconst contents = await client.folders.listContents(folderId)\n// Create folder\nconst newFolder = await client.folders.create(\"New Folder\", parentId)\n// Rename folder\nawait client.folders.rename(folderId, \"New Name\")\n```\n\n### Misc Operations\n\n```typescript\n// Get deleted files\nconst deletedFiles = await client.misc.getDeletedFiles({\n  last: 100,\n  pagination: true,\n})\n// Get DMCA list\nconst dmcaList = await client.misc.getDmcaList({\n  pending: true,\n})\n// Get domain settings\nconst domainSettings = await client.misc.getDomainSettings()\n```\n\n## Error Handling\n\nThe client includes a custom `VoeError` class for detailed error information:\n\n```typescript\ntry {\n  await client.files.delete(\"invalid-code\")\n} catch (error) {\n  if (error instanceof VoeError) {\n    console.error(\n      `Message: ${error.message} Code: ${error.code} Status: ${error.statusCode}`,\n    )\n  }\n}\n```\n\n## Rate Limiting\n\nThe client automatically handles rate limiting (3-4 requests per second) to prevent API throttling. Requests exceeding this limit are automatically queued.\n\n## TypeScript Support\n\nThis package includes comprehensive TypeScript definitions. All methods and responses are fully typed for the best development experience.\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nMIT License - see the [LICENSE](LICENSE) file for details\n\n## Support\n\n- Report issues on [GitHub Issues](https://github.com/yourusername/voe-client/issues)\n- For API-specific questions, refer to the [Voe.sx API Documentation](https://voe.sx/api/docs)\n\n## Acknowledgments\n\n- Built with TypeScript\n- Powered by Bun\n- Uses Axios for HTTP requests\n\n# voe-client\n","readmeFilename":"README.md"}