ReserveAmerica.com
Add support for reserveamerica.com
I've had my eye on reserveamerica.com for some time now. The issue with implementing it as a camply provider is they don't have a public facing RESTful API powering their site.
All current camply providers, like recreation.gov, use a RESTful API. So a campground like Cold Springs - Arapaho Roosevelt NF (CO)
has its own API endpoint that returns JSON: GET https://www.recreation.gov/api/media/public/asset/231856. Camply works by reverse engineering these APIs so we can search for campgrounds and ask about their availability.
reserveamaerica.com is a bit more high tech than most providers and doesn't surface an API and instead handles all of this on the backend to render HTML for the front end.
So a provider like ReserveAmerica could work with camply but it would require that camply scrapes the sites's HTML to get data instead of pinging their API. I'm not saying I won't ever implement this but it would require a bunch of work and a new approach for the tool.
There is an older API for Reserve America: Third Party API
But it doesn’t show availability information and I think is no longer supported/updated. Plus don’t think it provides what is desired.
@juftin there looks to be an API: https://api.reserveamerica.com/ and https://chub.api.reserveamerica.com/, but unsure its use or if available
@ctrl-brk , @thornto4 , and @mr1716 would you be interested in helping with PR #369 ?
I believe I've found information about the internal reserve america api. I've been able to make requests without captcha accessing the restful interface of api.reserveamerica.com and get JSON availability data back - similar to the smartphone app does. Code is just in the research preliminaries now but I'll look at what you have here as I have time and maybe integrate that.
@beege, how did you do that? Will you be posting your code somewhere as part of a project?
Not sure what I'll release yet. Might just be a simple POC. After further research I found that it does not work for everything on the reserveamerica website, but only for what the smartphone app supports. There are some (many?) campgrounds in the reserve america app that redirect you to use a browser on reserveamerica webpage instead (I think that's the "chub" API mentioned above). And the queries I get back for those are not useful - there's just a dummy placeholder. - I wonder if those perhaps still work with the ACTIVE API mentioned previously (https://developer.active.com/docs/read/Campsite_Search_API) - but I haven't checked. That API still (sort of) works but I gave up on that initially because it didn't support availability data for the state parks I was interested in. I made the assumption that it doesn't have any availability data anymore but that could be false since I wasn't checking "chub" campgrounds.
Anyway, lots of state parks work with the internal API I found. I'll probably make a short POC for a random state park and release that. I don't spend much time coding these days but I'll get to it soon.