import requests


def get_work_record_from_doi(api_url, doi):
    """Retrieve Crossref works based on a DOI"""
    crossref_work_record = requests.get(
        f"{api_url}{doi}", params={"mailto": "dspace-lib@mit.edu"}
    ).json()
    return crossref_work_record