Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
:param documents:
:type documents:
list[~azure.cognitiveservices.language.textanalytics.models.MultiLanguageInput]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides`.
:return: SentimentBatchResult or ClientRawResponse if raw=true
:rtype:
~azure.cognitiveservices.language.textanalytics.models.SentimentBatchResult
or ~msrest.pipeline.ClientRawResponse
:raises:
:class:`ErrorResponseException`
"""
input = models.MultiLanguageBatchInput(documents=documents)
# Construct URL
url = '/v2.0/sentiment'
path_format_arguments = {
'AzureRegion': self._serialize.url("self.config.azure_region", self.config.azure_region, 'AzureRegions', skip_quote=True)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if custom_headers:
header_parameters.update(custom_headers)