import requests


def get_pdb_structure_info(pdbid):
    """
    Gets info about a PDB structure from the GPCRdb
    
    Parameters
    ----------
        pdbid : str
            PDB ID of the structure. Can be upper- or lowercase. 
            
    Returns
    -------
        structure_info : dict
            A dictionary with information about the PDB structure.
                
    """
    # Convert to uppercase
    pdbid = pdbid.upper()
    # Fetch the structure 
    url = 'https://gpcrdb.org/services/structure/'+pdbid
    response = requests.get(url)
    str_info = response.json()
    return str_info