arnapou/owmclient

Library - OpenWeatherMap Api client.

v2.7.0 2024-11-25 08:45 UTC

This package is auto-updated.

Last update: 2024-11-25 07:48:51 UTC


README

pipeline coverage

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

DateRef8.48.38.2
25/11/20242.7.x, main××
25/11/20232.0 - 2.6×
03/09/20231.x×