import requests


def fetch(path, json_file=True):
    """
    Fetch data at a given path assuming that target match a json file and is
    located on the OFF API.
    """
    if json_file:
        path = "%s.json" % (path)

    response = requests.get(path)
    return response.json()