Get Configurations
Retrieve the specific configuration settings tailored for our community by utilizing the designated API. This process ensures you access the customized parameters essential for our community's unique requirements.
Steps to fetch configuration
- Call
getConfig()
function using the instance ofLMChatClient
. - Process the response LMResponse<ConfigResponse> as per your requirement.
LMChatClient.shared.getConfig() { response in
// response (LMResponse<ConfigResponse>)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}
Models
ConfigResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
access | Bool | Indicates if access is granted | ✔️ |
enableAudio | Bool | Indicates if audio is enabled | ✔️ |
enableGifs | Bool | Indicates if GIFs are enabled | ✔️ |
enableVoiceNote | Bool | Indicates if voice notes are enabled | ✔️ |
enableMicroPolls | Bool | Indicates if micro polls are enabled | ✔️ |