DriveActivity.php 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 DriveActivity (v2).
  21. *
  22. * <p>
  23. * Provides a historical view of activity in Google Drive.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://developers.google.com/drive/activity/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class DriveActivity extends \Google\Service
  33. {
  34. /** View and add to the activity record of files in your Google Drive. */
  35. const DRIVE_ACTIVITY =
  36. "https://www.googleapis.com/auth/drive.activity";
  37. /** View the activity record of files in your Google Drive. */
  38. const DRIVE_ACTIVITY_READONLY =
  39. "https://www.googleapis.com/auth/drive.activity.readonly";
  40. public $activity;
  41. /**
  42. * Constructs the internal representation of the DriveActivity service.
  43. *
  44. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  45. * config array to pass to a new Client instance.
  46. * @param string $rootUrl The root URL used for requests to the service.
  47. */
  48. public function __construct($clientOrConfig = [], $rootUrl = null)
  49. {
  50. parent::__construct($clientOrConfig);
  51. $this->rootUrl = $rootUrl ?: 'https://driveactivity.googleapis.com/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v2';
  55. $this->serviceName = 'driveactivity';
  56. $this->activity = new DriveActivity\Resource\Activity(
  57. $this,
  58. $this->serviceName,
  59. 'activity',
  60. [
  61. 'methods' => [
  62. 'query' => [
  63. 'path' => 'v2/activity:query',
  64. 'httpMethod' => 'POST',
  65. 'parameters' => [],
  66. ],
  67. ]
  68. ]
  69. );
  70. }
  71. }
  72. // Adding a class alias for backwards compatibility with the previous class name.
  73. class_alias(DriveActivity::class, 'Google_Service_DriveActivity');