Skip to main content

Get Community Configuration

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 specific community configuration

  1. Create a GetCommunityConfigurationRequest object using GetCommunityConfigurationRequest.Builder class by passing all the required parameters.
  2. Call getCommunityConfiguration() function using the instance of LMFeedClient.
  3. Process the response LMResponse<GetCommunityConfigurationResponse> as per your requirement.
CoroutineScope(Dispatchers.IO).launch {
// object of GetCommunityConfigurationRequest
val getCommunityConfigurationRequest = GetCommunityConfigurationRequest.Builder()
.type(ConfigurationType.MEDIA_LIMITS) //type of configuration to be fetched
.build()
// get response (LMResponse<GetCommunityConfigurationResponse>)
val response = LMFeedClient.getInstance().getCommunityConfiguration(getCommunityConfigurationRequest)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

GetCommunityConfigurationRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
typeConfigurationTypeType of the configuration

GetCommunityConfigurationsResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
configurationConfigurationSpecific Community Configuration