import token
import requests


def get_json_data(url):
    """
    fetch dones from the iDoneThis api, return list of dones from the json response
    """
    headers = {'content-type': 'application/json', 'authorization': 'token %s' % (token)}
    r = requests.get(url, headers=headers)
    data = r.json()
    dones = data['results']
    return dones