Skip to content

Commit

Permalink
Add navigation aids + OSRM format support
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed Sep 4, 2024
1 parent 697625b commit 92320f0
Show file tree
Hide file tree
Showing 131 changed files with 12,833 additions and 235 deletions.
21 changes: 21 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ lib/HeaderSelector.php
lib/Model/Access.php
lib/Model/AdminRegion.php
lib/Model/Administrative.php
lib/Model/AnnotationFilters.php
lib/Model/AutoCostingOptions.php
lib/Model/BaseCostingOptions.php
lib/Model/BaseTraceRequest.php
Expand All @@ -30,6 +31,7 @@ lib/Model/DistanceUnit.php
lib/Model/EdgeSign.php
lib/Model/EdgeUse.php
lib/Model/EndNode.php
lib/Model/ExtendedDirectionsOptions.php
lib/Model/GeoAttributes.php
lib/Model/GeoJSONGeometry.php
lib/Model/GeoJSONGeometryBase.php
Expand Down Expand Up @@ -72,6 +74,24 @@ lib/Model/NearestRoadsRequest.php
lib/Model/NodeId.php
lib/Model/NodeType.php
lib/Model/OptimizedRouteRequest.php
lib/Model/OsrmAdmin.php
lib/Model/OsrmAnnotation.php
lib/Model/OsrmBannerComponent.php
lib/Model/OsrmBannerContent.php
lib/Model/OsrmBannerInstruction.php
lib/Model/OsrmBaseApiResponse.php
lib/Model/OsrmGuidanceModifier.php
lib/Model/OsrmIntersection.php
lib/Model/OsrmLane.php
lib/Model/OsrmRoute.php
lib/Model/OsrmRouteLeg.php
lib/Model/OsrmRouteResponse.php
lib/Model/OsrmRouteStep.php
lib/Model/OsrmSpeedLimit.php
lib/Model/OsrmStepManeuver.php
lib/Model/OsrmViaWaypoint.php
lib/Model/OsrmVoiceInstruction.php
lib/Model/OsrmWaypoint.php
lib/Model/PedestrianCostingOptions.php
lib/Model/PeliasGeoJSONFeature.php
lib/Model/PeliasGeoJSONProperties.php
Expand All @@ -82,6 +102,7 @@ lib/Model/PeliasResponse.php
lib/Model/PeliasSource.php
lib/Model/Restrictions.php
lib/Model/RoadClass.php
lib/Model/Route200Response.php
lib/Model/RouteLeg.php
lib/Model/RouteManeuver.php
lib/Model/RouteRequest.php
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.7.0
7.8.0
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ try {
```

For more examples, check out the [integration tests](https://github.com/stadiamaps/stadiamaps-api-php/tree/main/test/Api).
Note that most of our examples use associative arrays for brevity,
but you can also construct empty request classes and uss methods for better IDE autocompletion.


4 changes: 2 additions & 2 deletions lib/Api/GeocodingApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/Api/GeospatialApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down
36 changes: 18 additions & 18 deletions lib/Api/RoutingApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down Expand Up @@ -1066,7 +1066,7 @@ public function nearestRoadsRequest($nearest_roads_request = null, string $conte
*
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \OpenAPI\Client\Model\RouteResponse
* @return \OpenAPI\Client\Model\Route200Response
*/
public function optimizedRoute($optimized_route_request = null, string $contentType = self::contentTypes['optimizedRoute'][0])
{
Expand All @@ -1084,7 +1084,7 @@ public function optimizedRoute($optimized_route_request = null, string $contentT
*
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \OpenAPI\Client\Model\RouteResponse, HTTP status code, HTTP response headers (array of strings)
* @return array of \OpenAPI\Client\Model\Route200Response, HTTP status code, HTTP response headers (array of strings)
*/
public function optimizedRouteWithHttpInfo($optimized_route_request = null, string $contentType = self::contentTypes['optimizedRoute'][0])
{
Expand Down Expand Up @@ -1127,11 +1127,11 @@ public function optimizedRouteWithHttpInfo($optimized_route_request = null, stri

switch($statusCode) {
case 200:
if ('\OpenAPI\Client\Model\RouteResponse' === '\SplFileObject') {
if ('\OpenAPI\Client\Model\Route200Response' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\OpenAPI\Client\Model\RouteResponse' !== 'string') {
if ('\OpenAPI\Client\Model\Route200Response' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
Expand All @@ -1149,13 +1149,13 @@ public function optimizedRouteWithHttpInfo($optimized_route_request = null, stri
}

return [
ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\RouteResponse', []),
ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Route200Response', []),
$response->getStatusCode(),
$response->getHeaders()
];
}

$returnType = '\OpenAPI\Client\Model\RouteResponse';
$returnType = '\OpenAPI\Client\Model\Route200Response';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
Expand Down Expand Up @@ -1188,7 +1188,7 @@ public function optimizedRouteWithHttpInfo($optimized_route_request = null, stri
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OpenAPI\Client\Model\RouteResponse',
'\OpenAPI\Client\Model\Route200Response',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
Expand Down Expand Up @@ -1232,7 +1232,7 @@ function ($response) {
*/
public function optimizedRouteAsyncWithHttpInfo($optimized_route_request = null, string $contentType = self::contentTypes['optimizedRoute'][0])
{
$returnType = '\OpenAPI\Client\Model\RouteResponse';
$returnType = '\OpenAPI\Client\Model\Route200Response';
$request = $this->optimizedRouteRequest($optimized_route_request, $contentType);

return $this->client
Expand Down Expand Up @@ -1371,7 +1371,7 @@ public function optimizedRouteRequest($optimized_route_request = null, string $c
*
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \OpenAPI\Client\Model\RouteResponse
* @return \OpenAPI\Client\Model\Route200Response
*/
public function route($route_request = null, string $contentType = self::contentTypes['route'][0])
{
Expand All @@ -1389,7 +1389,7 @@ public function route($route_request = null, string $contentType = self::content
*
* @throws \OpenAPI\Client\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \OpenAPI\Client\Model\RouteResponse, HTTP status code, HTTP response headers (array of strings)
* @return array of \OpenAPI\Client\Model\Route200Response, HTTP status code, HTTP response headers (array of strings)
*/
public function routeWithHttpInfo($route_request = null, string $contentType = self::contentTypes['route'][0])
{
Expand Down Expand Up @@ -1432,11 +1432,11 @@ public function routeWithHttpInfo($route_request = null, string $contentType = s

switch($statusCode) {
case 200:
if ('\OpenAPI\Client\Model\RouteResponse' === '\SplFileObject') {
if ('\OpenAPI\Client\Model\Route200Response' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\OpenAPI\Client\Model\RouteResponse' !== 'string') {
if ('\OpenAPI\Client\Model\Route200Response' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
Expand All @@ -1454,13 +1454,13 @@ public function routeWithHttpInfo($route_request = null, string $contentType = s
}

return [
ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\RouteResponse', []),
ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Route200Response', []),
$response->getStatusCode(),
$response->getHeaders()
];
}

$returnType = '\OpenAPI\Client\Model\RouteResponse';
$returnType = '\OpenAPI\Client\Model\Route200Response';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
Expand Down Expand Up @@ -1493,7 +1493,7 @@ public function routeWithHttpInfo($route_request = null, string $contentType = s
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OpenAPI\Client\Model\RouteResponse',
'\OpenAPI\Client\Model\Route200Response',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
Expand Down Expand Up @@ -1537,7 +1537,7 @@ function ($response) {
*/
public function routeAsyncWithHttpInfo($route_request = null, string $contentType = self::contentTypes['route'][0])
{
$returnType = '\OpenAPI\Client\Model\RouteResponse';
$returnType = '\OpenAPI\Client\Model\Route200Response';
$request = $this->routeRequest($route_request, $contentType);

return $this->client
Expand Down
10 changes: 5 additions & 5 deletions lib/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down Expand Up @@ -50,7 +50,7 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var string[]|null
* @var string[][]|null
*/
protected $responseHeaders;

Expand All @@ -66,7 +66,7 @@ class ApiException extends Exception
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header
* @param string[][]|null $responseHeaders HTTP response header
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
Expand All @@ -79,7 +79,7 @@ public function __construct($message = "", $code = 0, $responseHeaders = [], $re
/**
* Gets the HTTP response header
*
* @return string[]|null HTTP response header
* @return string[][]|null HTTP response header
*/
public function getResponseHeaders()
{
Expand Down
6 changes: 3 additions & 3 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down Expand Up @@ -433,7 +433,7 @@ public static function toDebugReport()
$report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 6.6.3' . PHP_EOL;
$report .= ' The version of the OpenAPI document: 7.0.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
4 changes: 2 additions & 2 deletions lib/HeaderSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/AdminRegion.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/Administrative.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*
* The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
*
* The version of the OpenAPI document: 6.6.3
* The version of the OpenAPI document: 7.0.0
* Contact: [email protected]
* Generated by: https://openapi-generator.tech
* Generator version: 7.7.0
* Generator version: 7.8.0
*/

/**
Expand Down
Loading

0 comments on commit 92320f0

Please sign in to comment.