Package glair.vision.api
Class Config
java.lang.Object
glair.vision.api.Config
The Config class provides configuration settings for the Glair Vision API.
-
Constructor Summary
ConstructorsConstructorDescriptionConfig(VisionSettings config) Constructs a Config instance based on the provided VisionSettings. -
Method Summary
Modifier and TypeMethodDescriptionGets the API key associated with the configuration.Gets the Basic Authentication string for HTTP requests.Gets a reference to the current Config instance.getConfig(VisionSettings newConfig) Gets a new Config instance with updated settings based on the provided VisionSettings.Gets the VisionSettings associated with the configuration.Constructs a full URL by combining the base URL and the given path.toString()Returns a JSON representation of the configuration.
-
Constructor Details
-
Config
Constructs a Config instance based on the provided VisionSettings.- Parameters:
config- The VisionSettings to initialize the configuration.
-
-
Method Details
-
getApiKey
Gets the API key associated with the configuration.- Returns:
- The API key.
-
getUrl
Constructs a full URL by combining the base URL and the given path.- Parameters:
path- The path to append to the base URL.- Returns:
- The full URL.
-
getBasicAuth
Gets the Basic Authentication string for HTTP requests.- Returns:
- The Basic Authentication string.
-
getConfig
Gets a reference to the current Config instance.- Returns:
- The Config instance.
-
getConfig
Gets a new Config instance with updated settings based on the provided VisionSettings.- Parameters:
newConfig- The VisionSettings with updated settings.- Returns:
- A new Config instance with the updated settings.
-
getSettings
Gets the VisionSettings associated with the configuration.- Returns:
- The VisionSettings.
-
toString
Returns a JSON representation of the configuration.
-