class MavisCLI::GPPractices::Download
Public Instance Methods
Source
# File app/lib/mavis_cli/gp_practices/download.rb, line 21 def call(output_file:, **) require "mechanize" puts "Starting GP practice data download process..." agent = Mechanize.new agent.user_agent_alias = "Mac Safari" puts "Download the GP practices data" epraccur_file = agent.get( "https://www.odsdatasearchandexport.nhs.uk/api/getReport?report=epraccur" ) puts "Writing #{output_file}" epraccur_file.save!(output_file) puts "File downloaded successfully to #{output_file}" end