{"_id":"@abpluth/lotr_sdk","_rev":"4-eb553b98a0099525466a35d42dd62024","time":{"created":"2023-01-21T07:58:25.457Z","1.0.0":"2023-01-21T00:35:39.425Z","modified":"2023-01-21T08:07:10.791Z","1.0.1":"2023-01-21T07:58:25.720Z","1.0.2":"2023-01-21T08:07:10.684Z"},"name":"@abpluth/lotr_sdk","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@abpluth/lotr_sdk","description":"A node.js SDK for [The-One-Api](https://the-one-api.dev)","version":"1.0.1","author":{"name":"Anthony Pluth","email":"abpluth@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/abpluth/AnthonyPluth-SDK.git"},"scripts":{"test":"jest","test:cov":"jest --collectCoverage"},"devDependencies":{"jest":"^29.0.0","eslint":"^8.32.0","eslint-config-airbnb":"^19.0.4","eslint-config-prettier":"^8.6.0","eslint-plugin-sort-imports-es6-autofix":"^0.6.0","prettier":"^2.8.3"},"jest":{"coverageReporters":["text","cobertura"]},"gitHead":"189f93760fa9744ccf02638eb537c53499d037ae","bugs":{"url":"https://gitlab.com/abpluth/AnthonyPluth-SDK/issues"},"homepage":"https://gitlab.com/abpluth/AnthonyPluth-SDK#readme","_id":"@abpluth/lotr_sdk@1.0.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-lWbWkhav7Y9UWe4p4FsCKMmvgh9P85nQeshPbqNj4EVFe4uVoOmFrnyX36pDm5TNq96/8vNz2AVD5O8h8198EA==","shasum":"bf4c9f81f4283c808e6d8295d37211457833a057","tarball":"https://registry.npmjs.org/@abpluth/lotr_sdk/-/lotr_sdk-1.0.1.tgz","fileCount":10,"unpackedSize":13059,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICap680EUQz3dRGZbw2HiW9kOjST8GlQpJj0WsKK0jn8AiEAxCUPrgYoP8ttFstjBQeNr2z7VrZc7QkFaKLwIqw4gqc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjy5shACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMHA/+Oc4GKy1dBHHQyibY0mbcluu8M39p+PVMAEAa0krQdKWYxDmp\r\nUWpSB94UpixXYzEgJNeExxDMxQbw6JjLGlh74CSa0fqbEDWmuNqIo8Ve5fsx\r\n/yyY75X5lLi/MFAWccff5wZ6RQ+t6ClwVLy9DPfQS22ej3qCcAOjTFl5k0Au\r\nVhj30IvRxXo1C8qQd4E+33hkcpLififNjNUMWVjGuuI1DZ47kfqiul5fRuH0\r\nkaAEpNgTg9sjH1Py5pGKhQ4uG2XS05Uslmdg5tkZx/k83+S1eQQBLUL866wp\r\nNPqHBop9ImB7UxBE0NUn2upR4PEmHi3dRIDASgYVIw1So51KQBToipSn4k0A\r\nZLGk+kr04sZCr+iF+ZBsOx/AhpPkoHnBZn5FCCvvx7f8gVTIKoqLLyR+8qBs\r\nIgx7IlOAG5iNoVdH/RW3lIj5+kCFIfD6TZsHnqOQQsnXbhselXNS/38K7LDC\r\nTByVtg5qmy8AcAkpBzEfQgR8wi1efrrSVKNJ+XVY0/+Rf9kT8EskUQru+4ko\r\nf966jh2Qje24Pd7ydmXgzJORtjO8pXCMkrjodFJBtOdoraujJGUQGkuC5hji\r\nje0UCg7rHq2Sic54+WugDwfHOJH4MpXlAcjFTwcFLMb/GriSmDDOUh+csAvf\r\nM2vFU1MeENk0FOQILbEfpzNezqVAUkq/A1w=\r\n=SYCX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abpluth","email":"abpluth@gmail.com"},"directories":{},"maintainers":[{"name":"abpluth","email":"abpluth@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotr_sdk_1.0.1_1674287905548_0.5861823812065832"},"_hasShrinkwrap":false},"1.0.2":{"name":"@abpluth/lotr_sdk","description":"A node.js SDK for [The-One-Api](https://the-one-api.dev)","version":"1.0.2","author":{"name":"Anthony Pluth","email":"abpluth@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://gitlab.com/abpluth/AnthonyPluth-SDK.git"},"scripts":{"test":"jest","test:cov":"jest --collectCoverage"},"devDependencies":{"jest":"^29.0.0","eslint":"^8.32.0","eslint-config-airbnb":"^19.0.4","eslint-config-prettier":"^8.6.0","eslint-plugin-sort-imports-es6-autofix":"^0.6.0","prettier":"^2.8.3"},"jest":{"coverageReporters":["text","cobertura"]},"gitHead":"a3290526b64a84ce3bc81c74731bd939ad8cdde4","bugs":{"url":"https://gitlab.com/abpluth/AnthonyPluth-SDK/issues"},"homepage":"https://gitlab.com/abpluth/AnthonyPluth-SDK#readme","_id":"@abpluth/lotr_sdk@1.0.2","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-/kHvj43gr0l5ZM1rgYi4KFUZFtPxoFXzZ0RyLyqWGs2ly6pXwTCjOQsz5xCDmJr7uy+TvZax1nqVy/DLlQJSwA==","shasum":"a5efbfc71a13a51259c06c06d4664f3845724002","tarball":"https://registry.npmjs.org/@abpluth/lotr_sdk/-/lotr_sdk-1.0.2.tgz","fileCount":11,"unpackedSize":13113,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMDlr8zejfIBoAdAI4YL49GcrI8Qukl5vsi2+ec5pc/gIgFbPBYBDhOr3b7KtLtRjHNfHlNrlOjBhxPwyx6jSuYXM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjy50uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpS0w//d63kwnUmdqd/A950jlqL4lzs9800aq7e9tPDwYqTb95nkjAH\r\nuredDcQx/3HoQpsoN3i4SMotlO47paFRLSFKpAbVTVU+2yS92GthhT2F85g8\r\n6XcgMX0hg/8SR5u+JkjIMBAlx93SjnanXA5m/7594gVHg55hj2YRapFti9qT\r\nrx5kU3rtKUJSDXx66Ilsi3mQJJImAEnxYwvNKYmHPprJBT54peAV3JN4WKRo\r\nE9iPvMyNPmmqHXqZsk0eUhf1bogihbG6MuhRHbBd0ANtbWwDAmI/m8lgfUnr\r\n2QVMz6zYxc70+8C+2AOPY45yUJ6y5bCKC5d3q0leLRPMEqbEY9K1uqteYKl4\r\nEQfEhTJwdKwjxnbIC/efTSOGmPr1cJkf/plFCR+6wFQpbbhRxK6Ur/OyR2iK\r\nbRjSvlGZB5FDEsGg1fXDJRJfsvMECegpYYI3rXDhDiENjTaN+NjJqkAkefS5\r\nwO7+hJ2+dggHQ+/JICLZ36C3/DO1AqPVuhZS1vW8pqU8yLBC0QCf1zpA6Cw7\r\nwbNFFQ7WzClwcOZNvxLV2fhorlwACv+uKjw9Q2ItOiZosACl6L8PPWyycw/k\r\nlaUGOF4st2Va3qd8AgCt6SWpb7loEqBFNhQQb4OQ4sPKNOpGtum4fC2qL+S7\r\nWzSZll5cr1tkde8QUAkAsF7KOQeDaxVWvSs=\r\n=S3gR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"abpluth","email":"abpluth@gmail.com"},"directories":{},"maintainers":[{"name":"abpluth","email":"abpluth@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lotr_sdk_1.0.2_1674288430504_0.5970484345764613"},"_hasShrinkwrap":false}},"maintainers":[{"name":"abpluth","email":"abpluth@gmail.com"}],"description":"A node.js SDK for [The-One-Api](https://the-one-api.dev)","homepage":"https://gitlab.com/abpluth/AnthonyPluth-SDK#readme","repository":{"type":"git","url":"git+https://gitlab.com/abpluth/AnthonyPluth-SDK.git"},"author":{"name":"Anthony Pluth","email":"abpluth@gmail.com"},"bugs":{"url":"https://gitlab.com/abpluth/AnthonyPluth-SDK/issues"},"license":"MIT","readme":"# The-One-SDK\nA node.js SDK for [The-One-Api](https://the-one-api.dev)\n\n## How To Install\n```bash\nnpm install @abpluth/lotr_sdk\n```\n\n## Usage\n\n### Initializing the client\nAn API token for [the-one-api.dev](https://the-one-api.dev/) is required to use the SDK. Replace `<YOUR-API-TOKEN>` with your actual token.\n```javascript\nconst LOTR = require('@abpluth/lotr_sdk')\n\nconst client = new LOTR('<YOUR-API-TOKEN>')\n```\n\n### Movies\n```javascript\nconst movies = await client.movies.getAll()\nconst movie = await client.movies.getById('<movie-id>')\nconst quotes = await client.movies.getQuotes('<movie-id>')\n```\nThe `getAll` and `getQuotes` functions support the use of pagination, sorting, and filtering. An example showing the use of all possible options is shown below:\n```javascript\nconst quotes = await client.movies.getQuotes('<movie-id>',{\n  pagination: { limit: 100, page: 2, offset: 3 },\n  sorting: { name: 'asc' },\n  filtering: {\n    equals: { movie: 'The Two Towers' },\n    doesNotEqual: { movie: 'The Fellowship of the Ring' },\n    includes: { race: ['Hobbit', 'Human'] },\n    excludes: { race: ['Orc', 'Goblin'] },\n    regex: { name: /foot/i },\n    lessThan: {\n      budgetInMillions: 100,\n    },\n    lessThanOrEqual: {\n      runtimeInMinutes: 200,\n    },\n    greaterThan: {\n      academyAwardWins: 2,\n    },\n    greaterThanOrEqual: {\n      runtimeInMinutes: 160,\n    },\n    exists: 'name',\n    doesNotExist: 'someFieldThatDoesntExist,\n  },\n})\n```\n\n\n## Testing\n```bash\nnpm test\n```\n\n## Future Improvements\n- [ ] Add additional API endpoints\n- [ ] Add caching\n- [ ] Add error handling for invalid pagination/sorting/filtering params","readmeFilename":"README.md"}