feat(dashboard): add price history, caching, and i18n
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Features\Dashboard\Clients;
|
||||
use App\Features\Dashboard\Contracts\PriceClient;
|
||||
use Exception;
|
||||
use Illuminate\Http\Client\Factory;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
|
||||
@@ -14,14 +15,14 @@ class ZonneplanPriceClient implements PriceClient
|
||||
private readonly Factory $http,
|
||||
) {}
|
||||
|
||||
public function getElectricityPrices(): array
|
||||
public function getElectricityPrices(): Collection
|
||||
{
|
||||
return $this->get('/energy-prices/electricity/upcoming');
|
||||
return collect($this->get('/energy-prices/electricity/upcoming'));
|
||||
}
|
||||
|
||||
public function getGasPrices(): array
|
||||
public function getGasPrices(): Collection
|
||||
{
|
||||
return $this->get('/energy-prices/gas/upcoming');
|
||||
return collect($this->get('/energy-prices/gas/upcoming'));
|
||||
}
|
||||
|
||||
/** @return array<int, array<string, mixed>> */
|
||||
|
||||
Reference in New Issue
Block a user