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
- Create a GetCommunityConfigurationRequest object using
GetCommunityConfigurationRequest.Builder
class by passing all the required parameters. - Call
getCommunityConfiguration()
function using the instance ofLMFeedClient
. - 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
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
type | ConfigurationType | Type of the configuration |
GetCommunityConfigurationsResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
configuration | Configuration | Specific Community Configuration |