Method: AppStoreConnect::Specification.download

Defined in:
lib/app_store_connect/specification.rb

.download(path) ⇒ Object



44
45
46
47
48
49
50
51
52
# File 'lib/app_store_connect/specification.rb', line 44

def self.download(path)
  uri = URI('https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip')

  Net::HTTP.start(uri.host, uri.port, { use_ssl: true }) do |http|
    response = http.get(uri.path)

    File.write(path, response.body)
  end
end