import requests


def _get_url(url, params, **kwargs):
    """Wraps the requests.get() call and returns the results as a decoded
    JSON object.

    Args:
        url (str): URL to request
        params (dict): Same as requests.get(params)
        kwargs: Passed directly to requests.get()

    Returns:
        dict: Result of the remote query
    """
    request = requests.get(url, params=params, **kwargs)
    request.raise_for_status()
    return request.json()