source: vendor/google/apiclient-services/src/PostmasterTools/Resource/DomainsTrafficStats.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 9 days ago

Upload new project files

  • Property mode set to 100644
File size: 3.9 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\PostmasterTools\Resource;
19
20use Google\Service\PostmasterTools\ListTrafficStatsResponse;
21use Google\Service\PostmasterTools\TrafficStats;
22
23/**
24 * The "trafficStats" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $gmailpostmastertoolsService = new Google\Service\PostmasterTools(...);
28 * $trafficStats = $gmailpostmastertoolsService->domains_trafficStats;
29 * </code>
30 */
31class DomainsTrafficStats extends \Google\Service\Resource
32{
33 /**
34 * Get traffic statistics for a domain on a specific date. Returns
35 * PERMISSION_DENIED if user does not have permission to access TrafficStats for
36 * the domain. (trafficStats.get)
37 *
38 * @param string $name The resource name of the traffic statistics to get. E.g.,
39 * domains/mymail.mydomain.com/trafficStats/20160807.
40 * @param array $optParams Optional parameters.
41 * @return TrafficStats
42 * @throws \Google\Service\Exception
43 */
44 public function get($name, $optParams = [])
45 {
46 $params = ['name' => $name];
47 $params = array_merge($params, $optParams);
48 return $this->call('get', [$params], TrafficStats::class);
49 }
50 /**
51 * List traffic statistics for all available days. Returns PERMISSION_DENIED if
52 * user does not have permission to access TrafficStats for the domain.
53 * (trafficStats.listDomainsTrafficStats)
54 *
55 * @param string $parent The resource name of the domain whose traffic
56 * statistics we'd like to list. It should have the form
57 * `domains/{domain_name}`, where domain_name is the fully qualified domain
58 * name.
59 * @param array $optParams Optional parameters.
60 *
61 * @opt_param int endDate.day Day of a month. Must be from 1 to 31 and valid for
62 * the year and month, or 0 to specify a year by itself or a year and month
63 * where the day isn't significant.
64 * @opt_param int endDate.month Month of a year. Must be from 1 to 12, or 0 to
65 * specify a year without a month and day.
66 * @opt_param int endDate.year Year of the date. Must be from 1 to 9999, or 0 to
67 * specify a date without a year.
68 * @opt_param int pageSize Requested page size. Server may return fewer
69 * TrafficStats than requested. If unspecified, server will pick an appropriate
70 * default.
71 * @opt_param string pageToken The next_page_token value returned from a
72 * previous List request, if any. This is the value of
73 * ListTrafficStatsResponse.next_page_token returned from the previous call to
74 * `ListTrafficStats` method.
75 * @opt_param int startDate.day Day of a month. Must be from 1 to 31 and valid
76 * for the year and month, or 0 to specify a year by itself or a year and month
77 * where the day isn't significant.
78 * @opt_param int startDate.month Month of a year. Must be from 1 to 12, or 0 to
79 * specify a year without a month and day.
80 * @opt_param int startDate.year Year of the date. Must be from 1 to 9999, or 0
81 * to specify a date without a year.
82 * @return ListTrafficStatsResponse
83 * @throws \Google\Service\Exception
84 */
85 public function listDomainsTrafficStats($parent, $optParams = [])
86 {
87 $params = ['parent' => $parent];
88 $params = array_merge($params, $optParams);
89 return $this->call('list', [$params], ListTrafficStatsResponse::class);
90 }
91}
92
93// Adding a class alias for backwards compatibility with the previous class name.
94class_alias(DomainsTrafficStats::class, 'Google_Service_PostmasterTools_Resource_DomainsTrafficStats');
Note: See TracBrowser for help on using the repository browser.