6.0.0 • Published 5 years ago
@datafire/opencagedata v6.0.0
@datafire/opencagedata
Client library for OpenCage Geocoder
Installation and Usage
npm install --save @datafire/opencagedatalet opencagedata = require('@datafire/opencagedata').create();
.then(data => {
console.log(data);
});Description
Worldwide forward and reverse geocoding
Actions
vversion.format.get
geocode a query
opencagedata.vversion.format.get({
"version": 0,
"format": "",
"q": "",
"key": ""
}, context)Input
- input
object- version required
integer: API version. - format required
string: format of the response. One of 'json', 'xml' or 'map'. - q required
string: string or lat,lng to be geocoded. - key required
string: an application key. - abbrv
boolean: when true we attempt to abbreviate the formatted field in the response. - add_request
boolean: if true the request is included in the response. - bounds
string: four coordinate points forming the south-west and north-east corners of a bounding box (min long, min lat, max long, max lat). - countrycode
string: two letter code ISO 3166-1 Alpha 2 code to limit results to that country. - jsonp
string: wraps the returned JSON with a function name. - language
string: an IETF format language code (ex: 'es' or 'pt-BR'). - limit
integer: maximum number of results to return. Default is 10. Maximum is 100. - min_confidence
integer: integer from 1-10. Only results with at least this confidence are returned. - no_annotations
boolean: when true annotations are not added to results. - no_dedupe
boolean: when true results are not deduplicated. - no_record
boolean: when true query content is not logged. - pretty
boolean: when true results are pretty printed. Useful for debugging. - proximity
string: lat,lng to bias results. - roadinfo
boolean: match nearest road, include roadinfo annotation
- version required
Output
- output Response
Definitions
LatLng
- LatLng
object- lat
number - lng
number
- lat
Response
- Response
object- documentation
string - licenses
array- items
object- name
string - url
string
- name
- items
- rate
object- limit
integer - remaining
integer - reset
integer
- limit
- results
array - status
object- code
integer - message
string
- code
- stay_informed
object- blog
string - twitter
string
- blog
- thanks
string - timestamp
object- created_http
string - created_unix
integer
- created_http
- total_results
integer
- documentation