added jellyfin api client for nodejs

This commit is contained in:
KGT1 2020-09-04 12:22:27 +02:00
parent 3b6262676f
commit eecf5d47ab
7 changed files with 203 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# Jellyfin Contributors
- [thornbill](https://github.com/thornbill)
- [cvium](https://github.com/cvium)
- [Oddstr13](https://github.com/oddstr13)
- [Andrei Oanca](https://github.com/OancaAndrei)
# Emby Contributors
- [LukePulverenti](https://github.com/LukePulverenti)
- [ebr11](https://github.com/ebr11)
- [softworkz](https://github.com/softworkz)
- [HazCod](https://github.com/HazCod)

View File

@ -0,0 +1,22 @@
The MIT License
Copyright (c) Emby https://emby.media
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,71 @@
<h1 align="center">Jellyfin API Client for JavaScript</h1>
<h3 align="center">Part of the <a href="https://jellyfin.media">Jellyfin Project</a></h3>
---
<p align="center">
<img alt="Logo Banner" src="https://raw.githubusercontent.com/jellyfin/jellyfin-ux/master/branding/SVG/banner-logo-solid.svg?sanitize=true"/>
<br/>
<br/>
<a href="https://github.com/jellyfin/jellyfin-apiclient-javascript">
<img alt="MIT License" src="https://img.shields.io/github/license/jellyfin/jellyfin-apiclient-javascript.svg"/>
</a>
<a href="https://opencollective.com/jellyfin">
<img alt="Donate" src="https://img.shields.io/opencollective/all/jellyfin.svg?label=backers"/>
</a>
<a href="https://features.jellyfin.org">
<img alt="Feature Requests" src="https://img.shields.io/badge/fider-vote%20on%20features-success.svg"/>
</a>
<a href="https://forum.jellyfin.org">
<img alt="Discuss on our Forum" src="https://img.shields.io/discourse/https/forum.jellyfin.org/users.svg"/>
</a>
<a href="https://matrix.to/#/+jellyfin:matrix.org">
<img alt="Chat on Matrix" src="https://img.shields.io/matrix/jellyfin:matrix.org.svg?logo=matrix"/>
</a>
<a href="https://www.reddit.com/r/jellyfin">
<img alt="Join our Subreddit" src="https://img.shields.io/badge/reddit-r%2Fjellyfin-%23FF5700.svg"/>
</a>
</p>
This library is meant to help clients written in JavaScript or TypeScript interact with Jellyfin's REST API.
## Compatibility
This library depends on the Fetch and Promise APIs. These will be expected to be polyfilled if used in a browser that doesn't support them.
## Build Process
### Dependencies
- Yarn
### Getting Started
1. Clone or download this repository
```sh
git clone https://github.com/jellyfin/jellyfin-apiclient-javascript.git
cd jellyfin-apiclient-javascript
```
2. Install build dependencies in the project directory
```sh
yarn install
```
3. Build the library for production
```sh
yarn build
```
4. Build the library for development
```sh
yarn dev
```
## Building Documentation
This library is documented using [JSDoc](https://jsdoc.app/) style comments. Documentation can be generated in HTML format by running `yarn docs` and viewing the files in any modern browser. The resulting documentation will be saved in the `docs` directory.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
// Add fetch polyfill for jest
import 'isomorphic-fetch';

View File

@ -0,0 +1,90 @@
{
"_from": "jellyfin-apiclient",
"_id": "jellyfin-apiclient@1.4.1",
"_inBundle": false,
"_integrity": "sha512-BTTRucQ4tCLyiZ9kR9nAoxqxYp5/z+MCzkayy9vmMZ5C7jlVVsnxAXuuZjoa+AgXMjohXcM5Ci54myfJM1pRkA==",
"_location": "/jellyfin-apiclient",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "jellyfin-apiclient",
"name": "jellyfin-apiclient",
"escapedName": "jellyfin-apiclient",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/jellyfin-apiclient/-/jellyfin-apiclient-1.4.1.tgz",
"_shasum": "5e544a19bc001b16669eb7ecf46bb7d652365e41",
"_spec": "jellyfin-apiclient",
"_where": "/home/kilian/Documents/GitTests/Jellyfin/jellyfin-discord-music-bot",
"author": "",
"browserslist": [
"last 2 Firefox versions",
"last 2 Chrome versions",
"last 2 ChromeAndroid versions",
"last 2 Safari versions",
"last 2 iOS versions",
"last 2 Edge versions",
"Chrome 27",
"Chrome 38",
"Chrome 47",
"Chrome 53",
"Chrome 56",
"Chrome 63",
"Firefox ESR"
],
"bugs": {
"url": "https://github.com/jellyfin/jellyfin-apiclient-javascript/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "API client for Jellyfin",
"devDependencies": {
"@babel/core": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"@types/jest": "^25.2.1",
"@types/node": "^13.13.5",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"babel-loader": "^8.0.5",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jest": "^23.9.0",
"eslint-plugin-promise": "^4.2.1",
"isomorphic-fetch": "^2.2.1",
"jest": "^26.0.1",
"jest-junit": "^10.0.0",
"jsdoc": "^3.6.4",
"prettier": "2.0.5",
"source-map-loader": "^0.2.4",
"ts-jest": "^25.5.0",
"ts-loader": "^7.0.3",
"typescript": "^3.8.3",
"webpack": "^4.43.0",
"webpack-cli": "^3.2.1"
},
"homepage": "https://github.com/jellyfin/jellyfin-apiclient-javascript#readme",
"license": "MIT",
"main": "dist/jellyfin-apiclient.js",
"name": "jellyfin-apiclient",
"repository": {
"type": "git",
"url": "git+https://github.com/jellyfin/jellyfin-apiclient-javascript.git"
},
"scripts": {
"build": "webpack --mode production",
"dev": "webpack --mode development",
"docs": "jsdoc src -r -R README.md -d docs",
"lint": "eslint \"src\"",
"prepare": "webpack",
"test": "jest"
},
"version": "1.4.1"
}