Skip to content

Commit

Permalink
Try googleapiclient.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlondschien committed Aug 25, 2023
1 parent 0585271 commit 9907035
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Daily runs
on:
schedule:
- cron: '0 8 * * 1' # 8am on mondays
- cron: '0 8 * * 1' # 8 am on mondays
push:
paths:
- '.github/workflows/weekly.yml'
Expand Down
6 changes: 4 additions & 2 deletions crispybeefbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import json
import os
from email.message import EmailMessage

import sys
import requests
from google.oauth2.credentials import Credentials
from googleapiclient.oauth2.credentials import Credentials
from googleapiclient.discovery import build

url = "http://mensazurich.ch:8080/api/de/all/getMensaForCurrentWeek"
Expand All @@ -21,6 +21,8 @@
if "crispy beef" in " ".join(menu["description"]).lower():
crispy_beefs += [(info["label"], date)]

if len(crispy_beefs) == 0:
sys.exit()

subject = f"Crispy Beef on {' and '.join(c[0] for c in crispy_beefs)}"

Expand Down

0 comments on commit 9907035

Please sign in to comment.