googleapis / google-api-php-client

A PHP client library for accessing Google APIs
http://googleapis.github.io/google-api-php-client/
Apache License 2.0
9.31k stars 3.52k forks source link

Which Google API Service corresponds to the Google Play Integrity API? #2603

Closed aaronkelton closed 3 months ago

aaronkelton commented 3 months ago

When reading the Cleaning up unused services section, is there an exhaustive list of acceptable string values for "google/apiclient-services"? I'm personally using the Google Play Integrity API and not sure what to put here.

Hectorhammett commented 3 months ago

Hello @aaronkelton! Thanks for your message!

In the same page you linked related to cleaning up unused services, there is a note that mentions how to target the service you want to keep:

NOTE: This command performs an exact match on the service name, so to keep YouTubeReporting and YouTubeAnalytics as well, you'd need to add each of them explicitly:

So you need to use the service name in the list to keep it under your dependencies. The Client library depends on the services repo (link) for its services.

Inside that repo we can find all the services that the client has access to. Following this structure, we can find the PlayIntegrity service on that repository: https://github.com/googleapis/google-api-php-client-services/blob/main/src/PlayIntegrity.php

The answer would be:

"extra": {
        "google/apiclient-services": [
            "PlayIntegrity",
        ]
    }

That way, we keep this dependency. Let me know if that works!

aaronkelton commented 3 months ago

Thanks! I appreciate your answer. It looks like any service we list should correspond to the folder name in https://github.com/googleapis/google-api-php-client-services/tree/main/src

Hectorhammett commented 3 months ago

The Folder name and the Service name should be the same to my understanding :) so any of those should work. Glad I could help!