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 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.
// object of GetCommunityConfigurationRequest
let request = GetCommunityConfigurationRequest.builder()
.configurationTypes([configurationTypes]) // Types of Configuration you want to fetch
.build()
LMFeedClient.shared.getCommunityConfiguration(request) { [weak self] result in
// get response (LMResponse<GetCommunityConfigurationResponse>)
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 |
---|---|---|---|
configurationTypes | String[] | Types of Configuration |
GetCommunityConfigurationResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
communityConfigurations | CommunityConfiguration[] | List of Community Configurations |
CommunityConfiguration
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
type | String | Name of Configuration | |
description | String | Description of Configuration | |
value | JSON | Preset Values in Configuration |