auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, auths) => {
}
return await require("@pipedreamhq/platform").axios(this, {
url: `https://api.opencagedata.com/geocode/v1/json?key=${auths.opencage.api_key}&q=51.952659%2C+7.632473&pretty=1&no_annotations=1`,
})
The format component of the URL should be replaced with one of the following json, geojson, xml, map or google-v3-json.
A latitude, longitude or a placename/address. The query should be URL encoded, so spaces should be a +, comma should be %2C, instead of, for example, non-ascii strings like München you should send us M%C3%BCnchen.
async
(params, auths) => {
}
return await require("@pipedreamhq/platform").axios(this, {
url: `https://api.opencagedata.com/geocode/v1/${params.format}`,
params: {
key: auths.opencage.api_key,
q: params.q,
abbrv: params.abbrv,
add_request: params.add_request,
bounds: params.bounds,
countrycode: params.countrycode,
jsonp: params.jsonp,
language: params.language,
limit: params.limit,
min_confidence: params.min_confidence,
no_annotations: params.no_annotations,
no_dedupe: params.no_dedupe,
no_record: params.no_record,
pretty: params.pretty,
proximity: params.proximity,
roadinfo: params.roadinfo,
},
})