- Working version
This commit is contained in:
1 parent
c2e7628b22
commit
9c70225a77
7 files changed
+173
-81
No files matched your search
+2
-1
@@ -7,7 +7,8 @@ return [
|
||||
'adapter' => getenv("WEATHER_API_ADAPTER"),
|
||||
'url' => getenv("WEATHER_API_URL"),
|
||||
'auth' => getenv('WEATHER_API_AUTH') ?: 'token',
|
||||
'key' => getenv("WEATHER_API_KEY"),
|
||||
'header' => getenv("WEATHER_API_HEADER"),
|
||||
'secret' => getenv("WEATHER_API_SECRET"),
|
||||
'options' => [],
|
||||
],
|
||||
]
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
Ulmus\Api\Weather\ApiHandler::class => DI\create(Ulmus\Api\Weather\ApiHandler::class)->constructor(getenv('WEATHER_API_UNIT_SCALE')),
|
||||
|
||||
'api.weather' => function($c) {
|
||||
$adapter = new \Ulmus\Api\ConnectionAdapter($c->create(Ulmus\Api\Weather\ApiHandler::class)->constructor(getenv('WEATHER_API_UNIT_SCALE')), 'api-weather', $c->get('config')['ulmus'], false);
|
||||
$adapter = new \Ulmus\Api\ConnectionAdapter($c->get(Ulmus\Api\Weather\ApiHandler::class), 'api-weather', $c->get('config')['ulmus'], false);
|
||||
$adapter->resolveConfiguration();
|
||||
|
||||
return $adapter;
|
||||
|
||||
Reference in new issue
Block a user