 
     listAddresses
 
+
+
+
+# Save and/or merge the imported contacts with the existing
 saveContact  = (linkContact, entries) ->
     linkAccount = ContactHelper.getAccount linkContact, ACCOUNT_TYPE, entries.accountName
 

# Load landing page to retrieve the csrf token needed in login request.
# More info on csrf -> https://en.wikipedia.org/wiki/Cross-site_request_forgery
#
# The sourceAlias input is also needed in login request, his goal is unknown
#
# The html parsing is done with cheerio, a "jquery like" server side
retrieveTokens = (requiredFields, entries, data, next) ->
    log.info 'Retrieve Tokens'

    request.get opts, (err, res, body) ->
        return next err if err

        if body.status? and body.status is 'error'
            return next new Error(body.status_details)

        $ = cheerio.load body
        entries.csrfToken = $('#loginCsrfParam-login').val()
        entries.accountName = requiredFields.login
        log.info 'Tokens retrieved'
        next()
