@@ -2959,6 +2959,96 @@ def get_conversations_message(self, conversation_id, **kwargs):
29592959 callback = params .get ('callback' ))
29602960 return response
29612961
2962+ def get_conversations_message_communication_messages_media_media_id (self , conversation_id , communication_id , media_id , ** kwargs ):
2963+ """
2964+ Get media
2965+
2966+
2967+ This method makes a synchronous HTTP request by default. To make an
2968+ asynchronous HTTP request, please define a `callback` function
2969+ to be invoked when receiving the response.
2970+ >>> def callback_function(response):
2971+ >>> pprint(response)
2972+ >>>
2973+ >>> thread = api.get_conversations_message_communication_messages_media_media_id(conversation_id, communication_id, media_id, callback=callback_function)
2974+
2975+ :param callback function: The callback function
2976+ for asynchronous request. (optional)
2977+ :param str conversation_id: conversationId (required)
2978+ :param str communication_id: communicationId (required)
2979+ :param str media_id: mediaId (required)
2980+ :return: MessageMediaData
2981+ If the method is called asynchronously,
2982+ returns the request thread.
2983+ """
2984+
2985+ all_params = ['conversation_id' , 'communication_id' , 'media_id' ]
2986+ all_params .append ('callback' )
2987+
2988+ params = locals ()
2989+ for key , val in iteritems (params ['kwargs' ]):
2990+ if key not in all_params :
2991+ raise TypeError (
2992+ "Got an unexpected keyword argument '%s'"
2993+ " to method get_conversations_message_communication_messages_media_media_id" % key
2994+ )
2995+ params [key ] = val
2996+ del params ['kwargs' ]
2997+
2998+ # verify the required parameter 'conversation_id' is set
2999+ if ('conversation_id' not in params ) or (params ['conversation_id' ] is None ):
3000+ raise ValueError ("Missing the required parameter `conversation_id` when calling `get_conversations_message_communication_messages_media_media_id`" )
3001+ # verify the required parameter 'communication_id' is set
3002+ if ('communication_id' not in params ) or (params ['communication_id' ] is None ):
3003+ raise ValueError ("Missing the required parameter `communication_id` when calling `get_conversations_message_communication_messages_media_media_id`" )
3004+ # verify the required parameter 'media_id' is set
3005+ if ('media_id' not in params ) or (params ['media_id' ] is None ):
3006+ raise ValueError ("Missing the required parameter `media_id` when calling `get_conversations_message_communication_messages_media_media_id`" )
3007+
3008+
3009+ resource_path = '/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media/{mediaId}' .replace ('{format}' , 'json' )
3010+ path_params = {}
3011+ if 'conversation_id' in params :
3012+ path_params ['conversationId' ] = params ['conversation_id' ]
3013+ if 'communication_id' in params :
3014+ path_params ['communicationId' ] = params ['communication_id' ]
3015+ if 'media_id' in params :
3016+ path_params ['mediaId' ] = params ['media_id' ]
3017+
3018+ query_params = {}
3019+
3020+ header_params = {}
3021+
3022+ form_params = []
3023+ local_var_files = {}
3024+
3025+ body_params = None
3026+
3027+ # HTTP header `Accept`
3028+ header_params ['Accept' ] = self .api_client .\
3029+ select_header_accept (['application/json' ])
3030+ if not header_params ['Accept' ]:
3031+ del header_params ['Accept' ]
3032+
3033+ # HTTP header `Content-Type`
3034+ header_params ['Content-Type' ] = self .api_client .\
3035+ select_header_content_type (['application/json' ])
3036+
3037+ # Authentication setting
3038+ auth_settings = ['PureCloud Auth' ]
3039+
3040+ response = self .api_client .call_api (resource_path , 'GET' ,
3041+ path_params ,
3042+ query_params ,
3043+ header_params ,
3044+ body = body_params ,
3045+ post_params = form_params ,
3046+ files = local_var_files ,
3047+ response_type = 'MessageMediaData' ,
3048+ auth_settings = auth_settings ,
3049+ callback = params .get ('callback' ))
3050+ return response
3051+
29623052 def get_conversations_message_message (self , conversation_id , message_id , ** kwargs ):
29633053 """
29643054 Get message
@@ -7810,6 +7900,90 @@ def post_conversations_message_communication_messages(self, conversation_id, com
78107900 callback = params .get ('callback' ))
78117901 return response
78127902
7903+ def post_conversations_message_communication_messages_media (self , conversation_id , communication_id , ** kwargs ):
7904+ """
7905+ Create media
7906+
7907+
7908+ This method makes a synchronous HTTP request by default. To make an
7909+ asynchronous HTTP request, please define a `callback` function
7910+ to be invoked when receiving the response.
7911+ >>> def callback_function(response):
7912+ >>> pprint(response)
7913+ >>>
7914+ >>> thread = api.post_conversations_message_communication_messages_media(conversation_id, communication_id, callback=callback_function)
7915+
7916+ :param callback function: The callback function
7917+ for asynchronous request. (optional)
7918+ :param str conversation_id: conversationId (required)
7919+ :param str communication_id: communicationId (required)
7920+ :return: MessageMediaData
7921+ If the method is called asynchronously,
7922+ returns the request thread.
7923+ """
7924+
7925+ all_params = ['conversation_id' , 'communication_id' ]
7926+ all_params .append ('callback' )
7927+
7928+ params = locals ()
7929+ for key , val in iteritems (params ['kwargs' ]):
7930+ if key not in all_params :
7931+ raise TypeError (
7932+ "Got an unexpected keyword argument '%s'"
7933+ " to method post_conversations_message_communication_messages_media" % key
7934+ )
7935+ params [key ] = val
7936+ del params ['kwargs' ]
7937+
7938+ # verify the required parameter 'conversation_id' is set
7939+ if ('conversation_id' not in params ) or (params ['conversation_id' ] is None ):
7940+ raise ValueError ("Missing the required parameter `conversation_id` when calling `post_conversations_message_communication_messages_media`" )
7941+ # verify the required parameter 'communication_id' is set
7942+ if ('communication_id' not in params ) or (params ['communication_id' ] is None ):
7943+ raise ValueError ("Missing the required parameter `communication_id` when calling `post_conversations_message_communication_messages_media`" )
7944+
7945+
7946+ resource_path = '/api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media' .replace ('{format}' , 'json' )
7947+ path_params = {}
7948+ if 'conversation_id' in params :
7949+ path_params ['conversationId' ] = params ['conversation_id' ]
7950+ if 'communication_id' in params :
7951+ path_params ['communicationId' ] = params ['communication_id' ]
7952+
7953+ query_params = {}
7954+
7955+ header_params = {}
7956+
7957+ form_params = []
7958+ local_var_files = {}
7959+
7960+ body_params = None
7961+
7962+ # HTTP header `Accept`
7963+ header_params ['Accept' ] = self .api_client .\
7964+ select_header_accept (['application/json' ])
7965+ if not header_params ['Accept' ]:
7966+ del header_params ['Accept' ]
7967+
7968+ # HTTP header `Content-Type`
7969+ header_params ['Content-Type' ] = self .api_client .\
7970+ select_header_content_type (['application/json' ])
7971+
7972+ # Authentication setting
7973+ auth_settings = ['PureCloud Auth' ]
7974+
7975+ response = self .api_client .call_api (resource_path , 'POST' ,
7976+ path_params ,
7977+ query_params ,
7978+ header_params ,
7979+ body = body_params ,
7980+ post_params = form_params ,
7981+ files = local_var_files ,
7982+ response_type = 'MessageMediaData' ,
7983+ auth_settings = auth_settings ,
7984+ callback = params .get ('callback' ))
7985+ return response
7986+
78137987 def post_conversations_message_messages_bulk (self , conversation_id , ** kwargs ):
78147988 """
78157989 Get messages in batch
0 commit comments