Fetch a ref.

    Args:

        profile
            A profile generated from ``simplygithub.authentication.profile``.
            Such profiles tell this module (i) the ``repo`` to connect to,
            and (ii) the ``token`` to connect with.

        ref
            The ref to fetch, e.g., ``heads/my-feature-branch``.

    Returns
        A dict with data about the ref.

def get_ref(profile, ref):
    """Fetch a ref.

    Args:

        profile
            A profile generated from ``simplygithub.authentication.profile``.
            Such profiles tell this module (i) the ``repo`` to connect to,
            and (ii) the ``token`` to connect with.

        ref
            The ref to fetch, e.g., ``heads/my-feature-branch``.

    Returns
        A dict with data about the ref.

    """
    resource = "/refs/" + ref
    data = api.get_request(profile, resource)
    return prepare(data)