 ]
 
 
+redactApiKey = (url) -> url.replace user.apiKey, '[NOPE]'
+
+
 # Builds a URL for downloading image information.
 #
 # @param [String] apiKey the API key to use for the request

  jsonfile.writeFileSync './picksel.json', config, options

    
# Downloads an image.
#
# @param [String] id the Pixabay image ID

  # Build URL for API request.
  url = buildUrl(user.apiKey, id, resolution)
  
  log.info 'Requesting information for image' \
    + ' from ' \
    + redactApiKey url
    
  options =
    url: url
    json: true
    
  # Call out to Pixabay.
  request options, (error, response, body) ->
    
    # On success.
    if isSuccessful error, body
      url = body.hits[0][resolutions[resolution]]
      log.info 'Downloading file from \'' \
        + url \
        + '\'...'
      tempDestination = destination + '.pickseltemp'
      file = fs.createWriteStream tempDestination
      req = https.get url, (response) ->
