source: vendor/google/apiclient-services/src/Dfareporting/Resource/Ads.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 6.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\Ad;
21use Google\Service\Dfareporting\AdsListResponse;
22
23/**
24 * The "ads" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $ads = $dfareportingService->ads;
29 * </code>
30 */
31class Ads extends \Google\Service\Resource
32{
33 /**
34 * Gets one ad by ID. (ads.get)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $id Ad ID.
38 * @param array $optParams Optional parameters.
39 * @return Ad
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], Ad::class);
47 }
48 /**
49 * Inserts a new ad. (ads.insert)
50 *
51 * @param string $profileId User profile ID associated with this request.
52 * @param Ad $postBody
53 * @param array $optParams Optional parameters.
54 * @return Ad
55 * @throws \Google\Service\Exception
56 */
57 public function insert($profileId, Ad $postBody, $optParams = [])
58 {
59 $params = ['profileId' => $profileId, 'postBody' => $postBody];
60 $params = array_merge($params, $optParams);
61 return $this->call('insert', [$params], Ad::class);
62 }
63 /**
64 * Retrieves a list of ads, possibly filtered. This method supports paging.
65 * (ads.listAds)
66 *
67 * @param string $profileId User profile ID associated with this request.
68 * @param array $optParams Optional parameters.
69 *
70 * @opt_param bool active Select only active ads.
71 * @opt_param string advertiserId Select only ads with this advertiser ID.
72 * @opt_param bool archived Select only archived ads.
73 * @opt_param string audienceSegmentIds Select only ads with these audience
74 * segment IDs.
75 * @opt_param string campaignIds Select only ads with these campaign IDs.
76 * @opt_param string compatibility Select default ads with the specified
77 * compatibility. Applicable when type is AD_SERVING_DEFAULT_AD. DISPLAY and
78 * DISPLAY_INTERSTITIAL refer to rendering either on desktop or on mobile
79 * devices for regular or interstitial ads, respectively. APP and
80 * APP_INTERSTITIAL are for rendering in mobile apps. IN_STREAM_VIDEO refers to
81 * rendering an in-stream video ads developed with the VAST standard.
82 * @opt_param string creativeIds Select only ads with these creative IDs
83 * assigned.
84 * @opt_param string creativeOptimizationConfigurationIds Select only ads with
85 * these creative optimization configuration IDs.
86 * @opt_param bool dynamicClickTracker Select only dynamic click trackers.
87 * Applicable when type is AD_SERVING_CLICK_TRACKER. If true, select dynamic
88 * click trackers. If false, select static click trackers. Leave unset to select
89 * both.
90 * @opt_param string ids Select only ads with these IDs.
91 * @opt_param string landingPageIds Select only ads with these landing page IDs.
92 * @opt_param int maxResults Maximum number of results to return.
93 * @opt_param string overriddenEventTagId Select only ads with this event tag
94 * override ID.
95 * @opt_param string pageToken Value of the nextPageToken from the previous
96 * result page.
97 * @opt_param string placementIds Select only ads with these placement IDs
98 * assigned.
99 * @opt_param string remarketingListIds Select only ads whose list targeting
100 * expression use these remarketing list IDs.
101 * @opt_param string searchString Allows searching for objects by name or ID.
102 * Wildcards (*) are allowed. For example, "ad*2015" will return objects with
103 * names like "ad June 2015", "ad April 2015", or simply "ad 2015". Most of the
104 * searches also add wildcards implicitly at the start and the end of the search
105 * string. For example, a search string of "ad" will match objects with name "my
106 * ad", "ad 2015", or simply "ad".
107 * @opt_param string sizeIds Select only ads with these size IDs.
108 * @opt_param string sortField Field by which to sort the list.
109 * @opt_param string sortOrder Order of sorted results.
110 * @opt_param bool sslCompliant Select only ads that are SSL-compliant.
111 * @opt_param bool sslRequired Select only ads that require SSL.
112 * @opt_param string type Select only ads with these types.
113 * @return AdsListResponse
114 * @throws \Google\Service\Exception
115 */
116 public function listAds($profileId, $optParams = [])
117 {
118 $params = ['profileId' => $profileId];
119 $params = array_merge($params, $optParams);
120 return $this->call('list', [$params], AdsListResponse::class);
121 }
122 /**
123 * Updates an existing ad. This method supports patch semantics. (ads.patch)
124 *
125 * @param string $profileId User profile ID associated with this request.
126 * @param string $id Required. RemarketingList ID.
127 * @param Ad $postBody
128 * @param array $optParams Optional parameters.
129 * @return Ad
130 * @throws \Google\Service\Exception
131 */
132 public function patch($profileId, $id, Ad $postBody, $optParams = [])
133 {
134 $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
135 $params = array_merge($params, $optParams);
136 return $this->call('patch', [$params], Ad::class);
137 }
138 /**
139 * Updates an existing ad. (ads.update)
140 *
141 * @param string $profileId User profile ID associated with this request.
142 * @param Ad $postBody
143 * @param array $optParams Optional parameters.
144 * @return Ad
145 * @throws \Google\Service\Exception
146 */
147 public function update($profileId, Ad $postBody, $optParams = [])
148 {
149 $params = ['profileId' => $profileId, 'postBody' => $postBody];
150 $params = array_merge($params, $optParams);
151 return $this->call('update', [$params], Ad::class);
152 }
153}
154
155// Adding a class alias for backwards compatibility with the previous class name.
156class_alias(Ads::class, 'Google_Service_Dfareporting_Resource_Ads');
Note: See TracBrowser for help on using the repository browser.