source: vendor/google/apiclient-services/src/Dfareporting/Resource/Placements.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: 8.0 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\Placement;
21use Google\Service\Dfareporting\PlacementsGenerateTagsResponse;
22use Google\Service\Dfareporting\PlacementsListResponse;
23
24/**
25 * The "placements" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $dfareportingService = new Google\Service\Dfareporting(...);
29 * $placements = $dfareportingService->placements;
30 * </code>
31 */
32class Placements extends \Google\Service\Resource
33{
34 /**
35 * Generates tags for a placement. (placements.generatetags)
36 *
37 * @param string $profileId User profile ID associated with this request.
38 * @param array $optParams Optional parameters.
39 *
40 * @opt_param string campaignId Generate placements belonging to this campaign.
41 * This is a required field.
42 * @opt_param string placementIds Generate tags for these placements.
43 * @opt_param string tagFormats Tag formats to generate for these placements.
44 * *Note:* PLACEMENT_TAG_STANDARD can only be generated for 1x1 placements.
45 * @return PlacementsGenerateTagsResponse
46 * @throws \Google\Service\Exception
47 */
48 public function generatetags($profileId, $optParams = [])
49 {
50 $params = ['profileId' => $profileId];
51 $params = array_merge($params, $optParams);
52 return $this->call('generatetags', [$params], PlacementsGenerateTagsResponse::class);
53 }
54 /**
55 * Gets one placement by ID. (placements.get)
56 *
57 * @param string $profileId User profile ID associated with this request.
58 * @param string $id Placement ID.
59 * @param array $optParams Optional parameters.
60 * @return Placement
61 * @throws \Google\Service\Exception
62 */
63 public function get($profileId, $id, $optParams = [])
64 {
65 $params = ['profileId' => $profileId, 'id' => $id];
66 $params = array_merge($params, $optParams);
67 return $this->call('get', [$params], Placement::class);
68 }
69 /**
70 * Inserts a new placement. (placements.insert)
71 *
72 * @param string $profileId User profile ID associated with this request.
73 * @param Placement $postBody
74 * @param array $optParams Optional parameters.
75 * @return Placement
76 * @throws \Google\Service\Exception
77 */
78 public function insert($profileId, Placement $postBody, $optParams = [])
79 {
80 $params = ['profileId' => $profileId, 'postBody' => $postBody];
81 $params = array_merge($params, $optParams);
82 return $this->call('insert', [$params], Placement::class);
83 }
84 /**
85 * Retrieves a list of placements, possibly filtered. This method supports
86 * paging. (placements.listPlacements)
87 *
88 * @param string $profileId User profile ID associated with this request.
89 * @param array $optParams Optional parameters.
90 *
91 * @opt_param string activeStatus Select only placements with these active
92 * statuses.
93 * @opt_param string advertiserIds Select only placements that belong to these
94 * advertisers.
95 * @opt_param string campaignIds Select only placements that belong to these
96 * campaigns.
97 * @opt_param string compatibilities Select only placements that are associated
98 * with these compatibilities. DISPLAY and DISPLAY_INTERSTITIAL refer to
99 * rendering either on desktop or on mobile devices for regular or interstitial
100 * ads respectively. APP and APP_INTERSTITIAL are for rendering in mobile apps.
101 * IN_STREAM_VIDEO refers to rendering in in-stream video ads developed with the
102 * VAST standard.
103 * @opt_param string contentCategoryIds Select only placements that are
104 * associated with these content categories.
105 * @opt_param string directorySiteIds Select only placements that are associated
106 * with these directory sites.
107 * @opt_param string groupIds Select only placements that belong to these
108 * placement groups.
109 * @opt_param string ids Select only placements with these IDs.
110 * @opt_param string maxEndDate Select only placements or placement groups whose
111 * end date is on or before the specified maxEndDate. The date should be
112 * formatted as "yyyy-MM-dd".
113 * @opt_param int maxResults Maximum number of results to return.
114 * @opt_param string maxStartDate Select only placements or placement groups
115 * whose start date is on or before the specified maxStartDate. The date should
116 * be formatted as "yyyy-MM-dd".
117 * @opt_param string minEndDate Select only placements or placement groups whose
118 * end date is on or after the specified minEndDate. The date should be
119 * formatted as "yyyy-MM-dd".
120 * @opt_param string minStartDate Select only placements or placement groups
121 * whose start date is on or after the specified minStartDate. The date should
122 * be formatted as "yyyy-MM-dd".
123 * @opt_param string pageToken Value of the nextPageToken from the previous
124 * result page.
125 * @opt_param string paymentSource Select only placements with this payment
126 * source.
127 * @opt_param string placementStrategyIds Select only placements that are
128 * associated with these placement strategies.
129 * @opt_param string pricingTypes Select only placements with these pricing
130 * types.
131 * @opt_param string searchString Allows searching for placements by name or ID.
132 * Wildcards (*) are allowed. For example, "placement*2015" will return
133 * placements with names like "placement June 2015", "placement May 2015", or
134 * simply "placements 2015". Most of the searches also add wildcards implicitly
135 * at the start and the end of the search string. For example, a search string
136 * of "placement" will match placements with name "my placement", "placement
137 * 2015", or simply "placement" .
138 * @opt_param string siteIds Select only placements that are associated with
139 * these sites.
140 * @opt_param string sizeIds Select only placements that are associated with
141 * these sizes.
142 * @opt_param string sortField Field by which to sort the list.
143 * @opt_param string sortOrder Order of sorted results.
144 * @return PlacementsListResponse
145 * @throws \Google\Service\Exception
146 */
147 public function listPlacements($profileId, $optParams = [])
148 {
149 $params = ['profileId' => $profileId];
150 $params = array_merge($params, $optParams);
151 return $this->call('list', [$params], PlacementsListResponse::class);
152 }
153 /**
154 * Updates an existing placement. This method supports patch semantics.
155 * (placements.patch)
156 *
157 * @param string $profileId User profile ID associated with this request.
158 * @param string $id Required. Placement ID.
159 * @param Placement $postBody
160 * @param array $optParams Optional parameters.
161 * @return Placement
162 * @throws \Google\Service\Exception
163 */
164 public function patch($profileId, $id, Placement $postBody, $optParams = [])
165 {
166 $params = ['profileId' => $profileId, 'id' => $id, 'postBody' => $postBody];
167 $params = array_merge($params, $optParams);
168 return $this->call('patch', [$params], Placement::class);
169 }
170 /**
171 * Updates an existing placement. (placements.update)
172 *
173 * @param string $profileId User profile ID associated with this request.
174 * @param Placement $postBody
175 * @param array $optParams Optional parameters.
176 * @return Placement
177 * @throws \Google\Service\Exception
178 */
179 public function update($profileId, Placement $postBody, $optParams = [])
180 {
181 $params = ['profileId' => $profileId, 'postBody' => $postBody];
182 $params = array_merge($params, $optParams);
183 return $this->call('update', [$params], Placement::class);
184 }
185}
186
187// Adding a class alias for backwards compatibility with the previous class name.
188class_alias(Placements::class, 'Google_Service_Dfareporting_Resource_Placements');
Note: See TracBrowser for help on using the repository browser.