import requests
import json


def about_dataset(dset):
    """
    Ping Earthdata to get metadata about the dataset of interest (the collection).

    See Also
    --------
    query.Query.dataset_all_info
    """

    cmr_collections_url = "https://cmr.earthdata.nasa.gov/search/collections.json"
    response = requests.get(cmr_collections_url, params={"short_name": dset})
    results = json.loads(response.content)
    return results