Skip to content

Commit fed7d2b

Browse files
committed
Support v2 search API
1 parent ab4d2b4 commit fed7d2b

149 files changed

Lines changed: 780 additions & 167 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## Version 4.0.0 - 2025-06-11
9+
10+
### Added
11+
12+
- Support for the v2 `search` (forward geocoding) endpoint! The new API includes better structure, more details, and better address formatting.
13+
14+
```diff
15+
- $result = $this->apiInstance->search("Telliskivi 60a/3, Tallinn, Estonia");
16+
+ $result = $this->apiInstance->searchV2("Telliskivi 60a/3, Tallinn, Estonia");
17+
```
18+
19+
For an overview of the structural changes we've made in the V2 API,
20+
refer to the [migration guide](https://docs.stadiamaps.com/geocoding-search-autocomplete/v2-api-migration-guide/).
21+
22+
### Fixed
23+
24+
- **Possibly breaking change:** The `maneuvers` property on route responses was previously marked as required.
25+
However, it is possible to explicitly request routes with this field removed.
26+
These would fail validation and the whole request would end with an exception
27+
in the API client.
28+
This has been fixed in this version, so the property is optional.
29+
830
## Version 3.3.0 - 2025-06-03
931

1032
### Added

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ For more information, please visit [https://docs.stadiamaps.com](https://docs.st
99
### Requirements
1010

1111
PHP 8.1 and later.
12-
(NOTE: Unit tests use PHP 8-style named arguments.)
1312

1413
### Composer
1514

@@ -18,7 +17,7 @@ To install the bindings via [Composer](https://getcomposer.org/), add something
1817
```json
1918
{
2019
"require": {
21-
"stadiamaps/stadiamaps-api-php": "3.*"
20+
"stadiamaps/stadiamaps-api-php": "4.*"
2221
}
2322
}
2423
```
@@ -66,10 +65,10 @@ $apiInstance = new GeocodingApi(
6665
$text = '1600 Pennsylvania Ave NW'; // The place name (address, venue name, etc.) to search for.
6766

6867
try {
69-
$result = $apiInstance->autocompleteV2($text, lang: 'en');
68+
$result = $apiInstance->searchV2($text, lang: 'en');
7069
print_r($result);
7170
} catch (Exception $e) {
72-
echo 'Exception when calling GeocodingApi->autocomplete: ', $e->getMessage(), PHP_EOL;
71+
echo 'Exception when calling GeocodingApi->searchV2: ', $e->getMessage(), PHP_EOL;
7372
}
7473
```
7574

lib/Api/GeocodingApi.php

Lines changed: 580 additions & 1 deletion
Large diffs are not rendered by default.

lib/Api/GeospatialApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1616
*
17-
* The version of the OpenAPI document: 9.3.0
17+
* The version of the OpenAPI document: 10.0.0
1818
* Contact: support@stadiamaps.com
1919
* Generated by: https://openapi-generator.tech
2020
* Generator version: 7.13.0

lib/Api/RoutingApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1616
*
17-
* The version of the OpenAPI document: 9.3.0
17+
* The version of the OpenAPI document: 10.0.0
1818
* Contact: support@stadiamaps.com
1919
* Generated by: https://openapi-generator.tech
2020
* Generator version: 7.13.0

lib/ApiException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1616
*
17-
* The version of the OpenAPI document: 9.3.0
17+
* The version of the OpenAPI document: 10.0.0
1818
* Contact: support@stadiamaps.com
1919
* Generated by: https://openapi-generator.tech
2020
* Generator version: 7.13.0

lib/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1616
*
17-
* The version of the OpenAPI document: 9.3.0
17+
* The version of the OpenAPI document: 10.0.0
1818
* Contact: support@stadiamaps.com
1919
* Generated by: https://openapi-generator.tech
2020
* Generator version: 7.13.0
@@ -433,7 +433,7 @@ public static function toDebugReport()
433433
$report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL;
434434
$report .= ' OS: ' . php_uname() . PHP_EOL;
435435
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
436-
$report .= ' The version of the OpenAPI document: 9.3.0' . PHP_EOL;
436+
$report .= ' The version of the OpenAPI document: 10.0.0' . PHP_EOL;
437437
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
438438

439439
return $report;

lib/FormDataProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1616
*
17-
* The version of the OpenAPI document: 9.3.0
17+
* The version of the OpenAPI document: 10.0.0
1818
* Contact: support@stadiamaps.com
1919
* Generated by: https://openapi-generator.tech
2020
* Generator version: 7.13.0

lib/HeaderSelector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1616
*
17-
* The version of the OpenAPI document: 9.3.0
17+
* The version of the OpenAPI document: 10.0.0
1818
* Contact: support@stadiamaps.com
1919
* Generated by: https://openapi-generator.tech
2020
* Generator version: 7.13.0

lib/Model/Access.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
1717
*
18-
* The version of the OpenAPI document: 9.3.0
18+
* The version of the OpenAPI document: 10.0.0
1919
* Contact: support@stadiamaps.com
2020
* Generated by: https://openapi-generator.tech
2121
* Generator version: 7.13.0

0 commit comments

Comments
 (0)