95628a5c by fehrlich

added getDomain

1 parent c51ee11c
......@@ -164,13 +164,25 @@ abstract class ImmoScoutAPI extends GuzzleClient
}
/**
* get is24 domain depending on the sandbox.
*
* @return string base url
*/
public function getDomain()
{
return $this->isSandbox ? 'sandbox-immobilienscout24.de' : 'immobilienscout24.de';
}
/**
* get base api url depending on the sandbox.
*
* @return string base url
*/
private function getBaseUrl()
{
return $this->isSandbox ? 'https://rest.sandbox-immobilienscout24.de/restapi/' : 'https://rest.immobilienscout24.de/restapi/';
$domain = $this->getDomain();
return 'https://rest.' . $domain . '/restapi/';
}
/**
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!