Run from the command ruby script_name.rb API_TOKEN 2018-01-01 2018-12-31
or ruby script_name.rb API_TOKEN 2018-01-01 2018-12-31 eu
if on the EU datacenter.
# ruby script_name.rb API_TOKEN 2019-01-01 2019-12-31
require 'samanage'
require 'csv'
api_token, start_date, end_date, datacenter = ARGV
@samanage = Samanage::Api.new(token: api_token, datacenter: datacenter)
DEFAULT_FILENAME = "Incident Report #{DateTime.now.strftime("%b-%d-%Y-%l%M")}.csv"