Reputation: 2577
I am currently trying to get more familiar with Meteor, and am stuck trying to figure out reactive external API calls.
The article at https://dzone.com/articles/integrating-external-apis-your explains how to go about plugging an external API to the server-code and calling it via client side. However, as some have already pointed out, the Method call in Meteor is not reactive.
The more obvious way I can think of to update the data given from an external API's JSON is to simply set an interval. I have avoided doing so because I am hoping that there is a reactive method within Meteor to simply update the result displayed on my page in real time, as the JSON data changes.
I am having trouble finding clear sources of info regarding this. If anyone can share sources of info on this issue, or a working example of how to go about something like this, it would be much appreciated.
Upvotes: 0
Views: 454
Reputation: 2582
You can use this package okgrow:rest2ddp, it Convert REST APIs into DDP publications for your client side to reactively consume.
Upvotes: 1