Localservices.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for Localservices (v1).
  21. *
  22. * <p>
  23. </p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://ads.google.com/local-services-ads/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class Localservices extends \Google\Service
  33. {
  34. /** See, edit, create, and delete your Google Ads accounts and data.. */
  35. const ADWORDS =
  36. "https://www.googleapis.com/auth/adwords";
  37. public $accountReports;
  38. public $detailedLeadReports;
  39. public $rootUrlTemplate;
  40. /**
  41. * Constructs the internal representation of the Localservices service.
  42. *
  43. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  44. * config array to pass to a new Client instance.
  45. * @param string $rootUrl The root URL used for requests to the service.
  46. */
  47. public function __construct($clientOrConfig = [], $rootUrl = null)
  48. {
  49. parent::__construct($clientOrConfig);
  50. $this->rootUrl = $rootUrl ?: 'https://localservices.googleapis.com/';
  51. $this->rootUrlTemplate = $rootUrl ?: 'https://localservices.UNIVERSE_DOMAIN/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'localservices';
  56. $this->accountReports = new Localservices\Resource\AccountReports(
  57. $this,
  58. $this->serviceName,
  59. 'accountReports',
  60. [
  61. 'methods' => [
  62. 'search' => [
  63. 'path' => 'v1/accountReports:search',
  64. 'httpMethod' => 'GET',
  65. 'parameters' => [
  66. 'endDate.day' => [
  67. 'location' => 'query',
  68. 'type' => 'integer',
  69. ],
  70. 'endDate.month' => [
  71. 'location' => 'query',
  72. 'type' => 'integer',
  73. ],
  74. 'endDate.year' => [
  75. 'location' => 'query',
  76. 'type' => 'integer',
  77. ],
  78. 'pageSize' => [
  79. 'location' => 'query',
  80. 'type' => 'integer',
  81. ],
  82. 'pageToken' => [
  83. 'location' => 'query',
  84. 'type' => 'string',
  85. ],
  86. 'query' => [
  87. 'location' => 'query',
  88. 'type' => 'string',
  89. ],
  90. 'startDate.day' => [
  91. 'location' => 'query',
  92. 'type' => 'integer',
  93. ],
  94. 'startDate.month' => [
  95. 'location' => 'query',
  96. 'type' => 'integer',
  97. ],
  98. 'startDate.year' => [
  99. 'location' => 'query',
  100. 'type' => 'integer',
  101. ],
  102. ],
  103. ],
  104. ]
  105. ]
  106. );
  107. $this->detailedLeadReports = new Localservices\Resource\DetailedLeadReports(
  108. $this,
  109. $this->serviceName,
  110. 'detailedLeadReports',
  111. [
  112. 'methods' => [
  113. 'search' => [
  114. 'path' => 'v1/detailedLeadReports:search',
  115. 'httpMethod' => 'GET',
  116. 'parameters' => [
  117. 'endDate.day' => [
  118. 'location' => 'query',
  119. 'type' => 'integer',
  120. ],
  121. 'endDate.month' => [
  122. 'location' => 'query',
  123. 'type' => 'integer',
  124. ],
  125. 'endDate.year' => [
  126. 'location' => 'query',
  127. 'type' => 'integer',
  128. ],
  129. 'pageSize' => [
  130. 'location' => 'query',
  131. 'type' => 'integer',
  132. ],
  133. 'pageToken' => [
  134. 'location' => 'query',
  135. 'type' => 'string',
  136. ],
  137. 'query' => [
  138. 'location' => 'query',
  139. 'type' => 'string',
  140. ],
  141. 'startDate.day' => [
  142. 'location' => 'query',
  143. 'type' => 'integer',
  144. ],
  145. 'startDate.month' => [
  146. 'location' => 'query',
  147. 'type' => 'integer',
  148. ],
  149. 'startDate.year' => [
  150. 'location' => 'query',
  151. 'type' => 'integer',
  152. ],
  153. ],
  154. ],
  155. ]
  156. ]
  157. );
  158. }
  159. }
  160. // Adding a class alias for backwards compatibility with the previous class name.
  161. class_alias(Localservices::class, 'Google_Service_Localservices');