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.
 
 
Go to file
Ibraheem Saleh ddb62696fd harbor booking base implementation 8 months ago
.gitignore Initial commit 8 months ago
HarborIslesAPIs.txt harbor booking base implementation 8 months ago
README.md harbor booking base implementation 8 months ago
config.json harbor booking base implementation 8 months ago
harbor_bot.py harbor booking base implementation 8 months ago
prompts.txt harbor booking base implementation 8 months ago
requirements.txt harbor booking base implementation 8 months ago

README.md

harbor-bot

Pickleball court reservation bot for Harbor Isles Tennis & Fitness Club.

Setup

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Configure config.json with 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 URL
  • CompanyId: Club company ID
  • ClubId: Club ID
  • AppointmentItemId: Item ID for pickleball reservations

Login

  • Username: Your login username
  • Password: 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 configuration
  • token_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