code: public function getById($characterId)
      {
          try {
              $result = $this->client->get($this->slug . '/' . $characterId);
          } catch (RequestException $e) {
              $return['request'] = $e->getRequest() . "\n";
              if ($e->hasResponse()) {
                  return $return['response'] = $e->getResponse() . "\n";
  
              }
          }
  
          return $result->json();
      }
docs: Get resource by id
  @param $characterId
  @return mixed|string