Implemented Get sessions for plex.
This commit is contained in:
@@ -16,6 +16,7 @@ use App\Backends\Plex\Action\GetInfo;
|
||||
use App\Backends\Plex\Action\GetLibrariesList;
|
||||
use App\Backends\Plex\Action\GetLibrary;
|
||||
use App\Backends\Plex\Action\GetMetaData;
|
||||
use App\Backends\Plex\Action\GetSessions;
|
||||
use App\Backends\Plex\Action\GetUsersList;
|
||||
use App\Backends\Plex\Action\GetUserToken;
|
||||
use App\Backends\Plex\Action\GetVersion;
|
||||
@@ -459,6 +460,24 @@ class PlexClient implements iClient
|
||||
return $response->response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function getSessions(array $opts = []): array
|
||||
{
|
||||
$response = Container::get(GetSessions::class)($this->context, $opts);
|
||||
|
||||
if (false === $response->isSuccessful()) {
|
||||
if ($response->hasError()) {
|
||||
$this->logger->log($response->error->level(), $response->error->message, $response->error->context);
|
||||
}
|
||||
|
||||
$this->throwError($response);
|
||||
}
|
||||
|
||||
return $response->response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user