This page contains demo content for testing and showcasing various documentation components. It’s hidden from navigation but can be linked to from examples.
The PlantClient class is the main entry point for interacting with the Plant Store API. It handles authentication, request management, and provides access to all API endpoints.
Constructor parameters:
apiKey (string, required): Your API authentication keybaseUrl (string, optional): Custom API base URL for testingtimeout (number, optional): Request timeout in millisecondsExample usage:
Configuration object for customizing the Plant Store SDK behavior.
Properties:
retryAttempts (number): Number of retry attempts for failed requestscacheEnabled (boolean): Enable response cachinglogLevel (string): Logging verbosity levelCreates a new plant entry in the database.
Parameters:
name (string, required): Common name of the plantspecies (string, required): Scientific species namedescription (string, optional): Plant descriptioncareLevel (string, optional): Care difficulty levelReturns: Promise resolving to the created plant object
Example:
Python method for creating a new plant entry.
Signature:
Retrieves a list of plants from the API with optional filtering.
Parameters:
filters (object, optional): Filter criterialimit (number, optional): Maximum number of resultsoffset (number, optional): Pagination offsetReturns: Promise resolving to an array of plant objects
The PlantStore class manages plant data storage and retrieval operations.
Constructor parameters:
apiKey (string, required): Your API authentication keyconfig (PlantConfig, optional): Configuration optionsThe PlantClient class provides a client interface for interacting with PlantStore.
Constructor parameters:
store (PlantStore, required): PlantStore instance to useResponse object returned from plant-related API calls.
Properties:
plants (Array): List of plant objectstotal (number): Total count of plantshasMore (boolean): Whether more results are availableCommon retrieval methods for accessing plant store resources.