PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
← All changes | app/Http/Metricool/Entities/User.php +30 -0 2.0.0 → 2.1.1 View file →
@@ -1,0 +1,30 @@
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 +}