     
     # On success.
     if isSuccessful error, body
+      # Get URL of image at correct resolution.
       url = body.hits[0][resolutions[resolution]]
       
       log.info "Downloading image file from '#{url}'"

  apiKey = readline.question 'What\'s your Pixabay API key? To find it you' \
    + ' can log in to the Pixabay website and visit: ' \
    + 'https://pixabay.com/api/docs/ '
    
  # TODO: Test API key.
    
  newUser.apiKey = apiKey
  
  user = newUser
  
    
# Interpret commands.

persistConfig = () -> persist configPath, config


# Persists the currently loaded user settings.
#
persistUser = () -> persist userPath, user

    
