environment
🌐 Environment Configuration Class
The Environment class manages global configurations across the app, making it easy to adjust settings like Environment variables, API keys, and more. Here's a breakdown of its functionality:
🛠️ Core Properties
_env: Stores the current Environment (pre-alpha,alpha,release)._serverEndpoint: Holds the server endpoint URL._lastSelectedNavButton: Tracks the index of the last selected navigation button._chatGPTAPIKey: Stores the API key for ChatGPT integration._googleNlpAPIKey: Holds the API key for Google NLP services.
🔄 Methods Overview
-
🌍 Environment Management
updateEnvironment(String newEnv): Updates the current Environment.getEnvironment(): Retrieves the current Environment.isRelease(): Checks if the Environment is set torelease.
-
🔑 API Key Handling
updateChatGPTAPIKey(String newKey): Updates the ChatGPT API key.getChatGPTAPIKey(): Retrieves the current ChatGPT API key.updateGoogleNlpAPIKey(String newKey): Updates the Google NLP API key.getGoogleNlpAPIKey(): Retrieves the current Google NLP API key.
-
🔗 Server Endpoint
updateServerEndpoint(String newServerEndpoint): Sets the server endpoint URL.getServerEndpoint(): Retrieves the current server endpoint.
-
🔘 Navigation
setLastSelectedNavButton(int index): Records the last selected navigation button index.getLastSelectedNavButton(): Retrieves the last selected navigation button index.
This summary should make the Environment class more approachable and informative for other developers in your markdown document!