1

Does anyone have any experience with integrating the forecast.io API for location data for a Craft CMS site? I haven't been able to find any direct plugins for Forecast.io, but I was investigating the REST plugin as a possible option and I've also heard about FeedMe as well. Are there any preferred options as a best practice? My hope would be to be able to pull the data in and use it within a field of an existing entries page based on data on that entries page.

On a related note does wrapping Craft's caching tag around these plugin calls cache plugin output too? Probably a stupid question, just wanting to make sure I approach this solution correctly.

Tim Knight
  • 1,022
  • 8
  • 17

1 Answers1

0

Looks like there are already several PHP libraries for the forecast.io API.

I'd probably spend a few minutes reviewing those and find one that's to your liking. Then, it's a simple as writing a Craft plugin that utilizes that library to make calls to their API and deal with the response as appropriate.

Brad Bell
  • 67,440
  • 6
  • 73
  • 143
  • Thanks Brad! I kind of figure that might be the way to go. Time to finally read about creating plugins for Craft. – Tim Knight Mar 28 '16 at 23:47
  • Brad, a quick follow up question if I may. Are you aware of a plugin that uses an existing PHP package as the foundation of the plugin that I could reference in terms of development? – Tim Knight Mar 29 '16 at 01:01
  • You can use pluginfactory.io to generate the boilerplate Craft plugin code and read over something like this to see how to integrate a composer package into a Craft plugin: https://craftcms.stackexchange.com/questions/4859/plugin-dev-load-third-party-library/ – Brad Bell Mar 29 '16 at 01:20