def METHOD_NAME(player, full=False):
    from target.models import Attack
    # if tsnow() - player.attacksUpda < 15 * 60:
    #     return False, player.attack_set.all()
    query = 'attacksfull,timestamp' if full else 'attacks,timestamp'
    req = apiCall('user', "", query, player.getKey())
    if 'apiError' in req:
        return req, player.attack_set.order_by("-timestamp_ended").all()
    attacks = req.get("attacks", dict({}))
    timestamp = req.get("timestamp", 0)
    # in case 0 attacks API returns []
    if not len(attacks):
        attacks = dict({})
    remove = []
    old = tsnow() - 2678400  # 1 month old
    batch = Attack.objects.bulk_operation()
    for k, v in attacks.items():
        if v["timestamp_ended"] < old:
            continue
        if full:
            v["attacker_name"] = "Player"
            v["attacker_factionname"] = "Faction"
            v["defender_name"] = "Player"
            v["defender_factionname"] = "Faction"
            v["chain"] = 0
            v["modifiers"] = {"fair_fight": 1, "war": 1, "retaliation": 1, "group_attack": 1, "overseas": 1, "chain_bonus": 1, "warlord_bonus": 1}
        # ignore stealth incoming
        if v.get("stealthed") and v["defender_id"] == player.tId:
            continue
        if v["attacker_id"] == player.tId:
            v["attacker"] = True
            v["targetId"] = v["defender_id"]
        else:
            v["attacker"] = False
            v["targetId"] = v["attacker_id"]
        if v["chain"] in BONUS_HITS:
            # case attacker and bonus hit
            v["flat_respect"] = float(v["respect"]) / float(v['modifiers']['chain_bonus'])
            v["bonus"] = v["chain"]
        else:
            allModifiers = 1.0
            for mod in ["fair_fight", "war", "retaliation", "group_attack", "overseas", "chain_bonus", "warlord_bonus"]:
                allModifiers *= float(v['modifiers'].get(mod, 1))
            if v["result"] == "Mugged":
                allModifiers *= 0.75
            base_respect = float(v["respect"]) / allModifiers
            level = 1 if full else int(math.exp(4. * base_respect - 1))
            v["base_respect"] = base_respect
            v["flat_respect"] = float(v['modifiers']["fair_fight"]) * base_respect
            v["bonus"] = 0
            v["level"] = level
        if v["defender_name"] == "Gareth-Bale":
            print(f'{allModifiers}')
        v = modifiers2lvl1(v)
        batch.update_or_create(tId=int(k), player_id=int(player.id), defaults=v)
    if batch.count():
        batch.run()
    player.attack_set.filter(timestamp_ended__lt=old).delete()
    player.attacksUpda = int(timestamp)
    player.save()
    return False, player.attack_set.order_by("-timestamp_ended").all()