{"id":18276661,"url":"https://github.com/jellyfin/jellyfin-sdk-typescript","last_synced_at":"2025-05-16T10:06:50.911Z","repository":{"id":37075784,"uuid":"400953142","full_name":"jellyfin/jellyfin-sdk-typescript","owner":"jellyfin","description":"TypeScript SDK for Jellyfin","archived":false,"fork":false,"pushed_at":"2025-05-10T01:03:53.000Z","size":8494,"stargazers_count":97,"open_issues_count":14,"forks_count":29,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-10T02:22:12.101Z","etag":null,"topics":["jellyfin","typescript"],"latest_commit_sha":null,"homepage":"https://typescript-sdk.jellyfin.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jellyfin.png","metadata":{"funding":{"open_collective":"jellyfin"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-29T04:51:00.000Z","updated_at":"2025-05-03T05:41:11.000Z","dependencies_parsed_at":"2023-12-19T07:17:54.759Z","dependency_job_id":"7c3d66f1-90ed-42d9-8e7c-df4158ee8e94","html_url":"https://github.com/jellyfin/jellyfin-sdk-typescript","commit_stats":{"total_commits":863,"total_committers":11,"mean_commits":78.45454545454545,"dds":0.4820393974507532,"last_synced_commit":"ecdff5f2a6217770b39cfc23bde3abaaf21408be"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellyfin%2Fjellyfin-sdk-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellyfin%2Fjellyfin-sdk-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellyfin%2Fjellyfin-sdk-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jellyfin%2Fjellyfin-sdk-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jellyfin","download_url":"https://codeload.github.com/jellyfin/jellyfin-sdk-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253352455,"owners_count":21895155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jellyfin","typescript"],"created_at":"2024-11-05T12:16:44.234Z","updated_at":"2025-05-16T10:06:50.888Z","avatar_url":"https://github.com/jellyfin.png","language":"TypeScript","funding_links":["https://opencollective.com/jellyfin"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ejellyfin-sdk-typescript\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003ePart of the \u003ca href=\"https://jellyfin.org\"\u003eJellyfin Project\u003c/a\u003e\u003c/h3\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"Logo Banner\" src=\"https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true\"/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003ca href=\"https://github.com/jellyfin/jellyfin-sdk-typescript/blob/master/LICENSE\"\u003e\u003cimg alt=\"MPL-2.0 license\" src=\"https://img.shields.io/github/license/jellyfin/jellyfin-sdk-typescript\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/jellyfin/jellyfin-sdk-typescript/releases\"\u003e\u003cimg alt=\"Current Release\" src=\"https://img.shields.io/github/release/jellyfin/jellyfin-sdk-typescript.svg\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://www.npmjs.com/package/@jellyfin/sdk\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/@jellyfin/sdk\"\u003e\u003c/a\u003e\n\u003ca href=\"https://sonarcloud.io/component_measures?metric=coverage\u0026id=jellyfin_jellyfin-sdk-typescript\"\u003e\n\u003cimg alt=\"Sonar Coverage\" src=\"https://img.shields.io/sonar/coverage/jellyfin_jellyfin-sdk-typescript/master?server=https%3A%2F%2Fsonarcloud.io\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nA TypeScript SDK for Jellyfin.\n\n\u003e Warning: This project is under active development, so API changes may occur.\n\n## Install\n\n```sh\nnpm i --save @jellyfin/sdk\n```\n\nor\n\n```sh\nyarn add @jellyfin/sdk\n```\n\n### Supported Jellyfin Versions\n\n| SDK Version | Jellyfin Version |\n|:-:|:-:|\n| 0.11.0 | 10.10.x |\n| 0.10.0 | 10.9.x |\n| 0.9.0 | 10.9.x |\n| 0.8.2 - 0.6.0 | 10.8.1 - 10.8.13 |\n| 0.5.0 | 10.8.0 |\n| \u003c0.5.0 | 10.7.x |\n\n\u003e Note: Versions prior to 0.7.0 were published as `@thornbill/jellyfin-sdk`.\n\n### React Native\n\nThe generated Axios client used in this library depends on `URL` and `URLSearchParams` to be available on the global scope.\nReact Native only includes incomplete implementations for these classes, so a polyfill is required.\n[React Native URL Polyfill](https://github.com/charpeni/react-native-url-polyfill) seems like a good solution for this.\n\n## Usage\n\n```js\n// Create a new instance of the SDK\nconst jellyfin = new Jellyfin({\n    clientInfo: {\n        name: 'My Client Application',\n        version: '1.0.0'\n    },\n    deviceInfo: {\n        name: 'Device Name',\n        id: 'unique-device-id'\n    }\n});\n\n// Find a valid server by trying to connect using common protocols and ports.\n// Each server receives a score based on security, speed, and other criteria.\nconst servers = await jellyfin.discovery.getRecommendedServerCandidates('demo.jellyfin.org/stable');\n// A utility function for finding the best result is available.\n// If there is no \"best\" server, an error message should be displayed.\nconst best = jellyfin.discovery.findBestServer(servers);\n\n// Create an API instance\nconst api = jellyfin.createApi(best.address);\n\n// Each API endpoint is represented by a class in the generated client.\n// Helper utility functions are provided under `/lib/utils/api/` to create an\n// instance of a specific Jellyfin API using the shared Configuration and Axios\n// instance from the `api` object created above.\n\n// For example, the SystemApi can be generated using the `getSystemApi`\n// function in `/lib/utils/api/system-api`.\n\n// Fetch the public system info\nconst info = await getSystemApi(api).getPublicSystemInfo();\nconsole.log('Info =\u003e', info.data);\n\n// Fetch the list of public users\nconst users = await getUserApi(api).getPublicUsers();\nconsole.log('Users =\u003e', users.data);\n\n// A helper method for authentication has been added to the SDK because\n// the default method exposed in the generated Axios client is rather\n// cumbersome to use.\nconst auth = await api.authenticateUserByName('demo', '');\nconsole.log('Auth =\u003e', auth.data);\n\n// Authentication state is stored internally in the Api class, so now\n// requests that require authentication can be made normally\nconst libraries = await getLibraryApi(api).getMediaFolders();\nconsole.log('Libraries =\u003e', libraries.data);\n\n// A helper method for logging out the current user has been added to the\n// SDK so the internal state is updated correctly.\nawait api.logout();\n```\n\n## Breaking Changes\n\n### v0.11.0\n\n* Updated OpenAPI spec for Jellyfin 10.10.0. [#816](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/816)\n\n### v0.10.0\n\n* Updated build target to ES2018. [#712](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/712)\n\n### v0.9.0\n\n* Updated OpenAPI spec for Jellyfin 10.9.1. [#694](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/694)\n\n### v0.8.0\n\n* The library is now fully targeted to ES6/ES2015.\n  [#341](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/341)\n* Axios received a major version upgrade.\n  [#300](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/300)\n\n### v0.7.0\n\n* Renamed package to @jellyfin/sdk.\n  [#262](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/262)\n\n### v0.6.0\n\n* Updated OpenAPI spec for Jellyfin 10.8.1.\n  [#208](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/208)\n\n### v0.5.0\n\n* Build directory is now `lib` instead of `dist`.\n  Any imports used that were previously in `dist` will need updated.\n  [#147](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/147)\n* Duplicated exports were removed.\n  Any imports may need updated if you referenced one of the duplicates.\n  [#148](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/148)\n* API classes are no longer exposed via getters.\n  Instead you need to call a function passing the `Api` instance as a parameter.\n  For example: `getSystemApi(api)`.\n  While I do feel this is a slightly worse developer experience, it was a necessary change to support tree-shaking.\n  [#149](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/149)\n* `BaseItemKind` is now included in the generated client.\n  Imports will need updated.\n  [#187](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/187)\n\n## Roadmap to 1.0\n\n* [x] Use custom generator templates for API versions [#231](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/231) (Currently uses sed to update the value could be improved.)\n* [x] Automate OpenAPI spec updates using GitHub [#351](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/351)\n* [x] Create branch tracking unstable Jellyfin builds with automated builds [#354](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/354)\n* [x] Fix authentication header escaping [#564](https://github.com/jellyfin/jellyfin-sdk-typescript/pull/564)\n* [ ] Add WebSocket API support\n* [ ] Add example projects for different ecosystems [#186](https://github.com/jellyfin/jellyfin-sdk-typescript/issues/186)\n* [ ] Add utility function for `getFile` [#164](https://github.com/jellyfin/jellyfin-sdk-typescript/issues/164)\n* [ ] More complete device profile generation utilities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjellyfin%2Fjellyfin-sdk-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjellyfin%2Fjellyfin-sdk-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjellyfin%2Fjellyfin-sdk-typescript/lists"}