SupportScripts/Python/GetGroupListWithDetails/export_groups.py [24:60]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    return getPagedData(access_token, endpoint, [])

def getNotPagedData(access_token, endpoint):
    headers = buildHeader(access_token)
    result = requests.get(endpoint,headers=headers)
    return json.loads(result.text)

def getPagedData(access_token, endpoint, data):
    headers = buildHeader(access_token)
    result = requests.get(endpoint,headers=headers)
    result_json = json.loads(result.text)
    json_keys = result_json.keys()
    if JSON_KEY_DATA in json_keys and len(result_json[JSON_KEY_DATA]):
        data.extend(result_json[JSON_KEY_DATA])
    if JSON_KEY_PAGING in json_keys and JSON_KEY_NEXT in result_json[JSON_KEY_PAGING]:
        next = result_json[JSON_KEY_PAGING][JSON_KEY_NEXT]
        if next:
            getPagedData(access_token, next, data)
    return data

def processAdminsAndMembers(group_data):
    for idx, group in enumerate(group_data):
        group_data[idx]['members'] = group['members']['summary']['total_count']
        admins = ''
        try:
            for admin in group['admins']['data']:
                admins += admin['id'] + '-' + admin['name']
                try:
                    admins += ' (' + admin['email'] + ')|'
                except:
                    admins += '|'
            group_data[idx]['admins'] = admins
        except:
            return group_data
    return group_data

def buildHeader(access_token):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



SupportScripts/Python/GetKLCategoryInfo/export_kl_category.py [31:67]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    return getPagedData(access_token, endpoint, [])

def getNotPagedData(access_token, endpoint):
    headers = buildHeader(access_token)
    result = requests.get(endpoint,headers=headers)
    return json.loads(result.text)

def getPagedData(access_token, endpoint, data):
    headers = buildHeader(access_token)
    result = requests.get(endpoint,headers=headers)
    result_json = json.loads(result.text)
    json_keys = result_json.keys()
    if JSON_KEY_DATA in json_keys and len(result_json[JSON_KEY_DATA]):
        data.extend(result_json[JSON_KEY_DATA])
    if JSON_KEY_PAGING in json_keys and JSON_KEY_NEXT in result_json[JSON_KEY_PAGING]:
        next = result_json[JSON_KEY_PAGING][JSON_KEY_NEXT]
        if next:
            getPagedData(access_token, next, data)
    return data

def processAdminsAndMembers(group_data):
    for idx, group in enumerate(group_data):
        group_data[idx]['members'] = group['members']['summary']['total_count']
        admins = ''
        try:
            for admin in group['admins']['data']:
                admins += admin['id'] + '-' + admin['name']
                try:
                    admins += ' (' + admin['email'] + ')|'
                except:
                    admins += '|'
            group_data[idx]['admins'] = admins
        except:
            return group_data
    return group_data

def buildHeader(access_token):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



