/graphhopper-client

Primary LanguageRubyApache License 2.0Apache-2.0

graphhopper-client

GraphHopper - the Ruby gem for the GraphHopper Directions API

You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 0.11-SNAPSHOT
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Updating the gem

  • Replace the contents of this folder with https://github.com/graphhopper/directions-api-clients/tree/master/ruby, merging the existing gemspec file with the new one.
  • Remove the spec folder, specs are most probably automatically generated and, thus, useless.
  • Rename the root namespace and all references in the code and in the docs from GraphHopperClient to GraphHopper.
  • Remove auto-generated comments at the top of each file(d49eca4)
  • GraphHopper API has a model named Configuration. And the Swagger's code generation creates another Configuration class, causing a conflict. Rename lib/graphhopper/configuration.rb to something else, e.g. lib/graphhopper/gem_configuration.rb, rename the contained class accordingly, and update the references. Pay attention to only change the code related to the gem configuration, and not the API model(2acf823)
  • Change the timeout in the configuration(a48a8c9)
  • Update error handling code(70c1076)
  • Increment gem version.
  • Update these update instructions if necessary and put them in the new readme file.

Documentation for API Endpoints

All URIs are relative to https://graphhopper.com/api/1

Class Method HTTP request Description
GraphHopper::GeocodingApi geocode_get GET /geocode Execute a Geocoding request
GraphHopper::IsochroneApi isochrone_get GET /isochrone Isochrone Request
GraphHopper::MatrixApi matrix_get GET /matrix Matrix API
GraphHopper::MatrixApi matrix_post POST /matrix Matrix API Post
GraphHopper::RoutingApi route_get GET /route Routing Request
GraphHopper::SolutionApi get_solution GET /vrp/solution/{jobId} Return the solution associated to the jobId
GraphHopper::VrpApi post_vrp POST /vrp/optimize Solves vehicle routing problems

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key
  • API key parameter name: key
  • Location: URL query string