Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start and End Date Windows do not behave as expected #351

Open
boydthomson opened this issue Jun 23, 2024 · 1 comment
Open

Start and End Date Windows do not behave as expected #351

boydthomson opened this issue Jun 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working triage This will looked at

Comments

@boydthomson
Copy link

When searching for availability within a range of dates, zero results are returned unless start and end dates are for the specific dates available.

Example: camply --debug --provider goingtocamp campsites --rec-area 12 --start-date 2024-07-17 --end-date 2024-08-20 --campground -2147483534 --equipment 0 tent --nights 2
returns:
[2024-06-23 17:37:49] DEBUG https://camping.bcparks.ca:443 "GET
/api/availability/map?mapId=-2147483405&resourceLocationId=-2147483534&bookingCategoryId=0&startDate=2024-07-17&endDate=2024
-08-20&isReserving=True&getDailyAvailability=False&partySize=1&numEquipment=1&equipmentCategoryId=-32768 HTTP/1.1" 200 2664
[2024-06-23 17:37:49] INFO ❌ ❌ ❌ ❌ 0 Reservable Campsites Matching Search Preferences

However:
camply --debug --provider goingtocamp campsites --rec-area 12 --start-date 2024-07-17 --end-date 2024-07-20 --campground -2147483534 --equipment 0 tent --nights 2

will return:
[2024-06-23 17:47:49] DEBUG https://camping.bcparks.ca:443 "GET
/api/availability/map?mapId=-2147483405&resourceLocationId=-2147483534&bookingCategoryId=0&startDate=2024-07-17&endDate=2024
-07-20&isReserving=True&getDailyAvailability=False&partySize=1&numEquipment=1&equipmentCategoryId=-32768 HTTP/1.1" 200 2664
[2024-06-23 17:47:49] DEBUG https://camping.bcparks.ca:443 "GET /api/attribute/filterable HTTP/1.1" 200 46622
[2024-06-23 17:47:49] DEBUG https://camping.bcparks.ca:443 "GET /api/resource/details?resourceId=-2147475362 HTTP/1.1" 200 1347
[2024-06-23 17:47:49] INFO ⛺️ ⛺️ ⛺️ ⛺️ 1 Reservable Campsites Matching Search Preferences
[2024-06-23 17:47:49] INFO 📅 Wed, July 17 🏕 1 sites
[2024-06-23 17:47:49] INFO ⛰️ BC Parks 🏕 Skagit Valley Provincial Park: ⛺ 1 sites
[2024-06-23 17:47:49] INFO 🔗
https://camping.bcparks.ca/create-booking/results?mapId=-2147483405&bookingCategoryId=0&startDate=2024-07-17&endDate=2024-07
-20&isReserving=true&equipmentId=-32768&subEquipmentId=&partySize=1&resourceLocationId=-2147483534 (3 nights)

So do I need to write something to loop through dates in order to find any 3-night window within my desired dates?

camply --debug campsites \
    --campground 232338 \
    --start-date 2023-09-09 \
    --end-date 2023-09-32 \
    --nights 3

Additional context

< Add any other context about the problem here. >

@boydthomson boydthomson added the bug Something isn't working label Jun 23, 2024
@github-actions github-actions bot added the triage This will looked at label Jun 23, 2024
@juftin
Copy link
Owner

juftin commented Jun 24, 2024

😞 GoingToCamp has been experiencing some major issues lately - I believe their API responses are changing and the provider probably needs a full re-write. I'll dig into this and post any further updates here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This will looked at
Projects
None yet
Development

No branches or pull requests

2 participants