def update_urls(response)
      mode = response[:mode].to_sym
      raise CommunicationModeSwitch, "RightNet communication mode switching from #{@mode.inspect} to #{mode.inspect}" if @mode && @mode != mode
      @mode = mode
      @shard_id = response[:shard_id].to_i
      if (new_url = response[:router_url]) != @router_url
        Log.info("Updating RightNet router URL to #{new_url.inspect}")
        @router_url = new_url
      end
      if (new_url = response[:api_url]) != @api_url
        Log.info("Updating RightApi URL to #{new_url.inspect}")
        @api_url = new_url
        create_http_client
      end
      true
    end
def update_urls(response)
      mode = response[:mode].to_sym
      raise CommunicationModeSwitch, "RightNet communication mode switching from #{@mode.inspect} to #{mode.inspect}" if @mode && @mode != mode
      @mode = mode
      @shard_id = response[:shard_id].to_i
      if (new_url = response[:router_url]) != @router_url
        Log.info("Updating RightNet router URL to #{new_url.inspect}")
        @router_url = new_url
      end
      if (new_url = response[:api_url]) != @api_url
        Log.info("Updating RightApi URL to #{new_url.inspect}")
        @api_url = new_url
        create_http_client
      end
      true
    end
Update URLs and other data returned from authorization
 Recreate client if API URL has changed

 @param [Hash] response containing URLs with keys as symbols

 @return [TrueClass] always true

 @raise [CommunicationModeSwitch] changing communication mode