Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Ads: Integrate connection check endpoint on Networking layer #13140

Merged
merged 8 commits into from
Jun 26, 2024

Conversation

itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jun 25, 2024

Part of #13139

Description

This PR updates the Networking layer to integrate the endpoint to check the connection of a given site with Google Ads plugin. Changes include:

  • New model and mapper for Google ads connection
  • New remote for Google ads endpoints.
  • Integration of the connection check at path GET wc/gla/ads/connection.

Yosemite update will be done in a separate PR.

Testing steps

Just CI passing should be sufficient.

Screenshots

N/A


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added the type: task An internally driven task. label Jun 25, 2024
@itsmeichigo itsmeichigo added this to the 19.3 milestone Jun 25, 2024
@itsmeichigo itsmeichigo changed the title Google Ads: Integrate connection check endpoint Google Ads: Integrate connection check endpoint on Networking layer Jun 25, 2024
@itsmeichigo itsmeichigo marked this pull request as ready for review June 25, 2024 07:11
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 25, 2024

WooCommerce iOS📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS WooCommerce iOS
Build Numberpr13140-a85b3f8
Version19.2
Bundle IDcom.automattic.alpha.woocommerce
Commita85b3f8
App Center BuildWooCommerce - Prototype Builds #9743
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@selanthiraiyan selanthiraiyan self-assigned this Jun 25, 2024
Copy link
Contributor

@selanthiraiyan selanthiraiyan left a comment

Choose a reason for hiding this comment

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

Looks good to me. 🚀

I left a question about making this request work for application password login.


public func checkConnection(for siteID: Int64) async throws -> GoogleAdsConnection {
let path = Paths.connection
let request = JetpackRequest(wooApiVersion: .none, method: .get, siteID: siteID, path: path)
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Should we specify availableAsRESTRequest as true?

I am asking based on the GoogleAdsConnectionMapper being able to parse both with/without data envelope JSON responses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great catch! I added support for REST request in a85b3f8.

@itsmeichigo itsmeichigo enabled auto-merge June 26, 2024 05:47
@itsmeichigo itsmeichigo merged commit ec57397 into trunk Jun 26, 2024
22 checks passed
@itsmeichigo itsmeichigo deleted the task/13139-gla-connection branch June 26, 2024 06:07
@itsmeichigo itsmeichigo added the feature: google-ads-campaigns Related to Google ads campaigns label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: google-ads-campaigns Related to Google ads campaigns type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants