2026-02-08 13:09:36 +01:00
from datetime import datetime
2025-08-02 22:37:17 +02:00
AUTH_BASE_URL = " https://auth.anny.eu "
ANNY_BASE_URL = " https://anny.eu "
BOOKING_API_BASE = " https://b.anny.eu/api/v1 "
CHECKOUT_FORM_API = " https://b.anny.eu/api/ui/checkout-form "
RESOURCE_URL = f " { BOOKING_API_BASE } /resources/1-lehrbuchsammlung-eg-und-1-og/children "
2026-02-02 13:21:04 +01:00
SERVICE_ID = " 601 "
2026-02-05 15:22:52 +01:00
2026-02-05 15:18:19 +01:00
# RESOURCE_ID = None # "5957" # Will be set dynamically if None, else use the given ID
# INFO: resource ID is seat
# RESOURCE_ID =15994 # 91 height adjustable desk
# RESOURCE_ID =16402 # 222 study room
2026-02-05 15:22:52 +01:00
# RESOURCE_ID =15883 #66 second best
2026-02-07 13:50:59 +01:00
# RESOURCE_ID = 15502 # 17 cool snipe with view
# RESOURCE_IDS = [15502, 15883, 16402]
# RESOURCE_ID = None
RESOURCE_IDS = [ 15883 , 15502 , 15880 , 15505 , 15892 ]
2026-02-05 15:22:52 +01:00
2026-02-08 13:09:36 +01:00
# tum only:
# last: "booking_quota_grant_id":"24735199",
# -> every THURSDAY IT HAS TO BE +3 cuz reservation is for monday (changes to +3 of last)
INITIAL_BOOKING_QUOTA_GRANT_ID = 24735199
initial_date = datetime ( 2026 , 1 , 28 )
current_date = datetime . now ( )
days_passed = ( current_date - initial_date ) . days
weeks_passed = days_passed / / 7
BOOKING_QUOTA_GRANT_ID = INITIAL_BOOKING_QUOTA_GRANT_ID + 3 * weeks_passed
print ( BOOKING_QUOTA_GRANT_ID )
2026-01-22 16:17:05 +01:00
TIMEZONE = " Europe/Berlin "
2026-02-02 13:21:04 +01:00
# SSO_PROVIDER = "kit" # Available: kit (add more in auth/providers/)
SSO_PROVIDER = " tum " # Available: kit (add more in auth/providers/)
2025-08-02 22:37:17 +02:00
DEFAULT_HEADERS = {
2026-02-06 17:42:40 +01:00
" user-agent " : " Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 " ,
" accept " : " application/vnd.api+json " ,
" accept-encoding " : " plain " ,
2026-01-30 18:28:49 +01:00
}
# Booking time slots (in order of priority)
2026-02-05 15:20:59 +01:00
# INFO: BOOKING RULES
# Booking quota: 40 hours per week.
# Each booking reduces the quota by the number of hours reserved.
# The quota resets every Monday at midnight. Unused hours do not carry over to the following week.
# EXPIRY: After 30 minutes, if you do not show up or fail to check in. -> i think doesnt matter cuz i can check in and leave without checkingout lol
# Check-in must be completed within 30 minutes after the start time of your reservation; otherwise, the resource will automatically become available for booking again in the reservation system.
# +- this means i can snipe unused spots daily
# best booking time:
# 1. 12-22 -> why? -> because at 22 there will be free seats fs AND at 12 i will be awake for sure maybe 13 would be even better.
# i have only 40/7=5.7 per day SO -> 12-17:30 is best?
2026-01-30 18:28:49 +01:00
BOOKING_TIMES = [
2026-02-05 15:20:59 +01:00
# SNIPE
2026-02-06 17:42:40 +01:00
# {
# 'start': '13:00:00',
# 'end': '18:00:00'
# },
2026-02-05 15:20:59 +01:00
# BEST
2026-02-06 17:42:40 +01:00
# {
# 'start': '12:00:00',
# 'end': '22:00:00'
# },
2026-02-05 15:20:59 +01:00
# OPTIMAL
# 40/7=5.7
2026-02-06 17:42:40 +01:00
{ " start " : " 12:00:00 " , " end " : " 17:30:00 " } ,
2026-02-05 01:32:36 +01:00
# {
# 'start': '12:00:00',
# 'end': '22:00:00'
# },
2026-02-02 13:21:04 +01:00
# {
# 'start': '22:30:00',
# 'end': '23:30:00'
# },
# {
# 'start': '09:00:00',
# 'end': '13:00:00'
# },
# {
# 'start': '20:00:00',
# 'end': '23:45:00'
# },
2026-02-06 17:42:40 +01:00
]