Get Community Configurations
Fetches the configuration settings for the current community, such as media limits, feed metadata, profile settings, and other customizable parameters. The response includes a list of configuration objects, each describing a specific configuration type and its value.
Steps to get community configurations
- Call the
getCommunityConfigurations()
function using the instance ofLMChatClient
. - Process the response
LMResponse<GetCommunityConfigurationsResponse>
to handle the configurations or any errors.
// Fetch community configurations using LMChatClient
LMChatClient.shared.getCommunityConfigurations { response in
if response.success, let configResponse = response.data {
for config in configResponse.configurations {
print("Type: \(config.type.rawValue), Description: \(config.description)")
print("Value: \(config.value)")
}
} else {
print("Error fetching configurations: \(response.errorMessage ?? "Unknown error")")
}
}
Models
GetCommunityConfigurationsResponse
Represents the response model containing a list of community configurations.
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
configurations | [Configuration] | List of configuration objects for the community |
Configuration
Represents a single configuration entry for the community.
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
type | ConfigurationType | The type/category of the configuration | |
description | String | Description of the configuration | |
value | [String: Any] | The value/details of the configuration |
ConfigurationType
Represents the type/category of a configuration. Some possible values:
media_limits
feed_metadata
profile_metadata
nsfw_filtering
widgets_metadata
guest_flow_metadata
reply_privately
feed_settings
personalised_feed_weights
chatbot
chat_poll
app_views
See the SDK for the full list and details.