#Modes - PvP:5, PvE:7, Nightfall:16, Strikes:18, IronBanner:19, ScoredNightfall:46
#   Scored HeroicNightfall:47, Gambit:63, CompetitivePvE: 64
mode = 46

strikeColumns = []
temp_list = []
guardian_list = []
pp = pprint.PrettyPrinter(indent=2)

countLimit = 200
groupType = '1'
groupId = '1669746'
membershipType = '1'
bungie_url = 'https://www.bungie.net/Platform'

guardian_list = bungotools.getdbListValues(
    GuardianId.objects.filter(active=1).values('guardianId'), 'guardianId')


#Get all unique matchIds from db
def getStrikeList(tgid):
    temp_list = []
    for m in nightfallStrikes.objects.all().filter(
            guardianId=tgid).values('matchId'):
        temp_list.append(m['matchId'])
#    print(tgid)
#    print(len(sorted(set(temp_list))))
    return sorted(set(temp_list))


#print(match_list)
def getGuardianName(cid):
def getGuardianClassByClassId(cid):
    temp = bungotools.getdbListValues(
        GuardianClass.objects.filter(
            guardianClassId=cid).values('guardianClass'), 'guardianClass')
    return bungotools.getClassType(temp[0])
def getGuardianNameByClass(cid):
    gid = bungotools.getdbListValues(
        GuardianClass.objects.filter(guardianClassId=cid).values('guardianId'),
        'guardianId')
    name = getGuardianName(gid[0])
    return name
def getClanList():
    return bungotools.getdbListValues(
        GuardianId.objects.filter(active=1).values('guardianId'), 'guardianId')
def getGuardianClasses(gid):
    return bungotools.getdbListValues(
        GuardianClass.objects.filter(guardianId=gid).values('guardianClassId'),
        'guardianClassId')
def getMatchList():
    return bungotools.getdbListValues(
        gambitStats.objects.all().values('matchId'), 'matchId')