diff --git a/src/SWAPI.php b/src/SWAPI.php index a62518c..4cbc94a 100644 --- a/src/SWAPI.php +++ b/src/SWAPI.php @@ -30,7 +30,7 @@ public function __construct() protected function createHttpClient() { return new Client([ - 'base_url' => 'http://swapi.co/api/', + 'base_url' => 'https://swapi.dev/api/', 'default' => [ 'exceptions' => false, 'headers' => [ @@ -137,7 +137,7 @@ public function getFromUri($uri) { if (preg_match("/\/api\/(\w+)\/(\d+)(\/|$)/", $uri, $matches) !== false) { switch (strtolower($matches[1])) { - case "characters": + case "people": return $this->characters()->get($matches[2]); case "films": return $this->films()->get($matches[2]);