Coder Social home page Coder Social logo

ptv-group / clients-routing-api Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 1.0 1.37 MB

Clients for the Routing API

Home Page: https://developer.myptv.com

License: Apache License 2.0

Java 35.66% C# 49.98% TypeScript 14.36%
clients ptv-developer logistics maps maps-api routing-algorithm routing-api

clients-routing-api's Introduction

Clients for the Routing API (Version 1.31)

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.

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<string, string>(){["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

          <dependency>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-core</artifactId>
              <version>2.10.4</version>
          </dependency>
          <dependency>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-annotations</artifactId>
              <version>2.10.4</version>
          </dependency>
          <dependency>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-databind</artifactId>
              <version>2.10.4</version>
          </dependency>
          <dependency>
              <groupId>com.fasterxml.jackson.datatype</groupId>
              <artifactId>jackson-datatype-jsr310</artifactId>
              <version>2.10.4</version>
          </dependency>
          <dependency>
              <groupId>org.openapitools</groupId>
              <artifactId>jackson-databind-nullable</artifactId>
              <version>0.2.1</version>
          </dependency>
          <dependency>
              <groupId>com.github.ptv-logistics</groupId>
              <artifactId>openapi-generator-cli</artifactId>
              <version>6.2.1</version>
          </dependency>
          <dependency>
              <groupId>javax.ws.rs</groupId>
              <artifactId>javax.ws.rs-api</artifactId>
              <version>2.1.1</version>
          </dependency>
    

    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 API documentation.

clients-routing-api's People

Contributors

machineuserptv avatar

Stargazers

 avatar  avatar

Forkers

paulstoe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.