arnapou / owmclient
Library - OpenWeatherMap Api client.
v2.7.0
2024-11-25 08:45 UTC
Requires
- php: ~8.3.0 || ~8.4.0
- arnapou/dto: ^4.3
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
Requires (Dev)
- arnapou/psr-http: ^1.0
- friendsofphp/php-cs-fixer: ^3.52
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^2.0
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/php-code-coverage: ^11.0
- phpunit/phpunit: ^11.0
README
This library is a simple tool to query OpenWeatherMap Api.
Installation
composer require arnapou/owmclient
packagist 👉️ arnapou/owmclient
Example
Simply call and use either raw array, either recommended typed objects (the purpose of this lib).
use Arnapou\OwmClient\OwmApiClient;
use Http\Discovery\Psr17Factory;
use Http\Discovery\Psr18Client;
$client = new OwmApiClient("API_KEY", new Psr18Client(), new Psr17Factory());
$onecall = $client->onecall(longitude: 48.86, latitude: 2.23);
var_dump($onecall->daily->getItem(0)->temp->max);
// float(23.5)
Php versions
Date | Ref | 8.4 | 8.3 | 8.2 |
---|---|---|---|---|
25/11/2024 | 2.7.x, main | × | × | |
25/11/2023 | 2.0 - 2.6 | × | ||
03/09/2023 | 1.x | × |