spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.64.1 vs spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.65.0.beta.20171107010003
- old
+ new
@@ -660,25 +660,13 @@
end
# Uploads an In-App-Purchase Review screenshot
# @param app_id (AppId): The id of the app
# @param upload_image (UploadFile): The icon to upload
- # @return [JSON] the screenshot data, ready to be added to an In-App-Purchase
+ # @return [JSON] the response
def upload_purchase_review_screenshot(app_id, upload_image)
- data = du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image)
- {
- "value" => {
- "assetToken" => data["token"],
- "sortOrder" => 0,
- "type" => du_client.get_picture_type(upload_image),
- "originalFileName" => upload_image.file_name,
- "size" => data["length"],
- "height" => data["height"],
- "width" => data["width"],
- "checksum" => data["md5"]
- }
- }
+ du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image)
end
# Uploads a screenshot
# @param app_version (AppVersion): The version of your app
# @param upload_image (UploadFile): The image to upload
@@ -1158,10 +1146,23 @@
if review_screenshot
# Upload Screenshot:
upload_file = UploadFile.from_path review_screenshot
screenshot_data = upload_purchase_review_screenshot(app_id, upload_file)
- data["versions"][0]["reviewScreenshot"] = screenshot_data
+ new_screenshot = {
+ "value" => {
+ "assetToken" => screenshot_data["token"],
+ "sortOrder" => 0,
+ "type" => "SortedScreenShot",
+ "originalFileName" => upload_file.file_name,
+ "size" => screenshot_data["length"],
+ "height" => screenshot_data["height"],
+ "width" => screenshot_data["width"],
+ "checksum" => screenshot_data["md5"]
+ }
+ }
+
+ data["versions"][0]["reviewScreenshot"] = new_screenshot
end
# Now send back the modified hash
r = request(:post) do |req|
req.url "ra/apps/#{app_id}/iaps"