public function testByLatitudeLongitude() { $options = new RestaurantsLocalFavoritesRequestOptions(0, 25); $options->setLatitude(38.53463); $options->setLongitude(-90.286781); $restaurants = $this->service->getRestaurants($options); $this->assertTrue(count($restaurants->getRestaurant()) > 0); }
private function getURL(RestaurantsLocalFavoritesRequestOptions $options) { $url = ""; if ($this->environment == Environment::PRODUCTION) { $url = $this->PRODUCTION_URL; } else { $url = $this->SANDBOX_URL; } $url = URLUtil::addQueryParameter($url, "PageLength", $options->getPageLength()); $url = URLUtil::addQueryParameter($url, "PageOffset", $options->getPageOffset()); $url = URLUtil::addQueryParameter($url, "AddressLine1", $options->getAddressLine1()); $url = URLUtil::addQueryParameter($url, "AddressLine2", $options->getAddressLine2()); $url = URLUtil::addQueryParameter($url, "City", $options->getCity()); $url = URLUtil::addQueryParameter($url, "CountrySubdivision", $options->getCountrySubdivision()); $url = URLUtil::addQueryParameter($url, "PostalCode", $options->getPostalCode()); $url = URLUtil::addQueryParameter($url, "Country", $options->getCountry()); $url = URLUtil::addQueryParameter($url, "Latitude", $options->getLatitude()); $url = URLUtil::addQueryParameter($url, "Longitude", $options->getLongitude()); $url = URLUtil::addQueryParameter($url, "DistanceUnit", $options->getDistanceUnit()); $url = URLUtil::addQueryParameter($url, "Radius", $options->getRadius()); return $url; }