From 622affb628c1c273619a76d5c1e2e1b0505add39 Mon Sep 17 00:00:00 2001 From: Andrei Simion Date: Mon, 20 Apr 2015 00:38:17 +0100 Subject: [PATCH] Implemented getDestinationId --- Dyatlov/Expedia/API.php | 14 ++++++++++++++ Dyatlov/Expedia/Expedia.php | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Dyatlov/Expedia/API.php b/Dyatlov/Expedia/API.php index 50a32a6..cc194f7 100644 --- a/Dyatlov/Expedia/API.php +++ b/Dyatlov/Expedia/API.php @@ -44,6 +44,20 @@ public function getAvailableRooms($params) { return $result; } + /** + * @see http://developer.ean.com/docs/geo-functions/examples/rest-location-search/ + * + * @param $params + * @return mixed + */ + public function getDestinationId($params) { + $result = $this->geoSearch($params); + + $this->checkForEanError($result); + + return $result['LocationInfos']['LocationInfo']['destinationId']; + } + public function getHotelList($params) { $result = array(); diff --git a/Dyatlov/Expedia/Expedia.php b/Dyatlov/Expedia/Expedia.php index 42723cc..396b8d8 100644 --- a/Dyatlov/Expedia/Expedia.php +++ b/Dyatlov/Expedia/Expedia.php @@ -264,8 +264,6 @@ protected function getDefaultRequestOptions() { 'customerUserAgent' => $this->get_customer_user_agent(), 'currencyCode' => $this->get_currency_code(), 'apiExperience' => 'PARTNER_WEBSITE', - 'includeDetails' => 1, - 'includeHotelFeeBreakdown' => 1, ); }