b0VIM 8.1-ÐÄ]|‡ì¨’joshJoshs-Mac-mini.local~josh/Projects/fastlane/fastlane/supply/lib/supply/client.rb 3210#"! Utpgÿÿÿÿÿÿÿÿmhþÿÿÿÿÿÿÿ\ÕýÿÿÿÿÿÿÿŒ1üÿÿÿÿÿÿÿ<½ad!ÙgëÁŒyxjF6$#ìëÀ¡Pþ ö õ Ô › b G ç € F E à — Š ð ä Ú Ù ¾ p M ÿ þ ã Û Ú ˆ C  „ƒDCð¾´³[ »mèç¿•”y2é¼²±•Œ€gK'ðÛǵ´¥g\C98ôìæ帀LK3ÙØ # Reference to the entry we're currently editing. Might be nil if don't have one open # Editing something SCOPE = AndroidPublisher::AUTH_ANDROIDPUBLISHER SERVICE = AndroidPublisher::AndroidPublisherService class Client < AbstractGoogleServiceClient end end UI.user_error!("Google Api Error: #{e.message} - #{message}") end message = e.body else message = error["error"] && error["error"]["message"] if error end nil rescue JSON.parse(e.body) error = begin rescue Google::Apis::Error => e yield if block_given? def call_google_api private end self.client = service end service.root_url = params[:root_url] params[:root_url] << '/' unless params[:root_url].end_with?('/') # Google's client expects the root_url string to end with "/". if params[:root_url] service.authorization = auth_client service = self.class::SERVICE.new Google::Apis::RequestOptions.default.retries = 5 Google::Apis::ClientOptions.default.send_timeout_sec = params[:timeout] Google::Apis::ClientOptions.default.open_timeout_sec = params[:timeout] Google::Apis::ClientOptions.default.read_timeout_sec = params[:timeout] Google::Apis::ClientOptions.default.application_version = Fastlane::VERSION Google::Apis::ClientOptions.default.application_name = "fastlane (supply client)" end Google::Apis.logger.level = Logger::DEBUG if FastlaneCore::Env.truthy?("DEBUG") auth_client.fetch_access_token! UI.verbose("Fetching a new access token from Google...") auth_client = Google::Auth::ServiceAccountCredentials.make_creds(json_key_io: service_account_json, scope: self.class::SCOPE) def initialize(service_account_json: nil, params: nil) # @param service_account_json: The raw service account Json data # Initializes the service and its auth_client using the specified information end service_account_json end service_account_json = StringIO.new(params[:json_key_data]) elsif params[:json_key_data] service_account_json = File.open(File.expand_path(params[:json_key])) if params[:json_key] end end UI.user_error!("Could not load Google authentication. Make sure it has been added as an environment variable in 'json_key' or 'json_key_data'") else params[:json_key] = json_key_path UI.user_error!("Could not find service account json file at path '#{json_key_path}'") unless File.exist?(json_key_path) json_key_path = File.expand_path(json_key_path) json_key_path = UI.input("The service account json file used to authenticate with Google: ") UI.important("To not be asked about this value, you can specify it using 'json_key'") if UI.interactive? unless params[:json_key] || params[:json_key_data] def self.service_account_authentication(params: nil) # Supply authentication file end return self.new(service_account_json: service_account_data, params: params) service_account_data = self.service_account_authentication(params: params) params ||= Supply.config def self.make_from_config(params: nil) attr_accessor :client # Connecting with Google SERVICE = nil SCOPE = nil class AbstractGoogleServiceClientmodule Supplyrequire 'net/http'AndroidPublisher = Google::Apis::AndroidpublisherV3require 'google/apis/androidpublisher_v3'require 'googleauth'adÐÜ <À¿%  õíì¡[A@'å Ê ¶   { Y O E = <  è ç Î © ‰ n Z E ; 1 ) ( Ð ¶ µ œ r R 7  ü Ô ¡ — … „ x w [ î æ à Ü Û end end end UI.user_error!("You need to have an active edit, make sure to call `begin_edit`") unless @current_edit def ensure_active_edit! private end end ) content_type: 'application/octet-stream' upload_source: obb_file_path, expansion_file_type, apk_version_code, current_edit.id, current_package_name, client.upload_edit_expansionfile( call_google_api do ensure_active_edit! def upload_obb(obb_file_path: nil, apk_version_code: nil, expansion_file_type: nil) end end ) image_type language, current_edit.id, current_package_name, client.deleteall_edit_image( call_google_api do ensure_active_edit! def clear_screenshots(image_type: nil, language: nil) end end ) content_type: 'image/*' upload_source: image_path, image_type, language, current_edit.id, current_package_name, client.upload_edit_image( call_google_api do ensure_active_edit! def upload_image(image_path: nil, image_type: nil, language: nil) # @param image_type (e.g. phoneScreenshots, sevenInchScreenshots, ...) end return images end full_url full_url = "#{url}=s0" # '=s0' param ensures full image size is returned (https://github.com/fastlane/fastlane/pull/14322#issuecomment-473012462) UI.verbose("URL after removing params: '#{clean_url}'")