95628a5c by fehrlich

added getDomain

1 parent c51ee11c
...@@ -164,13 +164,25 @@ abstract class ImmoScoutAPI extends GuzzleClient ...@@ -164,13 +164,25 @@ abstract class ImmoScoutAPI extends GuzzleClient
164 } 164 }
165 165
166 /** 166 /**
167 * get is24 domain depending on the sandbox.
168 *
169 * @return string base url
170 */
171 public function getDomain()
172 {
173 return $this->isSandbox ? 'sandbox-immobilienscout24.de' : 'immobilienscout24.de';
174 }
175
176 /**
167 * get base api url depending on the sandbox. 177 * get base api url depending on the sandbox.
168 * 178 *
169 * @return string base url 179 * @return string base url
170 */ 180 */
171 private function getBaseUrl() 181 private function getBaseUrl()
172 { 182 {
173 return $this->isSandbox ? 'https://rest.sandbox-immobilienscout24.de/restapi/' : 'https://rest.immobilienscout24.de/restapi/'; 183 $domain = $this->getDomain();
184
185 return 'https://rest.' . $domain . '/restapi/';
174 } 186 }
175 187
176 /** 188 /**
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!