Open hermygithub opened 6 years ago
Hey. Thanks for approaching. We'll look at the issue soon.
As this issue is still open. Maybe you might have a look at https://github.com/energychain/node-red-contrib-rapidapi a dedicated node to easily work with RapidAPI hosted APIs. You just need to copy your API key, host, and Endpoint URL. Input parameters and results are in msg.payload
.
Hi,
i'm trying to integrate the library of the rapidapi connector via the example nodejs code that is generated when using the Google Maps Distance Matrix API https://rapidapi.com/stefan.skliarov/api/GoogleMapsDistanceMatrix/functions/getDrivingDistanceMatrix
i have installed the package(s) and integrated the library in the settings.js of node-red https://nodered.org/docs/writing-functions.html#global-context
functionGlobalContext: { RapidAPI:require('rapidapi-connect') },
when i fetch the rapidapi from the global context via a function node, this works
const RapidAPI = global.get("RapidAPI"); const rapid = new RapidAPI('xxxxxxxxxxxxxxxxxxxxxx' , '/connect/auth/xxxxxxxxxxxxxxxxxxxxxxxxx');
when triggering the code, node-red is going into a blocked state, no response comming
` try {
} catch(err) { node.log(err); msg.err= err; }`
any idea on how to make such calls via the rapidapi connector for nodejs?
node-v8.1.4-win-x64
node -v v8.1.4
node red version
"_from": "node-red", "_id": "node-red@0.17.4", "_integrity": "sha1-CHooGfa1lwAWa+KbBJRq1ArFE9I=",
thx
H