Plugin API
Posted: Sun Sep 03, 2017 12:41 am
Something I would like to see with Meteotemplate is a extensive plugin API. API should be Object-Oriented, and should allow for lots of customization.
Official Forum for Meteotemplate weather website template.
https://www.meteotemplate.com/forum/
By plugin API, I just mean a way to ingrate into Meteotemplate. For example, to get the wind speed I might do this.Jachym wrote: ↑Sun Sep 03, 2017 11:03 am HI,
sorry, no clue what you mean by Plugin API. What should such plugin do? The API already supports all the sensors I could think of and you can send to it any data you want and set it in the extra sensors section.
OOP is something I dont use, for the purposes of MT and the way it is used it is not optimal.
Code: Select all
<?php
class MyPlugin extends Plugin {
$windspeed = $meteotemplate->getCurrentConditions()->getWindSpeed(); //Get wind speed
echo $windspeed; //Result
Yes, the datafeed plugin would work, just that in a future update a full api would be nice. There's already the API for updating the data.Jachym wrote: ↑Sat Sep 09, 2017 5:20 pm Hi,
as I explained what you are suggesting cannot work, simply because there is nothing to "extend", no part of the template (with the exception of one plugin, which was more like an experiment) is using OOP, so you cant just build it from scratch.
I still think the dataFeed plugin does what you need