-
Notifications
You must be signed in to change notification settings - Fork 2
GeoRegionRetriever
CorylC edited this page May 2, 2024
·
2 revisions
The GeoRegionRetriever
class in the openmindat
package is designed to facilitate the retrieval of locality geoRegion data from the Mindat API.
Create an instance of the GeoRegionRetriever
class and use its methods to retrieve data.
from openmindat import GeoRegionRetriever
Grr = GeoRegionRetriever()
Grr.page(3).saveto("/path/to/directory", "geoReg_page3")
Sets the page number for paginated results.
-
Parameters:
-
PAGE (int)
: The page number.
-
-
Example Usage:
grr.page(2)
Sets the number of results per page.
-
Parameters:
-
PAGE_SIZE (int)
: The number of results per page.
-
-
Example Usage:
grr.page_size(50)
Executes the query and saves the results to a specified directory.
-
OUTDIR
(str): Directory path. -
FILE_NAME
(str): file name. - Returns: None
Executes the query and saves the results to the current directory.
-
FILE_NAME
(str): file name - Returns: None
Executes the query and saves the results to an object.
- Returns: Dictionary
For more details, please refer to the Mindat API documentation.