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

[spaceship] implement resolution center API in Spaceship::ConnectAPI #20726

Merged
merged 7 commits into from Nov 12, 2022

Conversation

Hiroto-N
Copy link
Contributor

@Hiroto-N Hiroto-N commented Oct 5, 2022

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Old resolution center code is implemented in the old Spaceship::Tunes endpoints, which sometimes does not return the expected messages properly due to some recent changes in appstore connect. The new calls are being made using the same endpoint as the rest of the Appstore Connect APIs, which have been implemented here following the standard format in spaceship.

Description

Previous implementation for retrieving resolution center comments for appstore and beta submissions were using the old private api endpoint https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/:app_id/platforms/ios/resolutionCenter?v=latest

New implementation is based on sniffing the traffic in Appstore Connect, which now uses the Appstore Connect APIs, although they have not been published in the API documentation yet and is not accessible using the api key.
e.g. base endpoint for threads is https://appstoreconnect.apple.com/iris/v1/resolutionCenterThreads

Testing Steps

# Get threads
Spaceship::ConnectAPI::ResolutionCenterThread.all filter: { appStoreVersion: version.id }

# Get threads with associated messages
Spaceship::ConnectAPI::ResolutionCenterThread.all filter: { appStoreVersion: version.id }, includes: 'resolutionCenterMessages'

# Get messages from thread with associated actors
thread = Spaceship::ConnectAPI::ResolutionCenterThread.all filter: { appStoreVersion: version.id }
thread.fetch_messages includes: 'rejections,fromActors'

@addbrick
Copy link
Contributor

addbrick commented Nov 8, 2022

@Hiroto-N I added another method to your pr. I opened a pr on your repro Hiroto-N#1.

@addbrick
Copy link
Contributor

addbrick commented Nov 8, 2022

@joshdholtz It would be great if this could get merged, it provides apis and models to traverse the updated resolution center.

@joshdholtz
Copy link
Member

Aye aye! Will get merged and released tonight 💪

@joshdholtz joshdholtz changed the title Implement resolution center apis [spaceship] implement resolution center API in Spaceship::ConnectAPI Nov 12, 2022
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

This looks great! Sorry about just getting to this 🤦 Trying to get used to the new lifestyle and time balance.

I added a commit that adds a comment about this API only being available via Apple ID auth but other than that this is 🔥

@joshdholtz joshdholtz merged commit 2263403 into fastlane:master Nov 12, 2022
@Hiroto-N Hiroto-N deleted the implement_resolution_center_apis branch November 13, 2022 21:59
@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.211.0 🚀

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

Successfully merging this pull request may close these issues.

None yet

4 participants