Node.js restful API for Plex Media Server.
Tested on Plex Media Server v1.16.3.
$ npm install pavie
const Pavie = require("pavie")
const pavie = new Pavie({ username: "USERNAME", password: "PASSWORD" })
pavie
.signin()
.then(user => {
console.log(user)
})
.catch(err => {
console.error(err)
})
Authenticate user to Plex server. This is the first method to call, this instantiate your server and your token for the others methods !
Return user
<object>
if authentification is successfull.
Get the list of resources with connection settings. Conection : [name, protocol, address, port, uri, local, relay, IPv6].
Get user info. Return: [id, uuid, username, title, email, thumb, authToken, certificateVersion, rememberExpiresAt].
Get basic info about the Plex server. Return: [machineIdentifier, version]
Get the list actions availables. ie : platform, platformVersion, updatedAt, version, machineIdentifier, myPlexUsername. Return : [activities, butler, channels, clients, devices, diagnostics, hubs, library, livetv, media, player, playlists, resources, search, server, ...].
Get a list of libraries. Return: [section, recentlyAdded, onDeck].
Get a list of sections in the library. Return: [Movies, Music, TV Shows].
Get list of directory in a specified section. Default : TV Shows section. Return : [all, unwatched, newest, recentlyAdded, recenntlyViewed, recentlyViewedShows, onDeck, folder, ...]
Get a list of TV Shows by directory. Default : TV Shows and all. Return : [studio, type, title, contentRating, summary, index, rating, year, thumb, art, duration, originallyAvailableAt, ...].
Search Tv Shows, episodes, movies or musics. Default : [sectionId : Tv Shows, type: Tv Shows] For Tv Shows, type: [2: Tv Shows, 3: Seasonn, 4 : Episode]
Refresh a section.
Get metdata of a media.
Get a list of servers. Return: [name, host, address, port, machineIdentifier, version].
Get synchronize info.
Synchronize Plex and Trakt.tv.
Hubs actions [continueWatching, onDeck]