/** * @param string $base_url * e.g. "https://store.mercury.dev.allplayers.com". * @param Logger $logger * (Optional) */ public function __construct($base_url, Logger $logger = null) { if (empty($base_url)) { throw new InvalidArgumentException('Invalid argument 1: base_url must be a base URL to the Store.'); } $this->base_url = $base_url; parent::__construct($base_url . self::ENDPOINT, $logger); }
/** * @param string $url * e.g. https://www.allplayers.com * @param Logger $logger * (optional) */ public function __construct($base_url, Logger $logger = null) { parent::__construct("{$base_url}/api/v1/rest", $logger); }