 authUrl = 'https://auth.withings.com/fr/'
 accountUrl = 'https://healthmate.withings.com/index/service/account'
 measureUrl = 'https://healthmate.withings.com/index/service/measure'
+activityUrl = 'https://healthmate.withings.com/index/service/v2/activity'
 aggregateUrl = 'https://healthmate.withings.com/index/service/v2/aggregate'
 
 # Models

                            onMeasures = (err, res, body) ->
                                return callback err if err
                                measures = JSON.parse body
                                saveActivityMeasures measures, callback

                            request.post aggregateUrl, options, onMeasures


hashMeasuresByDate = (measures) ->
    hash = {}
    for m in measures
        date = moment m.date
        hash[date] = true
    hash


            "#{bloodPressuresToSave.length} blood pressure measures to save")

        saveAll = (modelClass, models, done) ->
            async.eachSeries models, (model, callback) ->
                modelClass.create model, callback
            , (err) ->
                done err
