Compare commits

...

5 Commits

Author SHA1 Message Date
LukeHagar
b07bac6999 Bump version to 0.0.29 2023-07-18 14:20:10 +00:00
Luke Hagar
dcddc72b18 Update README.md 2023-07-18 09:18:38 -05:00
Luke Hagar
591d498f7c Update readme.md 2023-07-18 09:16:15 -05:00
Luke Hagar
b1b902eac3 Merge branch 'main' of https://github.com/LukeHagar/plexjs 2023-07-18 09:10:29 -05:00
Luke Hagar
ad603e2e66 Update readme.md 2023-07-18 09:09:16 -05:00
12 changed files with 57 additions and 47 deletions

View File

@@ -1,45 +1,49 @@
## plexjs@0.0.22
# Plex API Client
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
[![Discord](https://img.shields.io/discord/1095524608406474802?style=social&logo=discord)](https://discord.gg/HQTPSJnWhb)
[![Npm package monthly downloads](https://badgen.net/npm/dm/@lukehagar/plexjs)](https://npmjs.com/package/@lukehagar/plexjs)
[![GitHub tag](https://img.shields.io/github/tag/LukeHagar/plexjs.svg)](https://GitHub.com/LukeHagar/plexjs/tags/)
Environment
* Node.js
* Webpack
* Browserify
## Description
Language level
* ES5 - you must have a Promises/A+ library installed
* ES6
Module system
* CommonJS
* ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
A typescript sdk for interacting with Plex.tv and Plex Media Server REST API's.
### Building
Documentation for all of the available endpoints [can be found here](https://plexapi.dev/docs/plex)
To build and compile the typescript sources to javascript use:
```
npm install
npm run build
## Installation
npm
```bash
npm install @lukehagar/plexjs
```
### Publishing
First build the package then run ```npm publish```
### Consuming
navigate to the folder of your consuming project and run one of the following commands.
_published:_
```
npm install plexjs@0.0.22 --save
yarn
```bash
yarn add @lukehagar/plexjs
```
_unPublished (not recommended):_
## Usage
```javascript
import {
Configuration,
ServerApi,
DevicesApi,
UserApi,
} from "@lukehagar/plexjs";
import dotenv from "dotenv";
dotenv.config();
const config = new Configuration({
basePath: process.env.BASE_PATH,
plexToken: process.env.PLEX_TOKEN,
});
new ServerApi(config).getServerCapabilities().then((resp) => console.log(resp));
new DevicesApi(config).getDevices().then((resp) => console.log(resp));
new UserApi(config).getUserDetails().then((resp) => console.log(resp));
```
npm install PATH_TO_GENERATED_PACKAGE --save

View File

@@ -1,12 +1,12 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.28",
"version": "0.0.29",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lukehagar/plexjs",
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT",
"dependencies": {
"axios": "^0.26.1",

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.28",
"version": "0.0.29",
"description": "Community Made Plex JS/TS Module",
"author": "Luke Hagar",
"repository": {

View File

@@ -1,4 +1,4 @@
## plexjs@0.0.28
## plexjs@0.0.29
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
_published:_
```
npm install plexjs@0.0.28 --save
npm install plexjs@0.0.29 --save
```
_unPublished (not recommended):_

View File

@@ -137,9 +137,9 @@ export class Configuration {
this.device = param.device || "plexjs";
this.deviceName = param.deviceName || "plexjs";
this.platform = param.platform || "plexjs";
this.platformVersion = param.platformVersion || "0.0.28";
this.platformVersion = param.platformVersion || "0.0.29";
this.product = param.product || "plexjs";
this.version = param.version || "0.0.28";
this.version = param.version || "0.0.29";
this.apiKey = (header: string) => {
switch (header) {

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.28",
"version": "0.0.29",
"description": "Community Made Plex JS/TS Module",
"author": "Luke Hagar",
"repository": {

View File

@@ -1,4 +1,4 @@
## plexjs@0.0.28
## plexjs@0.0.29
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
_published:_
```
npm install plexjs@0.0.28 --save
npm install plexjs@0.0.29 --save
```
_unPublished (not recommended):_

View File

@@ -137,9 +137,9 @@ export class Configuration {
this.device = param.device || "plexjs";
this.deviceName = param.deviceName || "plexjs";
this.platform = param.platform || "plexjs";
this.platformVersion = param.platformVersion || "0.0.28";
this.platformVersion = param.platformVersion || "0.0.29";
this.product = param.product || "plexjs";
this.version = param.version || "0.0.28";
this.version = param.version || "0.0.29";
this.apiKey = (header: string) => {
switch (header) {

View File

@@ -1,6 +1,6 @@
{
"name": "@lukehagar/plexjs",
"version": "0.0.28",
"version": "0.0.29",
"description": "Community Made Plex JS/TS Module",
"author": "Luke Hagar",
"repository": {

View File

@@ -1,7 +1,13 @@
# Plex API Client
[![Discord](https://img.shields.io/discord/1095524608406474802?style=social&logo=discord)](https://discord.gg/HQTPSJnWhb)
[![Npm package monthly downloads](https://badgen.net/npm/dm/@lukehagar/plexjs)](https://npmjs.com/package/@lukehagar/plexjs)
[![GitHub tag](https://img.shields.io/github/tag/LukeHagar/plexjs.svg)](https://GitHub.com/LukeHagar/plexjs/tags/)
## Description
A typescript sdk for interacting with Plex.tv and Plex Media Server REST API's.
Documentation for all of the available endpoints [can be found here](https://plexapi.dev/docs/plex)

View File

@@ -5,7 +5,7 @@ files:
destinationFilename: package.json
npmName: plexjs
npmRepository: lukehagar
npmVersion: 0.0.28
npmVersion: 0.0.29
useSingleRequestParameter: true
sortParamsByRequiredFlag: true
gitUserID: lukehagar

View File

@@ -5,7 +5,7 @@ files:
destinationFilename: package.json
npmName: plexjs
npmRepository: lukehagar
npmVersion: 0.0.28
npmVersion: 0.0.29
useSingleRequestParameter: true
sortParamsByRequiredFlag: true
gitUserID: lukehagar