{"id":16189118,"url":"https://github.com/jhermsmeier/node-plex-protocol","last_synced_at":"2025-04-07T13:47:56.663Z","repository":{"id":57325929,"uuid":"66305720","full_name":"jhermsmeier/node-plex-protocol","owner":"jhermsmeier","description":"Plex HTTP API client","archived":false,"fork":false,"pushed_at":"2018-02-24T17:22:48.000Z","size":42,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T04:09:01.217Z","etag":null,"topics":["plex","plex-media-server","protocol"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhermsmeier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-22T20:30:07.000Z","updated_at":"2020-04-05T03:06:57.000Z","dependencies_parsed_at":"2022-09-21T01:52:36.425Z","dependency_job_id":null,"html_url":"https://github.com/jhermsmeier/node-plex-protocol","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-plex-protocol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-plex-protocol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-plex-protocol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhermsmeier%2Fnode-plex-protocol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhermsmeier","download_url":"https://codeload.github.com/jhermsmeier/node-plex-protocol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234034018,"owners_count":18769270,"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":["plex","plex-media-server","protocol"],"created_at":"2024-10-10T07:34:07.876Z","updated_at":"2025-01-15T11:57:16.703Z","avatar_url":"https://github.com/jhermsmeier.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plex Protocol\n[![npm](https://img.shields.io/npm/v/plex-protocol.svg?style=flat-square)](https://npmjs.com/plex-protocol)\n[![npm license](https://img.shields.io/npm/l/plex-protocol.svg?style=flat-square)](https://npmjs.com/plex-protocol)\n[![npm downloads](https://img.shields.io/npm/dm/plex-protocol.svg?style=flat-square)](https://npmjs.com/plex-protocol)\n[![build status](https://img.shields.io/travis/jhermsmeier/node-plex-protocol.svg?style=flat-square)](https://travis-ci.org/jhermsmeier/node-plex-protocol)\n\nPlex HTTP API protocol\n\n## Install via [npm](https://npmjs.com)\n\n```sh\n$ npm install --save plex-protocol\n```\n\n\u003c!-- MarkdownTOC --\u003e\n\n- [Usage](#usage)\n    - [Creating a Client](#creating-a-client)\n    - [Identity](#identity)\n    - [General Information](#general-information)\n    - [Search](#search)\n    - [Making requests](#making-requests)\n    - [Getting account information](#getting-account-information)\n    - [List clients](#list-clients)\n    - [List sessions](#list-sessions)\n    - [List servers](#list-servers)\n    - [Get preferences](#get-preferences)\n- [Examples](#examples)\n    - [Remotely installing a plugin](#remotely-installing-a-plugin)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n## Usage\n\n```js\nvar Plex = require( 'plex-protocol' )\n```\n\n### Creating a Client\n\n```js\nvar client = new Plex.Client({\n  url: `http://127.0.0.1:32400/`,\n})\n```\n\n### Identity\n\n```js\nclient.identity( function( error, data ) {\n  console.log( error || data )\n})\n\n```\n\n```js\n{\n  _element: 'MediaContainer',\n  size: '0',\n  machineIdentifier: '990745400819dd8281d74fff91def2ec0056714c',\n  version: '1.5.5.3634-995f1dead'\n}\n```\n\n### General Information\n\n```js\nclient.getInfo( function( error, info ) {\n  console.log( error || info )\n})\n```\n\n```js\n{\n  identity: {\n    machineIdentifier: '990745400819dd8281d74fff91def2ec0056714c',\n    version: '1.5.6.3790-4613ce077'\n  },\n  friendlyName: 'something',\n  features: ['download_certificates', 'federated-auth', 'news'],\n  myPlex: {\n    enabled: true,\n    mappingState: 'mapped',\n    signinState: 'ok',\n    subscription: false,\n    username: 'user@host.tld'\n  },\n  allowCameraUpload: false,\n  allowChannelAccess: true,\n  allowSharing: true,\n  allowSync: false,\n  backgroundProcessing: true,\n  certificate: true,\n  companionProxy: true,\n  eventStream: true,\n  hubSearch: true,\n  multiuser: true,\n  pluginHost: true,\n  readOnlyLibraries: false,\n  requestParametersInCookie: true,\n  sync: true,\n  updater: true,\n  transcoder: {\n    audio: true,\n    lyrics: true,\n    photo: true,\n    subtitles: true,\n    video: true,\n    videoBitrates: [ 64, 96, 208, 320, 720, 1500, 2000, 3000, 4000, 8000, 10000, 12000, 20000 ],\n    videoQualities: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ],\n    videoResolutions: [ 128, 128, 160, 240, 320, 480, 768, 720, 720, 1080, 1080, 1080, 1080 ]\n  },\n  directories: {\n    activities: { count: 1, title: 'activities' },\n    butler: { count: 1, title: 'butler' },\n    channels: { count: 1, title: 'channels' },\n    clients: { count: 1, title: 'clients' },\n    diagnostics: { count: 1, title: 'diagnostics' },\n    hubs: { count: 1, title: 'hubs' },\n    library: { count: 1, title: 'library' },\n    livetv: { count: 2, title: 'livetv' },\n    media: { count: 3, title: 'media' },\n    neighborhood: { count: 1, title: 'neighborhood' },\n    playQueues: { count: 1, title: 'playQueues' },\n    player: { count: 1, title: 'player' },\n    playlists: { count: 1, title: 'playlists' },\n    resources: { count: 1, title: 'resources' },\n    search: { count: 1, title: 'search' },\n    server: { count: 1, title: 'server' },\n    servers: { count: 1, title: 'servers' },\n    statistics: { count: 1, title: 'statistics' },\n    system: { count: 1, title: 'system' },\n    transcode: { count: 1, title: 'transcode' },\n    updater: { count: 1, title: 'updater' }\n  }\n}\n```\n\n### Search\n\n```js\nclient.search({\n  query: 'Something',\n  year: '2016',\n}, function( error, data ) {\n  console.log( error || data )\n})\n```\n\n### Making requests\n\n```js\nclient.get( '/library/sections/2/all', function( error, data ) {\n  // ...\n})\n```\n\n### Getting account information\n\n```js\nclient.account( function( error, data ) {\n  // ...\n})\n```\n\n### List clients\n\n```js\nclient.clients( function( error, data ) {\n  // ...\n})\n```\n\n### List sessions\n\n```js\nclient.sessions( function( error, data ) {\n  // ...\n})\n```\n\n### List servers\n\n```js\nclient.servers( function( error, data ) {\n  // ...\n})\n```\n\n### Get preferences\n\n```js\nclient.preferences( function( error, data ) {\n  // ...\n})\n```\n\n```js\nclient.systemPreferences( function( error, data ) {\n  // ...\n})\n```\n\n## Examples\n\n### Remotely installing a plugin\n\n```js\nvar pluginId = 'com.plexapp.plugins.vice'\nvar client = new Plex.Client({\n  url: 'http://127.0.0.1:32400/',\n})\n\nclient.get( `/system/appstore/apps/${pluginId}/install`, function( error, result ) {\n  // ...\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhermsmeier%2Fnode-plex-protocol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhermsmeier%2Fnode-plex-protocol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhermsmeier%2Fnode-plex-protocol/lists"}