You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
wa_api_key = os.environ.get("API_KEY")#Gets the API key from the environment variables
access_token = get_access_token(wa_api_key)#Gets the access token from the WA API
group_id = 749571
#if today is monday timescale = weekly
#if today is logic for monthly timescale = timescale = monthly
#if both conditions are met, combine?
current_datetime = datetime.now(timezone.utc)
start_datetime = current_datetime + timedelta(days=2, hours = 7) #By default the script runs at 5:30pm CST on fridays, so I've offset it to pick up any events starting on Monday morning at 12:30 AM
end_datetime = start_datetime + timedelta(days=8) #sets the end date one week from the "offset datetime" to get a full week of events, it should run through the following Monday's events.
timescale_info = start_datetime.strftime("%m/%d/%Y") +" through "+ end_datetime.strftime("%m/%d/%Y")
email_subject = f"RMM Events from {timescale_info}"