forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnifiConnector.php
More file actions
39 lines (33 loc) · 751 Bytes
/
UnifiConnector.php
File metadata and controls
39 lines (33 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace App\Http\Integrations\Unifi;
use Saloon\Http\Connector;
use Saloon\Traits\Plugins\AcceptsJson;
class UnifiConnector extends Connector
{
use AcceptsJson;
/**
* The Base URL of the API
*/
public function resolveBaseUrl(): string
{
return config('services.unifi-api.base_url').'/proxy/network/integration/v1';
}
/**
* Default config for the connector
*/
protected function defaultConfig(): array
{
return [
'verify' => false,
];
}
/**
* Default headers for the connector
*/
protected function defaultHeaders(): array
{
return [
'X-API-KEY' => config('services.unifi-api.token'),
];
}
}