You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.3 KiB
2.3 KiB
harbor-bot
Pickleball court reservation bot for Harbor Isles Tennis & Fitness Club.
Setup
-
Install dependencies:
pip install -r requirements.txt -
Configure
config.jsonwith your settings (see Configuration section below).
Usage
# Show configuration and next trigger times
python harbor_bot.py --show-config
# Test login
python harbor_bot.py --test-login
# Run scheduler (dry run - shows what would happen)
python harbor_bot.py --run
# Run scheduler (live - actually makes reservations)
python harbor_bot.py --run --live
# Test booking a specific court (dry run)
python harbor_bot.py --test-book Court_1 Saleh 2026-01-19 "19:00:00-08:00"
# Test booking a specific court (live)
python harbor_bot.py --test-book Court_1 Saleh 2026-01-19 "19:00:00-08:00" --live
Configuration
The config.json file contains:
API Settings
BaseAPIUrl: API endpoint URLCompanyId: Club company IDClubId: Club IDAppointmentItemId: Item ID for pickleball reservations
Login
Username: Your login usernamePassword: Your password (stored as-is, e.g., "Goliath00!!@")
Accounts
List of accounts that can be used for reservations:
{"Name": "ToniB", "Id": 6964}
Courts
List of available courts:
{
"Court": "Court_1",
"Id": 1,
"Name": "Pickleball Court - 1",
"ResourceTypeId": 2,
"AssignedResourceId": 130,
"IsAssignedResourceSelectable": true
}
Reservation Behaviors
Defines how reservations are attempted:
{
"Name": "Weekday_Reservation_Type",
"DaysInAdvance": 7,
"AttemptSchedule": [
{"Time": "04:29:00-08:00", "Attempts": 2, "DelaySeconds": 10},
{"Time": "04:30:00-08:00", "Attempts": 10, "DelaySeconds": 10}
]
}
Reservations
Scheduled reservation configurations:
{
"Day": "Wednesday",
"Time": "19:00:00-08:00",
"ReservationBehavior": "Weekday_Reservation_Type",
"Courts": [
{"Court": "Court_1", "Account": "Saleh"},
{"Court": "Court_2", "Account": "ToniB"}
]
}
Files
config.json- Main configurationtoken_data.json- Stored authentication token (auto-generated)reservation_success.json- Tracks successful reservations (auto-generated)
Token Management
- Tokens are automatically saved and reused
- Token refresh occurs when:
- Token is expired
- Token is older than 3 days