| @@ 44-55 (lines=12) @@ | ||
| 41 | return $avoidancezoneparameters; |
|
| 42 | } |
|
| 43 | ||
| 44 | public static function getAvoidanceZone($territory_id) |
|
| 45 | { |
|
| 46 | $avoidancezone = Route4Me::makeRequst(array( |
|
| 47 | 'url' => self::$apiUrl, |
|
| 48 | 'method' => 'GET', |
|
| 49 | 'query' => array( |
|
| 50 | 'territory_id' => $territory_id |
|
| 51 | ) |
|
| 52 | )); |
|
| 53 | ||
| 54 | return $avoidancezone; |
|
| 55 | } |
|
| 56 | ||
| 57 | public static function getAvoidanceZones($params) |
|
| 58 | { |
|
| @@ 355-375 (lines=21) @@ | ||
| 352 | return $result; |
|
| 353 | } |
|
| 354 | ||
| 355 | public function delete($route_id) |
|
| 356 | { |
|
| 357 | $result = Route4Me::makeRequst(array( |
|
| 358 | 'url' => self::$apiUrl, |
|
| 359 | 'method' => 'DELETE', |
|
| 360 | 'query' => array( 'route_id' => $route_id ) |
|
| 361 | )); |
|
| 362 | ||
| 363 | // The code below doesn't work, altough this method is described as workable in REST API |
|
| 364 | /* |
|
| 365 | $result = Route4Me::makeRequst(array( |
|
| 366 | 'url' => self::$apiUrlDelete, |
|
| 367 | 'method' => 'GET', |
|
| 368 | 'query' => array( |
|
| 369 | 'api_key' => Route4Me::getApiKey(), |
|
| 370 | 'route_id' => $route_id, |
|
| 371 | ) |
|
| 372 | )); |
|
| 373 | */ |
|
| 374 | return $result; |
|
| 375 | } |
|
| 376 | ||
| 377 | public function GetAddressesFromRoute($route_id) |
|
| 378 | { |
|
| @@ 48-60 (lines=13) @@ | ||
| 45 | return $addressbooklocation; |
|
| 46 | } |
|
| 47 | ||
| 48 | public static function getAddressBookLocation($addressId) |
|
| 49 | { |
|
| 50 | $ablocations = Route4Me::makeRequst(array( |
|
| 51 | 'url' => self::$apiUrl, |
|
| 52 | 'method' => 'GET', |
|
| 53 | 'query' => array( |
|
| 54 | 'query' => $addressId, |
|
| 55 | 'limit' => 30 |
|
| 56 | ) |
|
| 57 | )); |
|
| 58 | ||
| 59 | return $ablocations; |
|
| 60 | } |
|
| 61 | ||
| 62 | public static function searchRoutedLocation($params) |
|
| 63 | { |
|
| @@ 93-104 (lines=12) @@ | ||
| 90 | return $ablocations; |
|
| 91 | } |
|
| 92 | ||
| 93 | public static function getAddressBookLocationsByIds($ids) |
|
| 94 | { |
|
| 95 | $ablocations = Route4Me::makeRequst(array( |
|
| 96 | 'url' => self::$apiUrl, |
|
| 97 | 'method' => 'GET', |
|
| 98 | 'query' => array( |
|
| 99 | 'address_id' => $ids |
|
| 100 | ) |
|
| 101 | )); |
|
| 102 | ||
| 103 | return $ablocations; |
|
| 104 | } |
|
| 105 | ||
| 106 | public static function addAdressBookLocation($params) |
|
| 107 | { |
|