Skip to content

PhotoCountRetriever

CorylC edited this page May 14, 2024 · 1 revision

PhotoCountRetriever Class Documentation

Overview

The PhotoCountRetriever class in the openmindat package is designed for querying photocount by class.

Usage

Create an instance of the PhotoCountRetriever class and use its methods to retrieve data.

Example

from openmindat import PhotoCountRetriever

pcr = PhotoCountRetriever()
photos = pcr.get_dict()

Methods

page_size(PAGE_SIZE)

Determines how many results will be read per page.

  • PAGE_SIZE (int): the amount of results per page
  • Returns: self

saveto(OUTDIR, FILE_NAME)

Executes the query and saves the results to a specified directory.

  • OUTDIR (str): Directory path.
  • FILE_NAME (str): file name.
  • Returns: None

save(FILE_NAME)

Executes the query and saves the results to the current directory.

  • FILE_NAME (str): file name
  • Returns: None

get_dict()

Executes the query and saves the results to an object.

  • Returns: Dictionary

Additional Information

For more details, please refer to the Mindat API documentation.

Back to Top