Download the PHP package chindit/plex-api without Composer
On this page you can find all versions of the php package chindit/plex-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chindit/plex-api
More information about chindit/plex-api
Files in chindit/plex-api
Package plex-api
Short Description A simple API library to interact with a Plex server
License GPL-3.0-or-later
Informations about the package plex-api
Plex API
Installation
Usage
Create a new instance of PlexServer
Minimal parameters to pass are server host and token.
You can also provide a specific port as third argument (default is 32400) and some options as fourth parameters. Options must be suppored by Symfony's HTTP client.
Most common parameters are max_redirects
and timeout
.
In this case, server initialization will look like this:
To find you plex token, check this article
Methods available
Once your $plexserver
instance created, following methods are available:
-
checkConnection(): bool
Checks if connection can be made to your Plex instance. -
servers(): array<Server>
Returns the list of active servers for your Plex instance.Response is an array of
Chindit\Model\Server
objects sessionsCount(): int
Returns the number of active sessions on the server. An active session is a device streaming a media.libraries(): array<Library>
Returns all you libraries. A Plex library is a general section like your «Movies» or «Shows» categories. All your medias are contained in libraries.-
library(int $libraryId): array<Movie|Show>
Return all the media contained in a specific library. Library id can be obtained by agetId()
on aLibrary
object.Example:
Response is an array of
Chindit\Model\Movie
andChindit\Model\Show
objects.
Need help ?
If you need a specific call, have a suggestion or found a bug, do not hesitate tot leave a comment on the Issue
tab.
All versions of plex-api with dependencies
ext-simplexml Version *
chindit/collection Version ^1.0
symfony/http-client Version ^7.0