def holdings():
data = {}
res = requests.get(BASE_URL)
res_content = json.loads(res.content)
for holding in res_content['data']:
data['id'] = holding['id']
data['name'] = holding['attributes']['name']
return data
def holdings():
data = {}
data['content'] = []
res = requests.get(BASE_URL)
res_content = json.loads(res.content)
for holding in res_content['data']:
data_id = holding['id']
data_name = holding['attributes']['name']
data['content'].append({'id': data_id, 'name': data_name})
return data