An open API service indexing awesome lists of open source software.

https://github.com/ptv-logistics/clients-routing-osm-api

Clients for the Routing OSM API
https://github.com/ptv-logistics/clients-routing-osm-api

clients mapping maps-api openstreetmap openstreetmap-api openstreetmap-data osm ptv-developer routing-algorithm routing-api routing-engine

Last synced: 3 months ago
JSON representation

Clients for the Routing OSM API

Awesome Lists containing this project

README

          

# Clients for the Routing OSM API (Version 1.6)

Using client classes makes it easier and more convenient to integrate the API into an existing programming environment. We provide here clients for Java, C# and TypeScript. Alternatively you can generate the clients yourself by using this [tutorial](https://developer.myptv.com/en/resources/tutorials/general/how-generate-clients-ptv-developer-apis).

Language depending information:
* **DotNet:** Please add the following nuget packages to your client project
* Please use .NET 6.0
* JsonSubTypes (1.8.0)
* Polly (7.2.3)
* RestSharp (106.13.0)
* System.ComponentModel.Annotations (5.0.0)

To initialize your client with your APIKey you can use the following snippet:
```
var apiKey = new Dictionary(){["apiKey"] = "Enter your ApiKey here" };
var configuration = new Configuration() { ApiKey = apiKey };
RoutingApi routingApi = new RoutingApi(configuration);
```

* **Java:** Please add the following dependencies to your project
```

com.fasterxml.jackson.core
jackson-core
2.10.4


com.fasterxml.jackson.core
jackson-annotations
2.10.4


com.fasterxml.jackson.core
jackson-databind
2.10.4


com.fasterxml.jackson.datatype
jackson-datatype-jsr310
2.10.4


org.openapitools
jackson-databind-nullable
0.2.1


com.github.ptv-logistics
openapi-generator-cli
6.2.1


javax.ws.rs
javax.ws.rs-api
2.1.1

```
To initialize your client with your APIKey you can use the following snippet:
```
ApiClient apiClient = Configuration.getDefaultApiClient()
.setRequestInterceptor(builder -> builder.setHeader("ApiKey", "Enter your ApiKey here"));
RoutingApi routingApi = new RoutingApi(apiClient);
```

* **TypeScript:** Please add the following dependencies to your project
* nodeVersion (18.14.0)
* aurelia-api (3.2.1)
* aurelia-fetch-client (1.8.2)
* node-fetch (2.6.2)
* polly-js (1.8.0)
* typescript (4.9.5)
* typescript-http-client (0.10.4)
* @types/node-fetch (2.6.2)


To initialize your client with your APIKey you can use the following snippet:
```
let configurationParameters: ConfigurationParameters = {fetchApi: require('node-fetch'),
headers: {ApiKey: "Enter your ApiKey here"}};
let configuration: Configuration = new Configuration(configurationParameters);
let routingApi: RoutingApi = new RoutingApi(configuration);
```

 
 
Please refer to our [Routing OSM API](https://developer.myptv.com/en/documentation/routing-osm-api/quick-start-routing-osm-api) documentation.