PHP code example of ikoene / marvel-api-client
1. Go to this page and download the library: Download ikoene/marvel-api-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ikoene / marvel-api-client example snippets
koene\Marvel\Client;
$client = new Client('your_public_api_key', 'your_private_api_key');
$response = $client->getCharacter(1009610);
var_dump($response);
$response = $client->getComicsForCharacter(1009610);
$comicFilter = new \ikoene\Marvel\Entity\ComicFilter();
$comicFilter->setTitleStartsWith('Age of Ultron');
$comicFilter->setOrderBy('title');
$response = $client->getComicsForCharacter(1009610, $comicFilter);