-
I see the example for doing so in the CLI but can't seem to find anything for doing it in a script. If not it would be a fantastic addition. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
juftin
Jun 27, 2021
Replies: 1 comment
-
Yep, absolutely. Below is an example of that in action, it returns an array of Recreation Area JSON objects. import logging
from typing import List
from camply.providers import RecreationDotGov
logging.basicConfig(format="%(asctime)s [%(levelname)8s]: %(message)s",
level=logging.INFO)
camp_finder = RecreationDotGov()
recreation_area_response: List[dict] = camp_finder.find_recreation_areas(search_string="Equestrian",
state="CA") And just in case you're interested, here's what it looks like to search for Campgrounds: import logging
from typing import List
from camply.providers import RecreationDotGov
logging.basicConfig(format="%(asctime)s [%(levelname)8s]: %(message)s",
level=logging.INFO)
camp_finder = RecreationDotGov()
campground_response: List[dict] = camp_finder.find_campgrounds(search_string="Equestrian",
rec_area_id=None) Thanks for the question, so glad to see people enjoying the tool. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
juftin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yep, absolutely. Below is an example of that in action, it returns an array of Recreation Area JSON objects.
And just in case you're interested, here's what it looks like to search for Campgrounds: