Package com.mindsdb.client
Class Client
java.lang.Object
com.mindsdb.client.Client
The
Client class provides an interface for interacting with the Minds and Datasources services.
It manages the creation and lifecycle of the RestClient, MindsService,
and DatasourcesService instances.
This class is designed to facilitate communication with an API using the specified API key and optional base URL.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mindsService
-
datasourcesService
-
-
Constructor Details
-
Client
Constructs a newClientwith the specified API key. This will create a defaultRestClientinstance using the provided API key.The
MindsServiceandDatasourcesServicewill be initialized using the createdRestClient.- Parameters:
apiKey- the API key used for authentication
-
Client
Constructs a newClientwith the specified API key and base URL. This allows for communication with an API located at a custom base URL.The
MindsServiceandDatasourcesServicewill be initialized using the createdRestClient.- Parameters:
apiKey- the API key used for authenticationbaseUrl- the base URL of the API
-
-
Method Details
-
shutDownConnection
public void shutDownConnection()Shuts down the connection managed by theRestClient. This method should be called when the client is no longer needed to release resources associated with the connection.
-