Czy chcesz podzielić się opinią na temat interfejsu Google Ads API? Zarejestruj się, aby otrzymać zaproszenie do udziału w badaniach opinii użytkowników.
Alternatywa używana, gdy gRPC jest niedostępny:
REST. Nie wymaga instalacji żadnych rozszerzeń PHP i opiera się na protokole HTTP/1.1.
Jeśli wolisz samodzielnie określić typ transportu zamiast polegać na regułach domyślnych opisanych powyżej, możesz ustawić właściwość transport w sekcji CONNECTION w pliku google_ads_php.ini:
[CONNECTION]; Optional transport settings.; By default, "grpc" is used if available otherwise "rest".transport = "grpc"
Możesz też skonfigurować ustawienie transportu programowo, tak jak wszystkie inne:
$googleAdsClient = (new GoogleAdsClientBuilder()) ... ->withTransport('grpc') ->build();
[null,null,["Ostatnia aktualizacja: 2025-02-28 UTC."],[[["The Google Ads API client library supports two transport types: gRPC (preferred) and REST (fallback)."],["gRPC offers better performance but requires the gRPC PHP extension, while REST is based on HTTP/1.1 and doesn't require any specific extension."],["You can manually specify your preferred transport type through the `google_ads_php.ini` configuration file or programmatically within your code."],["The gRPC version utilized by the library is usually managed through dependencies, primarily `google/gax`, and occasionally directly within the library's own `composer.json` for optimization or compatibility."]]],[]]