Skip to main content

Get Content Download Settings

Retrieves the content download settings for the community. This function allows users to fetch information about which types of content can be downloaded and their respective settings.

Steps to get content download settings

  1. Call getContentDownloadSettings() function using the instance of LMChatClient.
  2. Process the response LMResponse<GetContentDownloadSettingsResponse> as per your requirement.
LMChatClient.shared.getContentDownloadSettings { response in
// response (LMResponse<GetContentDownloadSettingsResponse>)
if let data = response.data {
// your function to process the response data
processContentDownloadSettings(data.settings)
} else if let error = response.error {
// your function to process error
handleError(error)
}
}

Models

GetContentDownloadSettingsResponse

VARIABLETYPEDESCRIPTIONOPTIONAL
settings[ContentDownloadSetting]Array of content download settings✔️

ContentDownloadSetting

VARIABLETYPEDESCRIPTIONOPTIONAL
communityIdIntID of the community
downloadSettingTypeStringType of content for which the setting applies
downloadSettingTitleStringTitle or description of the download setting
enabledBoolWhether downloading is enabled for this content type