tests/testthat/test_autocomplete_api.R

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

context("Test AutocompleteApi")

api.instance <- AutocompleteApi$new()

test_that("Autocomplete", {
  # tests for Autocomplete
  # base path: https://eu1.locationiq.com/v1
  # The Autocomplete API is a variant of the Search API that returns place predictions in response to an HTTP request.  The request specifies a textual search string and optional geographic bounds.  The service can be used to provide autocomplete functionality for text-based geographic searches, by returning places such as businesses, addresses and points of interest as a user types. The Autocomplete API can match on full words as well as substrings. Applications can therefore send queries as the user types, to provide on-the-fly place predictions.
  # @param character  q  Address to geocode 
  # @param integer  normalizecity  For responses with no city value in the address section, the next available element in this order - city_district, locality, town, borough, municipality, village, hamlet, quarter, neighbourhood - from the address section will be normalized to city. Defaults to 1 for SDKs. 
  # @param integer  limit  Limit the number of returned results. Default is 10.  (optional)
  # @param character  viewbox  The preferred area to find search results.  To restrict results to those within the viewbox, use along with the bounded option. Tuple of 4 floats. Any two corner points of the box - `max_lon,max_lat,min_lon,min_lat` or `min_lon,min_lat,max_lon,max_lat` - are accepted in any order as long as they span a real box.   (optional)
  # @param integer  bounded  Restrict the results to only items contained with the viewbox  (optional)
  # @param character  countrycodes  Limit search to a list of countries.  (optional)
  # @param character  accept.language  Preferred language order for showing search results, overrides the value specified in the Accept-Language HTTP header. Defaults to en. To use native language for the response when available, use accept-language=native  (optional)
  # @param character  tag  Restricts the autocomplete search results to elements of specific OSM class and type.  Example - To restrict results to only class place and type city: tag=place:city, To restrict the results to all of OSM class place: tag=place  (optional)
  # @return [array[object]]

  # 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.