import requests


def get_kills_dict(sys_id, list_len):
    """
    Creates a list of kill IDs and a list of hashes and zips those together in to a dictionary
    :param sys_id: the integer value ID of the system to be checked
    :param list_len: The upper bound of number of entries in the lists to create
    :return: Returns a dictionary of lists kill_list and hash_list but also returns the lists themselves
    """
    kill_list = []
    hash_list = []

    zkb_base_url = f"https://zkillboard.com/api/solarSystemID/{sys_id}/"
    zkb_obj = requests.get(zkb_base_url)
    zkb_json = zkb_obj.json()
    i = 0
    while i < list_len:
        kill_list.append(zkb_json[i]["killmail_id"])
        # print(zkb_json[i]["killmail_id"])
        hash_list.append(zkb_json[i]["zkb"]["hash"])
        # print(zkb_json[i]["zkb"]["hash"])
        i += 1

    kills_dict = dict(zip(kill_list, hash_list))
    return kills_dict, kill_list, hash_list