PHP code example of zmaglica / rick-and-morty-api-wrapper
1. Go to this page and download the library: Download zmaglica/rick-and-morty-api-wrapper 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/ */
zmaglica / rick-and-morty-api-wrapper example snippets
php
$api = new RickAndMortyApiWrapper()
php
$api = new RickAndMortyApiWrapper()
php
$characterApi = $api->character(); // Or you can directly call new RickAndMortyApiWrapper()->character()
php
$characterApi->all();
php
$characterApi->get(1);
php
$characterApi->get([1,2,3]);
php
$characterApi->getOrigin(1);
php
$characterApi->getLocation(1);
php
$characterApi->isAlive()->isFemale()
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.