mirror of
https://gitnet.fr/deblan/gist.git
synced 2021-08-14 08:30:49 +02:00
14 lines
341 B
PHP
14 lines
341 B
PHP
<?php
|
|
|
|
use Gist\Api\Client;
|
|
|
|
$app['api_client'] = $app->share(function ($app) {
|
|
$client = new Client(['base_uri' => rtrim($app['settings']['api']['base_url'], '/')]);
|
|
|
|
if (!empty($app['settings']['api']['client']['api_key'])) {
|
|
$client->setApiKey($app['settings']['api']['client']['api_key']);
|
|
}
|
|
|
|
return $client;
|
|
});
|