tests/testthat/test_matrix_api.R

# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate

context("Test MatrixApi")

api.instance <- MatrixApi$new()

test_that("Matrix", {
  # tests for Matrix
  # base path: https://eu1.locationiq.com/v1
  # Matrix Service
  # Computes duration of the fastest route between all pairs of supplied coordinates. Returns the durations or distances or both between the coordinate pairs. Note that the distances are not the shortest distance between two coordinates, but rather the distances of the fastest routes.
  # @param character  coordinates  String of format {longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...] or polyline({polyline}) or polyline6({polyline6}). polyline follows Google's polyline format with precision 5 
  # @param character  bearings  Limits the search to segments with given bearing in degrees towards true north in clockwise direction. List of positive integer pairs separated by semi-colon and bearings array should be equal to length of coordinate array. Input Value :- {bearing};{bearing}[;{bearing} ...] Bearing follows the following format : bearing {value},{range} integer 0 .. 360,integer 0 .. 180  (optional)
  # @param character  radiuses  Limits the search to given radius in meters Radiuses array length should be same as coordinates array, eaach value separated by semi-colon. Input Value - {radius};{radius}[;{radius} ...] Radius has following format :- double >= 0 or unlimited (default)  (optional)
  # @param character  generate.hints  Adds a Hint to the response which can be used in subsequent requests, see hints parameter. Input Value - true (default), false Format - Base64 String  (optional)
  # @param character  approaches  Keep waypoints on curb side. Input Value - {approach};{approach}[;{approach} ...] Format - curb or unrestricted (default)  (optional)
  # @param character  exclude  Additive list of classes to avoid, order does not matter. input Value - {class}[,{class}] Format - A class name determined by the profile or none.  (optional)
  # @param character  annotations  Returns additional metadata for each coordinate along the route geometry.  [ true, false (default), nodes, distance, duration, datasources, weight, speed ]  (optional)
  # @param integer  sources  Use location with given index as source. [ {index};{index}[;{index} ...] or all (default) ] => index  0 <= integer < #locations  (optional)
  # @param integer  destinations  Use location with given index as destination. [ {index};{index}[;{index} ...] or all (default) ]  (optional)
  # @param numeric  fallback.speed  If no route found between a source/destination pair, calculate the as-the-crow-flies distance,  then use this speed to estimate duration. double > 0  (optional)
  # @param character  fallback.coordinate  When using a fallback_speed, use the user-supplied coordinate (input), or the snapped location (snapped) for calculating distances. [ input (default), or snapped ]  (optional)
  # @return [DirectionsMatrix]

  # uncomment below to test the operation
  #expect_equal(result, "EXPECTED_RESULT")
})
location-iq/locationiq-r-client documentation built on Feb. 28, 2020, 9:42 p.m.