import requests


def get_all_fdm_objects(fdm, limit=100, offset=0):
    """
    Get all network objects on FDM, limit=0 returns all objects
    :param fdm: FDM object
    :param limit: Integer 0-100, how many objects to return
    :param offset: Integer, starting point of objects
    :return: List containing all network objecs
    """
    url = fdm.url() + "/api/fdm/v6/object/networks?offset=" + str(offset) + "&limit=" + str(limit)

    headers = {
        'Accept': 'application/json',
        'Authorization': 'Bearer ' + fdm.access_token
    }

    response = requests.request("GET", url, headers=headers, verify=False).json()

    return response