source: vendor/google/apiclient-services/src/Dfareporting/Resource/Sites.php

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

Upload project files

  • Property mode set to 100644
File size: 5.4 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\Dfareporting\Resource;
19
20use Google\Service\Dfareporting\Site;
21use Google\Service\Dfareporting\SitesListResponse;
22
23/**
24 * The "sites" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $sites = $dfareportingService->sites;
29 * </code>
30 */
31class Sites extends \Google\Service\Resource
32{
33 /**
34 * Gets one site by ID. (sites.get)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $id Site ID.
38 * @param array $optParams Optional parameters.
39 * @return Site
40 * @throws \Google\Service\Exception
41 */
42 public function get($profileId, $id, $optParams = [])
43 {
44 $params = ['profileId' => $profileId, 'id' => $id];
45 $params = array_merge($params, $optParams);
46 return $this->call('get', [$params], Site::class);
47 }
48 /**
49 * Inserts a new site. (sites.insert)
50 *
51 * @param string $profileId User profile ID associated with this request.
52 * @param Site $postBody
53 * @param array $optParams Optional parameters.
54 * @return Site
55 * @throws \Google\Service\Exception
56 */
57 public function insert($profileId, Site $postBody, $optParams = [])
58 {
59 $params = ['profileId' => $profileId, 'postBody' => $postBody];
60 $params = array_merge($params, $optParams);
61 return $this->call('insert', [$params], Site::class);
62 }
63 /**
64 * Retrieves a list of sites, possibly filtered. This method supports paging.
65 * (sites.listSites)
66 *
67 * @param string $profileId User profile ID associated with this request.
68 * @param array $optParams Optional parameters.
69 *
70 * @opt_param bool acceptsInStreamVideoPlacements This search filter is no
71 * longer supported and will have no effect on the results returned.
72 * @opt_param bool acceptsInterstitialPlacements This search filter is no longer
73 * supported and will have no effect on the results returned.
74 * @opt_param bool acceptsPublisherPaidPlacements Select only sites that accept
75 * publisher paid placements.
76 * @opt_param bool adWordsSite Select only AdWords sites.
77 * @opt_param bool approved Select only approved sites.
78 * @opt_param string campaignIds Select only sites with these campaign IDs.
79 * @opt_param string directorySiteIds Select only sites with these directory
80 * site IDs.
81 * @opt_param string ids Select only sites with these IDs.
82 * @opt_param int maxResults Maximum number of results to return.
83 * @opt_param string pageToken Value of the nextPageToken from the previous
84 * result page.
85 * @opt_param string searchString Allows searching for objects by name, ID or
86 * keyName. Wildcards (*) are allowed. For example, "site*2015" will return
87 * objects with names like "site June 2015", "site April 2015", or simply "site
88 * 2015". Most of the searches also add wildcards implicitly at the start and
89 * the end of the search string. For example, a search string of "site" will
90 * match objects with name "my site", "site 2015", or simply "site".
91 * @opt_param string sortField Field by which to sort the list.
92 * @opt_param string sortOrder Order of sorted results.
93 * @opt_param string subaccountId Select only sites with this subaccount ID.
94 * @opt_param bool unmappedSite Select only sites that have not been mapped to a
95 * directory site.
96 * @return SitesListResponse
97 * @throws \Google\Service\Exception
98 */
99 public function listSites($profileId, $optParams = [])
100 {
101 $params = ['profileId' => $profileId];
102 $params = array_merge($params, $optParams);
103 return $this->call('list', [$params], SitesListResponse::class);
104 }
105 /**
106 * Updates an existing site. This method supports patch semantics. (sites.patch)
107 *
108 * @param string $profileId User profile ID associated with this request.
109 * @param string $id Required. Site ID.
110 * @param Site $postBody
111 * @param array $optParams Optional parameters.
112 * @return Site
113 * @throws \Google\Service\Exception
114 */
115 public function patch($profileId, $id, Site $postBody, $optParams = [])
116 {
117 $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
118 $params = array_merge($params, $optParams);
119 return $this->call('patch', [$params], Site::class);
120 }
121 /**
122 * Updates an existing site. (sites.update)
123 *
124 * @param string $profileId User profile ID associated with this request.
125 * @param Site $postBody
126 * @param array $optParams Optional parameters.
127 * @return Site
128 * @throws \Google\Service\Exception
129 */
130 public function update($profileId, Site $postBody, $optParams = [])
131 {
132 $params = ['profileId' => $profileId, 'postBody' => $postBody];
133 $params = array_merge($params, $optParams);
134 return $this->call('update', [$params], Site::class);
135 }
136}
137
138// Adding a class alias for backwards compatibility with the previous class name.
139class_alias(Sites::class, 'Google_Service_Dfareporting_Resource_Sites');
Note: See TracBrowser for help on using the repository browser.