docs: function(key, value, type) {
        var u = user.user_id;
        var appId = '';
        if ($ionicCoreSettings.get('app_id')) {
          appId = $ionicCoreSettings.get('app_id')
        } else {
          appId = $ionicApp.getId();
        }
        if(!u) {
          throw new Error("Please call identify with a user_id before calling push");
        }
        var o = {};
        o['user_id'] = u;
        o[key] = value;
  
        return $http.post($ionicApp.getApiUrl() + '/api/v1/app/' + appId + '/users/' + type, o);
      }