Plugin API
-
Dog2puppy
- Newbie

- Posts: 4
- Joined: Sat Sep 02, 2017 3:32 pm
- Station model: AcuRite PRO+ 5-in-1
- Software: Wunderground
Plugin API
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.
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Plugin API
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.
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.
-
Dog2puppy
- Newbie

- Posts: 4
- Joined: Sat Sep 02, 2017 3:32 pm
- Station model: AcuRite PRO+ 5-in-1
- Software: Wunderground
Re: Plugin API
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
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Plugin API
Right I see,
the entire template is done in a procedural style, not objective.
What you want can easily be achieved using the stationFeed plugin, which gives you the data in both JSON and XML format
the entire template is done in a procedural style, not objective.
What you want can easily be achieved using the stationFeed plugin, which gives you the data in both JSON and XML format
-
Dog2puppy
- Newbie

- Posts: 4
- Joined: Sat Sep 02, 2017 3:32 pm
- Station model: AcuRite PRO+ 5-in-1
- Software: Wunderground
Re: Plugin API
The thing is, I would like to see a expandable system. The way it is now is fine, but in a future update a plugin API would be nice.
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Plugin API
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
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
-
Dog2puppy
- Newbie

- Posts: 4
- Joined: Sat Sep 02, 2017 3:32 pm
- Station model: AcuRite PRO+ 5-in-1
- Software: Wunderground
Re: Plugin API
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
- Jachym
- Site Admin

- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Plugin API
But how do you want to make an API when the whole thing is programmed completely differently to what you are proposing