import requests


def query(data_type, uid):
    """
    :param data_type: the Pharos data type (e.g. ligand, target ..)
    :param uid: Pharos concept identifier
    :return: JSON containing the query results
    """
    url = "https://pharos.nih.gov/idg/api/v1/{}({})?view=full".format(data_type, uid)
    try:
        resp = requests.get(url).json()
    except:
        resp = None
    return resp