While this API has wonderful promise, based on the overview, lack of documentation makes it very difficult if not impossible to use practically.
Case in point, the following code:
$filter1 = new Filter('title', $favoriteTitle) ;
foreach($librarySections['Directory'] as $directoryNumber => $directoryAttributes) {
($type = $directoryAttributes['type'] != 'movie')
continue ;
$sectionNumber = $directoryAttributes['key'] ;
$res = $client->filter($sectionNumber, [$filter1], true) ; // Note: This results in three warnings about Video not being an index in jc21/plex-api/src/jc21/PlexApi.php on line 405
if ($res) {
foreach ($res as $movie) {
$a=$movie->title ;
// how to access the elements of movie?
//foreach ($movie->data as $element) {} // Exception Return value of jc21\Movies\Movie::__get() must be an instance of jc21\Movies\mixed, null returned
//foreach ($movie as $element) {} // Loop does not get entered
//$title = $movie['title'] ; Exception Cannot use object of type jc21\Movies\Movie as array
//$title = $movie->title : Exception TypeError: Return value of jc21\Movies\Movie::__get() must be an instance of jc21\Movies\mixed, string returned
//$movie->toArray() results in undefined function
//$array = $movie->jsonSerialize() ; Exception Return value of jc21\Movies\Movie::jsonSerialize() must be an instance of jc21\Movies\mixed, array returned
}
}
It's not at all clear where to go once the $movie object has been created. Here's the result of the $title = $movie->title effort:

While this API has wonderful promise, based on the overview, lack of documentation makes it very difficult if not impossible to use practically.
Case in point, the following code:
It's not at all clear where to go once the $movie object has been created. Here's the result of the $title = $movie->title effort:
