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

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

Upload project files

  • Property mode set to 100644
File size: 3.1 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\Project;
21use Google\Service\Dfareporting\ProjectsListResponse;
22
23/**
24 * The "projects" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dfareportingService = new Google\Service\Dfareporting(...);
28 * $projects = $dfareportingService->projects;
29 * </code>
30 */
31class Projects extends \Google\Service\Resource
32{
33 /**
34 * Gets one project by ID. (projects.get)
35 *
36 * @param string $profileId User profile ID associated with this request.
37 * @param string $id Project ID.
38 * @param array $optParams Optional parameters.
39 * @return Project
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], Project::class);
47 }
48 /**
49 * Retrieves a list of projects, possibly filtered. This method supports paging
50 * . (projects.listProjects)
51 *
52 * @param string $profileId User profile ID associated with this request.
53 * @param array $optParams Optional parameters.
54 *
55 * @opt_param string advertiserIds Select only projects with these advertiser
56 * IDs.
57 * @opt_param string ids Select only projects with these IDs.
58 * @opt_param int maxResults Maximum number of results to return.
59 * @opt_param string pageToken Value of the nextPageToken from the previous
60 * result page.
61 * @opt_param string searchString Allows searching for projects by name or ID.
62 * Wildcards (*) are allowed. For example, "project*2015" will return projects
63 * with names like "project June 2015", "project April 2015", or simply "project
64 * 2015". Most of the searches also add wildcards implicitly at the start and
65 * the end of the search string. For example, a search string of "project" will
66 * match projects with name "my project", "project 2015", or simply "project".
67 * @opt_param string sortField Field by which to sort the list.
68 * @opt_param string sortOrder Order of sorted results.
69 * @return ProjectsListResponse
70 * @throws \Google\Service\Exception
71 */
72 public function listProjects($profileId, $optParams = [])
73 {
74 $params = ['profileId' => $profileId];
75 $params = array_merge($params, $optParams);
76 return $this->call('list', [$params], ProjectsListResponse::class);
77 }
78}
79
80// Adding a class alias for backwards compatibility with the previous class name.
81class_alias(Projects::class, 'Google_Service_Dfareporting_Resource_Projects');
Note: See TracBrowser for help on using the repository browser.