Skip to main content

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

  1. Call the getCommunityConfigurations() function using the instance of LMChatClient.
  2. 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.

VARIABLETYPEDESCRIPTIONOPTIONAL
configurations[Configuration]List of configuration objects for the community

Configuration

Represents a single configuration entry for the community.

VARIABLETYPEDESCRIPTIONOPTIONAL
typeConfigurationTypeThe type/category of the configuration
descriptionStringDescription 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.