22 lines
876 B
PHP
22 lines
876 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Weerscherm;
|
|
|
|
/** Ruwe data van de drie upstream-bronnen. Implementaties: LiveSource (echte API's) en FixtureSource (voorbeelddata). */
|
|
interface WeatherSource
|
|
{
|
|
/** @return array<string, mixed> de "body" van Netatmo getstationsdata */
|
|
public function stationsData(): array;
|
|
|
|
/** @return array<string|int, mixed> de "body" van Netatmo getmeasure (timestamp => [mm]) */
|
|
public function measure(string $deviceId, string $moduleId, int $begin, int $end): array;
|
|
|
|
/** @return array<string|int, mixed> de "body" van Netatmo getmeasure (timestamp => [hPa]) voor het basisstation */
|
|
public function pressureHistory(string $deviceId, int $begin, int $end): array;
|
|
|
|
/** @return array<string, mixed> het "daily"-blok van Open-Meteo */
|
|
public function forecast(float $lat, float $lon, string $timezone): array;
|
|
}
|