Skip to content

Commit

Permalink
Fixed period id issue (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsilva1 authored Jan 20, 2024
1 parent 69779be commit ce7da3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/campusdish_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ def get_menu_data(location, meal_id, date):
perform get request for the diner_json and return the dict at diner_json['Menu']
'''
location_id = LOCATION_INFO[location]['id']
period_id = MEAL_TO_PERIOD[meal_id][0]

#https://uci-campusdish-com.translate.goog/api/menu/GetMenus?locationId=3314&mode=Daily&date=12/14/2023
response = requests.get(f'https://uci-campusdish-com.translate.goog/api/menu/GetMenus?locationId={location_id}&date={date}&mode=Daily')
response = requests.get(f'https://uci-campusdish-com.translate.goog/api/menu/GetMenus?locationId={location_id}&date={date}&periodId={period_id}')
if response.status_code == 200:
payload = response.json()
if 'Menu' in payload:
Expand Down

1 comment on commit ce7da3d

@vercel
Copy link

@vercel vercel bot commented on ce7da3d Jan 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.