def authorize
      puts "Visit the following URL in your browser and authorize #{token_store.app_name} to access your subscription metrics"
      puts "   #{auth.app_authorization_url}"
      puts

      server = auth.create_server_instance
      auth_result = server.get_authentication_token

      puts auth_result
      if auth_result["code"]
        puts "Authorization received"
      else
        raise GamewispError, "Authorization failed."
      end

      auth.renew_tokens_with_auth_code auth_result["code"]
    end
def authorize
      puts "Visit the following URL in your browser and authorize #{token_store.app_name} to access your subscription metrics"
      puts "   #{auth.app_authorization_url}"
      puts

      server = auth.create_server_instance
      auth_result = server.get_authentication_token

      puts auth_result
      if auth_result["code"]
        puts "Authorization received"
      else
        raise GamewispError, "Authorization failed."
      end

      auth.renew_tokens_with_auth_code auth_result["code"]
    end
Only works if this class is derived (includes) HTTParty

if ENV["DEBUG"]
  debug_output $stdout
end