Search Series By Keyword

require 'vendor/autoload.php';


use \Ceic\Api\Configuration; use \Ceic\Api\Apis\SeriesApi; use \Ceic\Api\Models\QueryEntities\SeriesApiQueryEntity;

$accessToken = "ENTER YOUR API KEY HERE"; $keywords = array("KEYWORD 1", "KEYWORD 2", "KEYWORD 3", "KEYWORD 4"); $keywords = join(", ", $keywords);
$config = Configuration::getDefaultConfiguration() Configuration::setDefaultConfiguration($config);
$seriesApi = new SeriesApi(); $seriesQueryEntity = new SeriesApiQueryEntity(); $seriesQueryEntity->setKeyword($keywords); $seriesQueryEntity->setToken($accessToken);
$seriesSearchResult = $seriesApi->searchSeriesQuery($seriesQueryEntity);
// Access series search results data $seriesSearchItems = $seriesSearchResult->getData()->getItems(); $secondItemSeriesId = $seriesSearchItems[1]->getMetadata()->getId();