Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
The properties.adSenseLinks.list AdSense API method should be callable from PHP code in a similar manner to the existing API methods.
Implementation Brief
[x] Generate the Google_GoogleAnalyticsAdminV1alphaAdSenseLink class, and any related dependencies that are missing from our installed version of the Google API Client library.
Note that as it's an alpha API it's not in a more recent version so there's no need to upgrade the client library.
Use the google-apis-client-generator to generate the code - note that @aaemnnosttv has already generated a Gist of it, which can be used.
[x] Create and require the new local Composer package packages/apiclient-services-adsenselinks.
Copy the necessary generated files into the package.
Tweak PHP Scoper rules as needed to ensure the namespaced version of the package works correctly.
Add the package as a dependency to the main composer.json file.
See this PR for the previously created packages/apiclient-services-subscribewithgoogle for an example.
[x] Create the class Google\Site_Kit\Modules\Analytics_4\GoogleAnalyticsAdmin\AdSenseLinksService This can follow the example of an existing service, say PropertiesEnhancedMeasurementService.
No test coverage needed here; these can be tested in an integrated test when used in a subsequent issue. However, please do verify the code does indeed work as expected.
QA Brief
This does not introduce any user facing changes and only adds infrastructure for subsequent works. No QA needed here.
Changelog entry
Add PHP client library for Analytics AdSense links.
Feature Description
We need to replicate the Google API Client library's
GoogleAnalyticsAdminV1alphaAdSenseLink
for the REST Route we'll need to get linked accounts. See: https://docs.google.com/document/d/1-JenwPTAkw0eTkmESzjTOfgphs9qpRYH0h3xk_s3a4o/edit#heading=h.mjj6lw6stv0xDo not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
properties.adSenseLinks.list
AdSense API method should be callable from PHP code in a similar manner to the existing API methods.Implementation Brief
Google_GoogleAnalyticsAdminV1alphaAdSenseLink
class, and any related dependencies that are missing from our installed version of the Google API Client library.packages/apiclient-services-adsenselinks
.composer.json
file.packages/apiclient-services-subscribewithgoogle
for an example.Google\Site_Kit\Modules\Analytics_4\GoogleAnalyticsAdmin\AdSenseLinksService
This can follow the example of an existing service, sayPropertiesEnhancedMeasurementService
.Google_GoogleAnalyticsAdminV1alphaAdSenseLink
from the generatedGoogle_Service_GoogleAnalyticsAdmin
class into theAdSenseLinksService
class.Test Coverage
QA Brief
Changelog entry