source: vendor/google/apiclient-services/src/PostmasterTools.php

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

Upload project files

  • Property mode set to 100644
File size: 5.1 KB
RevLine 
[e3d4e0a]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;
19
20use Google\Client;
21
22/**
23 * Service definition for PostmasterTools (v1).
24 *
25 * <p>
26 * The Postmaster Tools API is a RESTful API that provides programmatic access
27 * to email traffic metrics (like spam reports, delivery errors etc) otherwise
28 * available through the Gmail Postmaster Tools UI currently.</p>
29 *
30 * <p>
31 * For more information about this service, see the API
32 * <a href="https://developers.google.com/gmail/postmaster" target="_blank">Documentation</a>
33 * </p>
34 *
35 * @author Google, Inc.
36 */
37class PostmasterTools extends \Google\Service
38{
39 /** See email traffic metrics for the domains you have registered in Gmail Postmaster Tools. */
40 const POSTMASTER_READONLY =
41 "https://www.googleapis.com/auth/postmaster.readonly";
42
43 public $domains;
44 public $domains_trafficStats;
45 public $rootUrlTemplate;
46
47 /**
48 * Constructs the internal representation of the PostmasterTools service.
49 *
50 * @param Client|array $clientOrConfig The client used to deliver requests, or a
51 * config array to pass to a new Client instance.
52 * @param string $rootUrl The root URL used for requests to the service.
53 */
54 public function __construct($clientOrConfig = [], $rootUrl = null)
55 {
56 parent::__construct($clientOrConfig);
57 $this->rootUrl = $rootUrl ?: 'https://gmailpostmastertools.googleapis.com/';
58 $this->rootUrlTemplate = $rootUrl ?: 'https://gmailpostmastertools.UNIVERSE_DOMAIN/';
59 $this->servicePath = '';
60 $this->batchPath = 'batch';
61 $this->version = 'v1';
62 $this->serviceName = 'gmailpostmastertools';
63
64 $this->domains = new PostmasterTools\Resource\Domains(
65 $this,
66 $this->serviceName,
67 'domains',
68 [
69 'methods' => [
70 'get' => [
71 'path' => 'v1/{+name}',
72 'httpMethod' => 'GET',
73 'parameters' => [
74 'name' => [
75 'location' => 'path',
76 'type' => 'string',
77 'required' => true,
78 ],
79 ],
80 ],'list' => [
81 'path' => 'v1/domains',
82 'httpMethod' => 'GET',
83 'parameters' => [
84 'pageSize' => [
85 'location' => 'query',
86 'type' => 'integer',
87 ],
88 'pageToken' => [
89 'location' => 'query',
90 'type' => 'string',
91 ],
92 ],
93 ],
94 ]
95 ]
96 );
97 $this->domains_trafficStats = new PostmasterTools\Resource\DomainsTrafficStats(
98 $this,
99 $this->serviceName,
100 'trafficStats',
101 [
102 'methods' => [
103 'get' => [
104 'path' => 'v1/{+name}',
105 'httpMethod' => 'GET',
106 'parameters' => [
107 'name' => [
108 'location' => 'path',
109 'type' => 'string',
110 'required' => true,
111 ],
112 ],
113 ],'list' => [
114 'path' => 'v1/{+parent}/trafficStats',
115 'httpMethod' => 'GET',
116 'parameters' => [
117 'parent' => [
118 'location' => 'path',
119 'type' => 'string',
120 'required' => true,
121 ],
122 'endDate.day' => [
123 'location' => 'query',
124 'type' => 'integer',
125 ],
126 'endDate.month' => [
127 'location' => 'query',
128 'type' => 'integer',
129 ],
130 'endDate.year' => [
131 'location' => 'query',
132 'type' => 'integer',
133 ],
134 'pageSize' => [
135 'location' => 'query',
136 'type' => 'integer',
137 ],
138 'pageToken' => [
139 'location' => 'query',
140 'type' => 'string',
141 ],
142 'startDate.day' => [
143 'location' => 'query',
144 'type' => 'integer',
145 ],
146 'startDate.month' => [
147 'location' => 'query',
148 'type' => 'integer',
149 ],
150 'startDate.year' => [
151 'location' => 'query',
152 'type' => 'integer',
153 ],
154 ],
155 ],
156 ]
157 ]
158 );
159 }
160}
161
162// Adding a class alias for backwards compatibility with the previous class name.
163class_alias(PostmasterTools::class, 'Google_Service_PostmasterTools');
Note: See TracBrowser for help on using the repository browser.