<commit_before>#!/usr/bin/env python
import json, os, requests
from models import db, FoodMenu, FoodServices

key = os.environ.get('UWOPENDATA_APIKEY')

def getData(service):
	payload = {'key': key, 'service': service}
	r = requests.get('http://api.uwaterloo.ca/public/v1/', params=payload)
	return r

foodMenu = getData('FoodMenu').text
foodMenuData = FoodMenu(foodMenu)
serviceInfo = getData('FoodServices').text
serviceInfoData = FoodServices(serviceInfo)
db.session.add(foodMenuData)
db.session.add(serviceInfoData)
db.session.commit()
<commit_msg>Update retrieve() for FoodMenu data<commit_after>#!/usr/bin/env python
import json, os, requests
from models import db, FoodMenu, FoodServices

key = os.environ.get('UWOPENDATA_APIKEY')

def getData(service):
	payload = {'key': key, 'service': service}
	r = requests.get('http://api.uwaterloo.ca/public/v1/', params=payload)
	return r

def retrieve():
	payload = {'key': key}
	url = os.environ.get('API_URL')
	r = requests.get(url, params=payload)
	return r

foodMenu = retrieve().text
foodMenuData = FoodMenu(foodMenu)
serviceInfo = getData('FoodServices').text
serviceInfoData = FoodServices(serviceInfo)
db.session.add(foodMenuData)
db.session.add(serviceInfoData)
db.session.commit()

{'fraction_non_alphanumeric': 0.1435483870967742, 'fraction_numerical': 0.0016129032258064516, 'mean_word_length': 6.3, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '714438', 'n_tokens_mistral': 420, 'n_tokens_neox': 413, 'n_words': 90}