Skip to content

Added support for REST HTTP handler.#1035

Merged
fiboknacky merged 2 commits into
mainfrom
support-http-handler
Jun 28, 2024
Merged

Added support for REST HTTP handler.#1035
fiboknacky merged 2 commits into
mainfrom
support-http-handler

Conversation

@fiboknacky

Copy link
Copy Markdown
Member

No description provided.

Change-Id: Iae03785d8a4c8d2ed628f96d4904824b0b2dd72c
Bug: b/xxxxxxx
@fiboknacky fiboknacky requested a review from Raibaz June 26, 2024 12:58

@bshaffer bshaffer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit for naming, otherwise LGTM

Comment thread src/Google/Ads/GoogleAds/Lib/ConfigurationTrait.php Outdated
Comment thread src/Google/Ads/GoogleAds/Lib/ConfigurationTrait.php Outdated
Change-Id: If1a57b9c41f03cf7f9262b60557b6a38e1095724
@fiboknacky fiboknacky requested a review from bshaffer June 27, 2024 14:44
@bshaffer

Copy link
Copy Markdown
Contributor

FYI there's also a credentialsConfig option for authHttpHandler, which you could set as well (or add as a separate option). This is used in OAuth2 requests if there's an HTTP request to the OAuth2 "token" endpoint (or anywhere else, such as in external account credentials. This is set on credentialsConfig:

$clientoptions = ['credentialsConfig' => ['authHttpHandler' => $myHttpHandler]];

You could set this to the httpHandler above as well, when null, for consistency. Or you can add your own setAuthHttpHandler method for it, or do nothing at all. But I wanted to let you know it exists in case that's relevant!

@fiboknacky

Copy link
Copy Markdown
Member Author

Thanks. That'd be another PR then.

@fiboknacky fiboknacky merged commit 66cab41 into main Jun 28, 2024
@fiboknacky fiboknacky deleted the support-http-handler branch June 28, 2024 04:28
@psobhanlo

psobhanlo commented Jul 11, 2024

Copy link
Copy Markdown
    public function search(SearchGoogleAdsRequest $request, array $callOptions = []): PagedListResponse
    {
        return $this->startApiCall('Search', $request, $callOptions);
    }

            $response = $googleAdsClient->getGoogleAdsServiceClient()->search(
                $customerId,
                $query,
                [
                    'pageSize' => $entriesPerPage,
                    'returnTotalResultsCount' => true,
                    'pageToken' => end($pageTokens)
                ]
            );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants