1 | <?php |
||
10 | class SearchConsole |
||
11 | { |
||
12 | /** @var SearchConsoleClient */ |
||
13 | protected $client; |
||
14 | |||
15 | /** |
||
16 | * @param SearchConsoleClient $client |
||
17 | */ |
||
18 | public function __construct(SearchConsoleClient $client) |
||
22 | |||
23 | /** |
||
24 | * @param string $quotaUser |
||
25 | * |
||
26 | * @return $this |
||
27 | */ |
||
28 | public function setQuotaUser(string $quotaUser) |
||
34 | |||
35 | /** |
||
36 | * @param string $accessToken |
||
37 | * |
||
38 | * @return $this |
||
39 | */ |
||
40 | public function setAccessToken(string $accessToken) |
||
46 | |||
47 | public function getSite(string $siteUrl) |
||
60 | |||
61 | public function listSites() |
||
77 | |||
78 | /** |
||
79 | * Call the query method on the authenticated client. |
||
80 | * |
||
81 | * @param Period $period |
||
82 | * @param array $dimensions |
||
83 | * @param array $filters |
||
84 | * @param int $rows |
||
85 | * @param string $searchType |
||
86 | * @return Collection |
||
87 | */ |
||
88 | public function searchAnalyticsQuery(string $siteUrl, Period $period, array $dimensions = [], array $filters = [], int $rows = 1000, string $searchType = 'web') |
||
99 | |||
100 | |||
101 | public function isAccessTokenExpired() |
||
115 | |||
116 | |||
117 | /* |
||
118 | * Get the underlying Google_Service_Webmasters object. You can use this |
||
119 | * to basically call anything on the Google Search Console API. |
||
120 | */ |
||
121 | public function getWebmastersService(): \Google_Service_Webmasters |
||
125 | |||
126 | private function applyFilters(Google_Service_Webmasters_SearchAnalyticsQueryRequest $request, $filters) |
||
148 | } |
||
149 |