You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've looked through the spaceship documentation and codebase and can't seem to find any evidence of this feature already existing (please correct me if i'm wrong). I've had a look at apple's internal requests and believe this feature shouldn't be too difficult to implement. This is a feature that my company would quite like to use so we would be happy to file a pull request for the necessary changes assuming that this is sounds sensible? @KrauseFx
This is how I would expect it to work (feel free to suggest any changes!):
First off, there is currently no way to select a specific review, the current method for fetching reviews is: reviews = Spaceship::Application.find(app_id).ratings.reviews()
A method would have to be made that allows the user to select a specific review, eg. review = Spaceship::Application.find(app_id).ratings.review(review_id)
On top of this we would add a method that allows the review to be replied to, eg. Spaceship::Application.find(app_id).ratings.review(review_id).respond(response_text)
Fetching a specific review
This can be done via a simple get request to the following endpoint:
Apple uses 2 slightly different requests depending on whether you are updating a response or sending one for the first time. In order to make the method easier to use we would handle this from within the method:
First off we would check whether a developer response has already been sent, this can be done by checking the data sent from apple about the review
Not sure what the standard is for error handling and method return values but presumably it would be one of the following:
The method return value is a boolean indicating success or failure
The method has a null return value and throws an error upon failure detailing what exactly went wrong
The method returns an object with a boolean property to indicate whether the request was successful and an additional property containing the error message where applicable
(would love some input on that last point)
Thanks for reading through all that and looking forward to hearing back from you! Henry
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Intro
I've looked through the spaceship documentation and codebase and can't seem to find any evidence of this feature already existing (please correct me if i'm wrong). I've had a look at apple's internal requests and believe this feature shouldn't be too difficult to implement. This is a feature that my company would quite like to use so we would be happy to file a pull request for the necessary changes assuming that this is sounds sensible? @KrauseFx
This is how I would expect it to work (feel free to suggest any changes!):
First off, there is currently no way to select a specific review, the current method for fetching reviews is:
reviews = Spaceship::Application.find(app_id).ratings.reviews()
A method would have to be made that allows the user to select a specific review, eg.
review = Spaceship::Application.find(app_id).ratings.review(review_id)
On top of this we would add a method that allows the review to be replied to, eg.
Spaceship::Application.find(app_id).ratings.review(review_id).respond(response_text)
Fetching a specific review
This can be done via a simple get request to the following endpoint:
https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/${app_id}/platforms/ios/reviews?reviewId=${review_id}
Replying to a review
Apple uses 2 slightly different requests depending on whether you are updating a response or sending one for the first time. In order to make the method easier to use we would handle this from within the method:
First off we would check whether a developer response has already been sent, this can be done by checking the data sent from apple about the review
A) If a developer response has not been sent then we would make a post request to https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/${app_id}/platforms/ios/reviews/${review_id}/responses
B) If a developer response has been sent (therefore we are updating the response) we would make a put request to https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/ra/apps/${app_id}/platforms/ios/reviews/${review_id}/responses/${response_id}
The payload for each of the above requests would be as follows (and yes it's weird that they require the review_id in both the url and the payload):
Not sure what the standard is for error handling and method return values but presumably it would be one of the following:
(would love some input on that last point)
Thanks for reading through all that and looking forward to hearing back from you!
Henry
Beta Was this translation helpful? Give feedback.
All reactions