Skip to content

Is it possible to get the list of recreation areas in Python? #31

Answered by juftin
kurbans asked this question in Q&A
Discussion options

You must be logged in to vote

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 RecreationD…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by juftin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants