| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Metricool\Http\Metricool\Entities; |
| 6 |
|
| 7 |
use Metricool\Http\Metricool\Exceptions\ApiException; |
| 8 |
use Metricool\Http\Metricool\MetricoolClient; |
| 9 |
|
| 10 |
class User |
| 11 |
{ |
| 12 |
protected MetricoolClient $client; |
| 13 |
protected string $endpoint; |
| 14 |
|
| 15 |
public function __construct(MetricoolClient $client) |
| 16 |
{ |
| 17 |
$this->client = $client; |
| 18 |
$this->endpoint = 'user/settings'; |
| 19 |
} |
| 20 |
|
| 21 |
/** |
| 22 |
* Get the user information |
| 23 |
* |
| 24 |
* @throws ApiException |
| 25 |
*/ |
| 26 |
public function get(): array |
| 27 |
{ |
| 28 |
return $this->client->get($this->endpoint); |
| 29 |
} |
| 30 |
} |
| 31 |
|