How to use the azure-cognitiveservices-search-imagesearch.azure.cognitiveservices.search.imagesearch.models function in azure-cognitiveservices-search-imagesearch

To help you get started, we’ve selected a few azure-cognitiveservices-search-imagesearch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-cognitiveservices-search-imagesearch / azure / cognitiveservices / search / imagesearch / operations / images_operations.py View on Github external
header_parameters['Accept-Language'] = self._serialize.header("accept_language", accept_language, 'str')
        if user_agent is not None:
            header_parameters['User-Agent'] = self._serialize.header("user_agent", user_agent, 'str')
        if client_id is not None:
            header_parameters['X-MSEdge-ClientID'] = self._serialize.header("client_id", client_id, 'str')
        if client_ip is not None:
            header_parameters['X-MSEdge-ClientIP'] = self._serialize.header("client_ip", client_ip, 'str')
        if location is not None:
            header_parameters['X-Search-Location'] = self._serialize.header("location", location, 'str')

        # Construct and send request
        request = self._client.get(url, query_parameters)
        response = self._client.send(request, header_parameters, stream=False, **operation_config)

        if response.status_code not in [200]:
            raise models.ErrorResponseException(self._deserialize, response)

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('Images', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized
    search.metadata = {'url': '/images/search'}
github Azure / azure-sdk-for-python / azure-cognitiveservices-search-imagesearch / azure / cognitiveservices / search / imagesearch / operations / images_operations.py View on Github external
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        if user_agent is not None:
            header_parameters['User-Agent'] = self._serialize.header("user_agent", user_agent, 'str')
        if client_id is not None:
            header_parameters['X-MSEdge-ClientID'] = self._serialize.header("client_id", client_id, 'str')
        if client_ip is not None:
            header_parameters['X-MSEdge-ClientIP'] = self._serialize.header("client_ip", client_ip, 'str')
        if location is not None:
            header_parameters['X-Search-Location'] = self._serialize.header("location", location, 'str')

        # Construct and send request
        request = self._client.get(url, query_parameters)
        response = self._client.send(request, header_parameters, stream=False, **operation_config)

        if response.status_code not in [200]:
            raise models.ErrorResponseException(self._deserialize, response)

        deserialized = None

        if response.status_code == 200:
            deserialized = self._deserialize('ImageInsights', response)

        if raw:
            client_raw_response = ClientRawResponse(deserialized, response)
            return client_raw_response

        return deserialized
    details.metadata = {'url': '/images/details'}

azure-cognitiveservices-search-imagesearch

Microsoft Azure Cognitive Services Image Search Client Library for Python

MIT
Latest version published 5 months ago

Package Health Score

78 / 100
Full package analysis

Popular azure-cognitiveservices-search-imagesearch functions