wundergroundAPI: fix Meta.pm support

git-svn-id: https://svn.fhem.de/fhem/trunk@19223 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2019-04-19 16:56:02 +00:00
parent 0ead9104d7
commit bf664d80b6

View File

@ -1,5 +1,14 @@
# $Id$ # $Id$
package wundergroundAPI;
use strict;
use warnings;
use FHEM::Meta;
use Data::Dumper;
FHEM::Meta::Load(__PACKAGE__);
use version 0.77; our $VERSION = $main::packages{wundergroundAPI}{META}{version};
package wundergroundAPI::Weather; package wundergroundAPI::Weather;
use strict; use strict;
use warnings; use warnings;
@ -7,7 +16,6 @@ use warnings;
use POSIX; use POSIX;
use Encode; use Encode;
use HttpUtils; use HttpUtils;
use FHEM::Meta;
# try to use JSON::MaybeXS wrapper # try to use JSON::MaybeXS wrapper
# for chance of better performance + open code # for chance of better performance + open code
@ -86,8 +94,6 @@ use constant DEMODATA =>
use constant URL => 'https://api.weather.com/'; use constant URL => 'https://api.weather.com/';
use version 0.77; our $VERSION = $main::packages{Meta}{META}{version};
sub new { sub new {
my ( $class, $argsRef ) = @_; my ( $class, $argsRef ) = @_;
my $apioptions = parseApiOptions( $argsRef->{apioptions} ); my $apioptions = parseApiOptions( $argsRef->{apioptions} );
@ -677,7 +683,7 @@ sub _CreateForecastRef($) {
lat => $self->{lat}, lat => $self->{lat},
long => $self->{long}, long => $self->{long},
apiMaintainer => 'Julian Pawlowski (loredo)', apiMaintainer => 'Julian Pawlowski (loredo)',
apiVersion => $VERSION, apiVersion => wundergroundAPI->VERSION(),
} }
); );
@ -719,7 +725,7 @@ sub strftimeWrapper(@) {
"abstract": "Wetter API für Weather Underground" "abstract": "Wetter API für Weather Underground"
} }
}, },
"version": "v0.0.1", "version": "v0.0.2",
"release_status": "testing", "release_status": "testing",
"author": [ "author": [
"Julian Pawlowski <julian.pawlowski@gmail.com>" "Julian Pawlowski <julian.pawlowski@gmail.com>"