Localservices.php 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. /**
  40. * Constructs the internal representation of the Localservices service.
  41. *
  42. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  43. * config array to pass to a new Client instance.
  44. * @param string $rootUrl The root URL used for requests to the service.
  45. */
  46. public function __construct($clientOrConfig = [], $rootUrl = null)
  47. {
  48. parent::__construct($clientOrConfig);
  49. $this->rootUrl = $rootUrl ?: 'https://localservices.googleapis.com/';
  50. $this->servicePath = '';
  51. $this->batchPath = 'batch';
  52. $this->version = 'v1';
  53. $this->serviceName = 'localservices';
  54. $this->accountReports = new Localservices\Resource\AccountReports(
  55. $this,
  56. $this->serviceName,
  57. 'accountReports',
  58. [
  59. 'methods' => [
  60. 'search' => [
  61. 'path' => 'v1/accountReports:search',
  62. 'httpMethod' => 'GET',
  63. 'parameters' => [
  64. 'endDate.day' => [
  65. 'location' => 'query',
  66. 'type' => 'integer',
  67. ],
  68. 'endDate.month' => [
  69. 'location' => 'query',
  70. 'type' => 'integer',
  71. ],
  72. 'endDate.year' => [
  73. 'location' => 'query',
  74. 'type' => 'integer',
  75. ],
  76. 'pageSize' => [
  77. 'location' => 'query',
  78. 'type' => 'integer',
  79. ],
  80. 'pageToken' => [
  81. 'location' => 'query',
  82. 'type' => 'string',
  83. ],
  84. 'query' => [
  85. 'location' => 'query',
  86. 'type' => 'string',
  87. ],
  88. 'startDate.day' => [
  89. 'location' => 'query',
  90. 'type' => 'integer',
  91. ],
  92. 'startDate.month' => [
  93. 'location' => 'query',
  94. 'type' => 'integer',
  95. ],
  96. 'startDate.year' => [
  97. 'location' => 'query',
  98. 'type' => 'integer',
  99. ],
  100. ],
  101. ],
  102. ]
  103. ]
  104. );
  105. $this->detailedLeadReports = new Localservices\Resource\DetailedLeadReports(
  106. $this,
  107. $this->serviceName,
  108. 'detailedLeadReports',
  109. [
  110. 'methods' => [
  111. 'search' => [
  112. 'path' => 'v1/detailedLeadReports:search',
  113. 'httpMethod' => 'GET',
  114. 'parameters' => [
  115. 'endDate.day' => [
  116. 'location' => 'query',
  117. 'type' => 'integer',
  118. ],
  119. 'endDate.month' => [
  120. 'location' => 'query',
  121. 'type' => 'integer',
  122. ],
  123. 'endDate.year' => [
  124. 'location' => 'query',
  125. 'type' => 'integer',
  126. ],
  127. 'pageSize' => [
  128. 'location' => 'query',
  129. 'type' => 'integer',
  130. ],
  131. 'pageToken' => [
  132. 'location' => 'query',
  133. 'type' => 'string',
  134. ],
  135. 'query' => [
  136. 'location' => 'query',
  137. 'type' => 'string',
  138. ],
  139. 'startDate.day' => [
  140. 'location' => 'query',
  141. 'type' => 'integer',
  142. ],
  143. 'startDate.month' => [
  144. 'location' => 'query',
  145. 'type' => 'integer',
  146. ],
  147. 'startDate.year' => [
  148. 'location' => 'query',
  149. 'type' => 'integer',
  150. ],
  151. ],
  152. ],
  153. ]
  154. ]
  155. );
  156. }
  157. }
  158. // Adding a class alias for backwards compatibility with the previous class name.
  159. class_alias(Localservices::class, 'Google_Service_Localservices');