Google PHP API Client Services

Overview

Google PHP API Client Services

Requirements

Google API PHP Client

Usage

This library is automatically updated daily with new API changes, and tagged weekly. It is installed as part of the Google API PHP Client library via Composer, which will pull down the most recent tag.

Comments
  • URGENT: GoogleMyBusiness API: v4.9 removed completely, although documentation still supports some endpoints that haven't been replaced yet

    URGENT: GoogleMyBusiness API: v4.9 removed completely, although documentation still supports some endpoints that haven't been replaced yet

    See: https://developers.google.com/my-business/reference/rest/v4/accounts.locations/reportInsights

    Also: https://developers.google.com/my-business/reference/rest/v4/accounts.locations.reviews

    And a couple of other endpoints are missing.

    These endpoints have not been replaced by the new v1 API so far, but they have been completely removed from the PHP code base, so the service usage is completely hindered.

    status: investigating triage me :rotating_light: 
    opened by nekromoff 21
  • Add PHPDoc to (generated?) models to increase usability

    Add PHPDoc to (generated?) models to increase usability

    Currently the PHP Documentation of the model classes is lacking, which makes it harder to use them / understand them. Since the model classes are probably generated, a change to the generator should be able to facilitate this. Not sure where to post this issue though, is the generator also on GitHub?

    For example Google_Service_Calendar_Event::setStart() has a type-hint that a Google_Service_Calendar_EventDateTime object should be used, but getStart() does not have a PHPDoc @return hint:

    class Google_Service_Calendar_Event
    {
      public function setStart(Google_Service_Calendar_EventDateTime $start)
      {
        $this->start = $start;
      }
    
      //Current approach, no PHPDoc
      public function getStart()
      {
        return $this->start;
      }
    
      /**
       * Preferred approach
       * @return Google_Service_Calendar_EventDateTime
       */
      public function getStart()
      {
        return $this->start;
      }
    
      /**
       * as of PHP7
       * @return Google_Service_Calendar_EventDateTime
       */
      public function getStart() : Google_Service_Calendar_EventDateTime
      {
        return $this->start;
      }
    }
    

    Currently using the API Client and specific services is quite an 'adventure' / puzzle of finding out how everything works and by trial and error find out the proper way. Does Google use the PHP API Services themselves as well? I would say out of frustration one would add such type hints quite quickly ;)

    triage me :rotating_light: 
    opened by holtkamp 15
  • Composer install/update #fail

    Composer install/update #fail

    Fresh install of Google API PHP Client

    Duplicate (case-sensitive filenames) files in a folder, not compatible with case-insensitive operating systems.

    Environment details

    • OS: macOS 12.1
    • PHP version: 8.1
    • Package name and version: google-api-php-client-services

    Steps to reproduce

    ➜  youtube git:(main) ✗ php -v
    PHP 8.1.2 (cli) (built: Jan 21 2022 04:47:46) (NTS)
    Copyright (c) The PHP Group
    Zend Engine v4.1.2, Copyright (c) Zend Technologies
        with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies
    ➜  youtube git:(main) ✗ composer install
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Package operations: 19 installs, 0 updates, 0 removals
      - Installing paragonie/random_compat (v9.99.100): Extracting archive
      - Installing paragonie/constant_time_encoding (v2.5.0): Extracting archive
      - Installing phpseclib/phpseclib (3.0.12): Extracting archive
      - Installing psr/log (3.0.0): Extracting archive
      - Installing monolog/monolog (2.3.5): Extracting archive
      - Installing ralouphie/getallheaders (3.0.3): Extracting archive
      - Installing psr/http-message (1.0.1): Extracting archive
      - Installing psr/http-factory (1.0.1): Extracting archive
      - Installing guzzlehttp/psr7 (2.1.0): Extracting archive
      - Installing symfony/deprecation-contracts (v3.0.0): Extracting archive
      - Installing psr/http-client (1.0.1): Extracting archive
      - Installing guzzlehttp/promises (1.5.1): Extracting archive
      - Installing guzzlehttp/guzzle (7.4.1): Extracting archive
      - Installing psr/cache (2.0.0): Extracting archive
      - Installing firebase/php-jwt (v5.5.1): Extracting archive
      - Installing google/auth (v1.18.0): Extracting archive
      - Installing google/apiclient-services (v0.231.1): Extracting archive
      - Installing google/apiclient (v2.12.1): Extracting archive
      - Installing symfony/dotenv (v5.4.2): Extracting archive
     18/19 [==========================>-]  94%    Failed to extract google/apiclient-services: (1) '/usr/bin/unzip' -qq '/Users/johaneks/Projects/youtube/vendor/composer/tmp-72a8e07d6c5e7aa4447e541641fa7c78' -d '/Users/johaneks/Projects/youtube/vendor/composer/474efbc6'
    
    replace /Users/johaneks/Projects/youtube/vendor/composer/474efbc6/googleapis-google-api-php-client-services-d6bf710/src/ArtifactRegistry/Resource/ProjectsLocationsRepositoriesAptartifacts.php? [y]es, [n]o, [A]ll, [N]one, [r]ename:  NULL
    (EOF or read error, treating as "[N]one" ...)
    
        The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
        Unzip with unzip command failed, falling back to ZipArchive class
    Generating autoload files
    7 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    
    

    Screenshots

    image

    triage me :rotating_light: 
    opened by itsAnuga 14
  • v4 api methods on `accounts.locations` are missing

    v4 api methods on `accounts.locations` are missing

    I liked to use the method accounts.locations.reviews.list to load the reviews for my location. So I tried first to list my locations with accounts.locations.list.

    But I noticed that the Location-Client Ressource Object is currently not supporting this methods.

    To be exact, it seems that only locations.transferLocation is supported, but all other methods from the api to v4 are missing.

    So my support questions are:

    • when the missing methods for the location and review entpoints will be added to the services
    • is there currently a workarround to access the accounts.locations.reviews.list method without the methods in locations client ressource object?
    type: question 
    opened by Radon8472 12
  • version 0.67 fails to install with composer

    version 0.67 fails to install with composer

    The process "unzip -qq ...." exceeded the timeout of 300 seconds. The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems) Unzip with unzip command failed, falling back to ZipArchive class.

    After waiting for a long time it eventually just fails. Forcing v0.66 seems to fix the issue for now.

    type: question 
    opened by robtesch 10
  • Add `@var` to Model Properties to Primitive Types

    Add `@var` to Model Properties to Primitive Types

    Reopening per https://github.com/googleapis/google-api-php-client-services/pull/446#issuecomment-984959527

    :wave: I've had this PR open on the api client generator for a while https://github.com/google/apis-client-generator/pull/44

    That adds @var, @param, and @return to model properties with primitive types. Thought I would try to get it merged here since I suspect y'all don't use that apis-client-generator libary, but instead use the generator/ here.

    I also fixed the tests in php_generator_test.py so they pass, but did not add any further tests. I can do that if you'd like.

    Here's a sample patch on Google\Service\DisplayVideo\Advertiser

    diff --git a/src/DisplayVideo/Advertiser.php b/src/DisplayVideo/Advertiser.php
    index b98a7c056..db9eca38a 100644
    --- a/src/DisplayVideo/Advertiser.php
    +++ b/src/DisplayVideo/Advertiser.php
    @@ -21,22 +21,43 @@ class Advertiser extends \Google\Model
     {
       protected $adServerConfigType = AdvertiserAdServerConfig::class;
       protected $adServerConfigDataType = '';
    +  /**
    +   * @var string
    +   */
       public $advertiserId;
       protected $creativeConfigType = AdvertiserCreativeConfig::class;
       protected $creativeConfigDataType = '';
       protected $dataAccessConfigType = AdvertiserDataAccessConfig::class;
       protected $dataAccessConfigDataType = '';
    +  /**
    +   * @var string
    +   */
       public $displayName;
    +  /**
    +   * @var string
    +   */
       public $entityStatus;
       protected $generalConfigType = AdvertiserGeneralConfig::class;
       protected $generalConfigDataType = '';
       protected $integrationDetailsType = IntegrationDetails::class;
       protected $integrationDetailsDataType = '';
    +  /**
    +   * @var string
    +   */
       public $name;
    +  /**
    +   * @var string
    +   */
       public $partnerId;
    +  /**
    +   * @var bool
    +   */
       public $prismaEnabled;
       protected $servingConfigType = AdvertiserTargetingConfig::class;
       protected $servingConfigDataType = '';
    +  /**
    +   * @var string
    +   */
       public $updateTime;
     
       /**
    @@ -53,10 +74,16 @@ class Advertiser extends \Google\Model
       {
         return $this->adServerConfig;
       }
    +  /**
    +   * @param string
    +   */
       public function setAdvertiserId($advertiserId)
       {
         $this->advertiserId = $advertiserId;
       }
    +  /**
    +   * @return string
    +   */
       public function getAdvertiserId()
       {
         return $this->advertiserId;
    @@ -89,18 +116,30 @@ class Advertiser extends \Google\Model
       {
         return $this->dataAccessConfig;
       }
    +  /**
    +   * @param string
    +   */
       public function setDisplayName($displayName)
       {
         $this->displayName = $displayName;
       }
    +  /**
    +   * @return string
    +   */
       public function getDisplayName()
       {
         return $this->displayName;
       }
    +  /**
    +   * @param string
    +   */
       public function setEntityStatus($entityStatus)
       {
         $this->entityStatus = $entityStatus;
       }
    +  /**
    +   * @return string
    +   */
       public function getEntityStatus()
       {
         return $this->entityStatus;
    @@ -133,26 +172,44 @@ class Advertiser extends \Google\Model
       {
         return $this->integrationDetails;
       }
    +  /**
    +   * @param string
    +   */
       public function setName($name)
       {
         $this->name = $name;
       }
    +  /**
    +   * @return string
    +   */
       public function getName()
       {
         return $this->name;
       }
    +  /**
    +   * @param string
    +   */
       public function setPartnerId($partnerId)
       {
         $this->partnerId = $partnerId;
       }
    +  /**
    +   * @return string
    +   */
       public function getPartnerId()
       {
         return $this->partnerId;
       }
    +  /**
    +   * @param bool
    +   */
       public function setPrismaEnabled($prismaEnabled)
       {
         $this->prismaEnabled = $prismaEnabled;
       }
    +  /**
    +   * @return bool
    +   */
       public function getPrismaEnabled()
       {
         return $this->prismaEnabled;
    @@ -171,10 +228,16 @@ class Advertiser extends \Google\Model
       {
         return $this->servingConfig;
       }
    +  /**
    +   * @param string
    +   */
       public function setUpdateTime($updateTime)
       {
         $this->updateTime = $updateTime;
       }
    +  /**
    +   * @return string
    +   */
       public function getUpdateTime()
       {
         return $this->updateTime;
    
    cla: yes 
    opened by chrisguitarguy 9
  • Compute API missing classes

    Compute API missing classes

    #51 incorrectly assumed that the HTTPSHealthCheck and HttpsHealthCheck files were identical when in fact they are 2 different classes (first alpha discovery doc in the discovery-artifact-manager repo).

    We are seeing the duplicate file issue in the java generated code as well.

    type: bug priority: p2 :rotating_light: 
    opened by chingor13 9
  • Is it possible to migrate this to PSR-4

    Is it possible to migrate this to PSR-4

    I know that you guys are using some tool like swagger for code generator, but is it possible to create a new tag/version with psr-4 autoloader. It is much more easier and beautiful for reading when you have code like:

    <?php
    use Google\Service\CloudTalentSolution;
    
    class Service 
    {
        private function someMethod()
        {
            $talentClient = new CloudTalentSolution($client);
        }
    }
    
    type: feature request 
    opened by steffdimitrov 9
  • Add Enum Classes for Enum Properties & Parameters

    Add Enum Classes for Enum Properties & Parameters

    I had some stuff in another PR around enums, but wasn't super happy with it.

    This adds an Enums namespace to the generated package and an enum class that's just a bag of constants. Properties that have enum values have an @see thing in the docblock pointing to the class.

    One thing that's not great here is that schema references for enums create classes, you can see this in the kitchen sink tests where there's a top level LinkType enum: https://github.com/chrisguitarguy/google-api-php-client-services/blob/6f32078f280c4278d8951fadaec618ac9ea67b3f/generator/tests/testdata/golden/php/default/kitchen_sink.golden#L819

    and a LinkType enum under SeriesCounters: https://github.com/chrisguitarguy/google-api-php-client-services/blob/6f32078f280c4278d8951fadaec618ac9ea67b3f/generator/tests/testdata/golden/php/default/kitchen_sink.golden#L858

    There's not really a way to determine if the schema is actually a reference or not in the generator code and I didn't want to dig too far into that before asking for feedback. If a schema has already been defined, the reference is just resolved directly: https://github.com/chrisguitarguy/google-api-php-client-services/blob/6f32078f280c4278d8951fadaec618ac9ea67b3f/generator/src/googleapis/codegen/schema.py#L200-L207

    opened by chrisguitarguy 8
  • Incorrectly documented return type for Google_Service_ServiceControl_CheckResponse::getCheckErrors()

    Incorrectly documented return type for Google_Service_ServiceControl_CheckResponse::getCheckErrors()

    The docblock's @return type for Google_Service_ServiceControl_CheckResponse::getCheckErrors() is incorrect. The method returns a PHP array and not Google_Service_ServiceControl_CheckError as documented.

    Suggested action

    Correct the docblock to be "@return array of Google_Service_ServiceControl_CheckError objects"

    Environment details

    • OS: macOS Mojave (not important)
    • PHP version: 7.2.7 (not important)
    • Package name and version: googleapis/google-api-php-client-services master

    Steps to reproduce

    1. Using a valid Google_Service_ServiceControl make a check() request with a Google_Service_ServiceControl_CheckRequest that's invalid - an easy way to do it is to have an invalid project number filled in with the Google_Service_ServiceControl_Operation
    2. With the results of the check() method (which is a Google_Service_ServiceControl_CheckRequest), call its getCheckErrors() method.
    3. Examine the results of the getCheckErrors() method, and notice it's an array instead of what the method's docblock specifies with a return type of Google_Service_ServiceControl_CheckError

    Code example

    use Google_Client as Client;
    use Google_Service_ServiceControl as ServiceControl;
    use Google_Service_ServiceControl_CheckRequest as CheckRequest;
    use Google_Service_ServiceControl_Operation as Operation;
    
    $operation = new Operation([
        'operationId'     => 'some-unique-id-here',
        'operationName'   => 'some-operation-name-here',
        'consumerId'      => 'some-consumer-id-here',
        'startTime'       => '2019-06-18T17:47:00+00:00',
        'endTime'         => '2019-06-18T17:48:00+00:00',
        'metricValueSets' => [
            [
                'metricName'   => 'some-metric-name-here',
                'metricValues' => [
                    ['int64Value' => 1234]
                ],
            ],
        ],
    ]);
    
    $client = new Client();
    $client->useApplicationDefaultCredentials();
    $client->addScope('https://www.googleapis.com/auth/cloud-platform');
    
    $serviceControl = new ServiceControl($client);
    
    $checkResponse = $serviceControl->services->check(
        'some-service-name-here',
        new CheckRequest(['operation' => $operation])
    );
    $errors = $checkResponse->getCheckErrors();
    echo gettype($errors); // yields "array", not "Google_Service_ServiceControl_CheckError"
    
    type: feature request priority: p2 
    opened by bigdawggi 8
  • Error when calling for new Google_Service_YouTubeAnalytics

    Error when calling for new Google_Service_YouTubeAnalytics

    Hi there, I am trying to migrate from youtube analytics V1 to V2 as per this documentation. https://developers.google.com/youtube/analytics/migration

    After reading some more I came across this article below which pointed me to this Repo https://stackoverflow.com/questions/53024561/how-to-continue-accessing-youtube-analytics-api-with-php-client-library-googl

    I installed all the files in the service folder overriding the old. However when I try to get the analytics for youtube I get this error. "status":"fail","code":"500","reason":"PHP error. Severity: Warning, Message: array_merge(): Argument #2 is not an array, File: Resource/Reports.php, Line number: 90

    When I do a new Google_Service_YouTube($client) it works and I get my results with the new installation but with the
    new Google_Service_YouTubeAnalytics($client) I get the error above.

    So I assume everything is installed correctly as the first call works, any reason why youtubeAnalytics wont work?

    Much appreciated.

    type: question 
    opened by saffabook 8
  • Resource is a other reserved keyword

    Resource is a other reserved keyword

    Resource is now a other reserved keyword within PHP, so it throws errors that it shouldn't be used.

    Example files ( full gist further down ):

    • https://github.com/googleapis/google-api-php-client-services/blob/main/src/GoogleAnalyticsAdmin/Resource/PropertiesWebDataStreams.php
    • https://github.com/googleapis/google-api-php-client-services/blob/main/src/GoogleAnalyticsAdmin/Resource/PropertiesDataStreamsMeasurementProtocolSecrets.php
    FILE: https://github.com/googleapis/google-api-php-client-services/blob/main/src/GoogleAnalyticsAdmin/Resource/PropertiesConversionEvents.php
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------------------------
     18 | WARNING | 'resource' is a soft reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    ---------------------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: https://github.com/googleapis/google-api-php-client-services/blob/main/src/GoogleAnalyticsAdmin/Resource/PropertiesFirebaseLinks.php
    ------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------------------
     18 | WARNING | 'resource' is a soft reserved keyword as of PHP version 7.0 and should not be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)
    ------------------------------------------------------------------------------------------------------------------------------------------------
    

    Environment details

    • PHP version: 7.4 & 8.1

    I originally posted this issue to the Google Site Kit WP Plugin, which they directed me to here, reference - https://github.com/google/site-kit-wp/issues/6125

    The warnings occur when using PHP_CodeSniffer:

    ./vendor/bin/phpcs -p --standard=PHPCompatibility \
      --runtime-set testVersion 7.4 \
      --extensions=php \
      -d memory_limit=1G \ .
    

    I have a GIST of all warnings - https://gist.github.com/robindevitt/c913b2b8e25be4303aaa0a27b44ff2c1 which was run in the mentioned plugin, these warning are all relevant to this issue, let me know if I should adjust the

    opened by robindevitt 0
  • v0.279.0 to v0.280.0, getResources() now returns null.

    v0.279.0 to v0.280.0, getResources() now returns null.

    After changing the version from v0.279.0 to v0.280.0, getResources() now returns null.

    use Google_Service_ShoppingContent.

    Environment details

    • PHP version: 8.1.12
    • Package name and version: google/apiclient-services v0.280.0

    Code example

    # example
    
        $params = ['maxResults' => 100];
        $service = new \Google_Service_ShoppingContent($client);
        $response = $service->productstatuses->listProductstatuses($this->merchant_center_id, $params);
    
        foreach ($response->getResources() as $resource) {
            //  $response->getResources() is null
            //  error message : foreach() argument must be of type array|object, null given
        }
    

    v0.279.0

    v0 279 0

    v0.280.0

    v0 280 0

    v0.280.0 error

    v0 280 0_2

    Thanks!

    opened by grasebit 1
  • DisplayVideo DV360 exitEvents doesn't patch

    DisplayVideo DV360 exitEvents doesn't patch

    I'm having problems updating the exitEvents of a creative in Google DisplayVideo. I'm able to update all other properties of a creative, except for exitEvents.

    Environment details

    • OS: macOS Venture 13.1
    • PHP version: 7.4.33
    • Package name and version: "google/apiclient": "^v2.13.0" & "googleads/googleads-php-lib": "v59.0.0" (Also issue on my last setup: "google/apiclient": "^2.12.6" & "googleads/googleads-php-lib": "^49.0.0")

    Steps to reproduce

    1. Use the code snippet below, I would expect the exitEvents to update

    Code example

    use Google_Client;
    use Google_Service_DisplayVideo;
    use Google_Service_DisplayVideo_Creative;
    use Google_Service_DisplayVideo_Dimensions;
    use Google_Service_DisplayVideo_ExitEvent;
    
    $client = new Google_Client();
    $client->setApplicationName('Example app');
    $client->addScope('https://www.googleapis.com/auth/display-video');
    $client->setAuthConfig(YOUR_OWN);
    
    $service = new Google_Service_DisplayVideo($client);
    $creative = new Google_Service_DisplayVideo_Creative();
    
    $creative->setDisplayName('This is a banner');
    $creative->setEntityStatus('ENTITY_STATUS_ACTIVE');
    $creative->setHostingSource('HOSTING_SOURCE_THIRD_PARTY');
    $creative->setCreativeType('CREATIVE_TYPE_STANDARD');
    $creative->setRequireMraid(false);
    $creative->setRequireHtml5(false);
    $creative->setRequirePingForAttribution(false);
    $creative->setNotes('These are notes');
    $creative->setThirdPartyTag('<script></script>');
    
    $dimensions = new Google_Service_DisplayVideo_Dimensions();
    $dimensions->setWidthPixels(1);
    $dimensions->setHeightPixels(1);
    $creative->setDimensions($dimensions);
    
    $exitEvent = new Google_Service_DisplayVideo_ExitEvent();
    $exitEvent->setType('EXIT_EVENT_TYPE_DEFAULT');
    $exitEvent->setUrl('https://google.com');
    $creative->setExitEvents([$exitEvent]);
    
    // exitEvents is now
    #+exitEvents: array:1 [
    #    0 => Google\Service\DisplayVideo\ExitEvent {#5321
    #      +name: null
    #      +reportingName: null
    #      +type: "EXIT_EVENT_TYPE_DEFAULT"
    #      +url: "https://google.com"
    #      #internal_gapi_mappings: []
    #      #modelData: []
    #      #processed: []
    #    }
    #  ]
    
    $result = $service->advertisers_creatives->create(
      YOUR_OWN,
      $creative
     );
    
    // exitEvents is now
    #+exitEvents: array:1 [
    #    0 => Google\Service\DisplayVideo\ExitEvent {#5290
    #      +name: null
    #      +reportingName: null
    #      +type: "EXIT_EVENT_TYPE_BACKUP"
    #      +url: "https://google.com"
    #      #internal_gapi_mappings: []
    #      #modelData: []
    #      #processed: []
    #    }
    #  ]
    
    $result->setDisplayName('This is a banner with new exitEvent');
    $exitEventNew = new Google_Service_DisplayVideo_ExitEvent();
    $exitEventNew->setType('EXIT_EVENT_TYPE_DEFAULT');
    $exitEventNew->setUrl('https://newsite.com');
    $result->setExitEvents([$exitEventNew]);
    
    #+exitEvents: array:1 [
    #    0 => Google\Service\DisplayVideo\ExitEvent {#5234
    #      +name: null
    #     +reportingName: null
    #      +type: "EXIT_EVENT_TYPE_DEFAULT"
    #      +url: "https://newsite.com"
    #      #internal_gapi_mappings: []
    #      #modelData: []
    #      #processed: []
    #    }
      ]
    
    $result = $service->advertisers_creatives->patch(
        YOUR_OWN,
        $result->getCreativeId(),
        $result,
        [
          'updateMask' => 'displayName,exitEvents'
        ]
    );
    
    // exitEvents is still the old value while DisplayName has been updated
    #+exitEvents: array:1 [
    #    0 => Google\Service\DisplayVideo\ExitEvent {#5290
    #      +name: null
    #      +reportingName: null
    #      +type: "EXIT_EVENT_TYPE_BACKUP"
    #      +url: "https://google.com"
    #      #internal_gapi_mappings: []
    #      #modelData: []
    #      #processed: []
    #    }
    #  ]
    
    

    Even if I would do things differently I can change every value except the exitEvents

    $creative = $service->advertisers_creatives->get(
       YOUR_OWN,
       YOUR_OWN
    );
    
    $events = $creative->getExitEvents();
    $events[0]->setUrl('https://newsite.com');
    $creative->setExitEvents($events);
    
    $result = $service->advertisers_creatives->patch(
        YOUR_OWN,
        $creative->getCreativeId(),
        $creative,
        [
          'updateMask' => 'displayName,exitEvents'
        ]
    );
    
    

    I have also played around with exitEvents.url, exitevents, exit_events and so on.

    It seems like updateMask doesn't except exitEvents since $creative->setExitEvents([]); would in my eyes result in an error (since it's required) but it doesn't provide an error.

    Am I doing something wrong, or is there a bug?

    opened by davidbonting 0
  • package takes a lot of disc space

    package takes a lot of disc space

    If you are still having issues, please be sure to include as much information as possible:

    Environment details

    • OS: Ubuntu 23 LTS
    • PHP version: php 8.1
    • Package name and version: google/apiclient-services 0.275

    Steps to reproduce

    1. install the package via composer require google/apiclient

    -> see composer installing a ~100MB dependency folder

    grafik

    having to copy 100 MB of files arround in a continous deployment setup is a real problem. is there anything which can be done to reduce the filesystem footprint of this package?

    here you can see the subfolders within src which contribute the most to filesystem consumption:

    grafik

    Code example

    # example
    

    Making sure to follow these steps will guarantee the quickest resolution possible.

    Thanks!

    type: feature request 
    opened by staabm 5
  • feat: reduce package file size

    feat: reduce package file size

    Reduces the package file size by doing the following:

    • Puts PHP docs on one line
    • Puts all model files in model.php

    Testing on the branch consolidate-models-gen, with just these two changes, we get a reduction of 99M to 44M:

    $ composer require google/apiclient-services 
    Using version ^0.275.0 for google/apiclient-services
    $ du -sh vendor/google/apiclient-services
     99M	vendor/google/apiclient-services
    
    $ composer require google/apiclient-services:dev-consolidate-models-gen
    $ du -sh  vendor/google/apiclient-services
     44M	vendor/google/apiclient-services
    

    That's a reduction of 56% file size (55MB)!!

    TODO: Verify what composer pulls down and check the size there

    NOTE: My testing removed RemoteBuildExecution, SemanticTile, AdExchangeBuyer, Webmasters, and PlayableLocations

    Other consideration

    • When protected $xyzDataType = '', don't create the property, as it's functionally equivalent to the property not existing (see Model::__get).
    • Remove class_alias calls (they've been around for a year and a half now)

    Other OTHER considerations (not related to package file size)

    • Move Service classes inside Service directory
    • Add an "unofficial" mirror repo for creating the composer packages (e.g. googlemirror/apiclient-mybusinessqa)
    opened by bshaffer 1
Releases(v0.281.0)
Owner
Google APIs
Clients for Google APIs and tools that help produce them.
Google APIs
Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit 96 Jan 6, 2023
OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

Mounir R'Quiba 6 Jun 14, 2023
Attempting to create an intelligent mock of the Google API PHP Client for unit and functional testing

google-api-php-client-mock A small scale intelligent mock of the Google API PHP Client for unit and functional testing. Overview This is intended to m

SIL International 0 Jan 4, 2022
The Smart-ID PHP client can be used for easy integration of the Smart-ID solution to information systems or e-services

Smart-ID PHP client Introduction The Smart-ID PHP client can be used for easy integration of the Smart-ID solution to information systems or e-service

SK ID Solutions 16 Oct 23, 2022
AsyncAws Core - shared classes between all AWS services. It also contains the STS client to handle authentication.

AsyncAws Core The repository contains shared classes between all AWS services. It also contains the STS client to handle authentication. Install compo

Async AWS 54 Dec 14, 2022
PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Sergey Bykov 63 Feb 14, 2022
Nexmo REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Client Library for PHP Support Notice This library and it's associated packages, nexmo/client and nexmo/client-core have transitioned into a "Maintena

Nexmo 75 Sep 23, 2022
DigitalOcean API v2 client for Symfony and API Platform

DigitalOcean Bundle for Symfony and API Platform DunglasDigitalOceanBundle allows using the DigitalOcean API from your Symfony and API Platform projec

Kévin Dunglas 25 Jul 27, 2022
API client for ThePay - payment gate API

This is the official highly compatible public package of The Pay SDK which interacts with The Pay's REST API. To get started see examples below.

ThePay.cz s.r.o. 3 Oct 27, 2022
Code Quiz MonoRepo (API, API Client, App)

Code Quiz Welcome to the Code Quiz Open Source project from How To Code Well. This is an Open Source project that includes an API and an App for the d

How To Code Well 2 Nov 20, 2022
PHP package to manage google-api interactions

Google-api-client PHP package to manage google-api interactions Supports: Google Drive API Google Spreadsheet API Installation composer require obrio-

OBRIO 3 Apr 28, 2022
🌐 Free Google Translate API PHP Package. Translates totally free of charge.

Google Translate PHP Free Google Translate API PHP Package. Translates totally free of charge. Installation Basic Usage Advanced Usage Language Detect

Levan Velijanashvili 1.5k Dec 31, 2022
Google Drive Api Wrapper by PHP

GoogleDrive Api Wrapper usage at first you need to create oauth client on google cloud platform. so go to the your google console dashboard and create

Arash Abedi 2 Mar 24, 2022
Google Translator Api Wrapper For Php Developers.

Google Translator Api Wrapper For Php Developers.

Roldex Stark 2 Oct 12, 2022
An elegant wrapper around Google Vision API

STILL UNDER DEVELOPMENT - DO NOT USE IN PRODUCTION Requires PHP 8.0+ For feedback, please contact me. This package provides an elegant wrapper around

Ahmad Mayahi 24 Nov 20, 2022
Simple Google Tts Api Class

Simple Google Tts Api Class

Ömer Faruk Demirel 2 Dec 2, 2022
playSMS is a web interface for SMS gateways and bulk SMS services

README Latest development release is playSMS version 1.4.4-beta4 Latest stable release is playSMS version 1.4.3 Official project website: https://play

playSMS 662 Dec 31, 2022
laravel wrapper for dicom images services

laravel wrapper for dicom images services

Laravel Iran Community 4 Jan 18, 2022
⚡️ Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC.

Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC. This project is a work-in-progress. Code and docume

Web3 PHP 665 Dec 23, 2022