From 38ffd3c7446f13b4c3ff307659f8c05f57241ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20D=C4=99bski?= Date: Wed, 17 Apr 2024 16:36:21 +0200 Subject: [PATCH] Fix method in agent-api v3.4/v3.5/v3.6 classes. --- changelog.md | 1 + docs/agent/web/api/v34.html | 6 +++--- docs/agent/web/api/v35.html | 6 +++--- docs/agent/web/api/v36.html | 6 +++--- livechat/agent/web/api/v34.py | 2 +- livechat/agent/web/api/v35.py | 2 +- livechat/agent/web/api/v36.py | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/changelog.md b/changelog.md index b6a7e2b..32d0679 100644 --- a/changelog.md +++ b/changelog.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. - Enabled instantiation for `CustomerRtmV36` within the 3.6 version of the Customer RTM API. - Adjusted the return types in `get_client` method across RTM and WEB clients. - Fixed an issue where messages in the WebSocket client were incorrectly shared across all instances. +- Fixed `upload_file` method in agent-api v3.4/v3.5/v3.6 classes. ## [0.3.8] - 2023-11-30 diff --git a/docs/agent/web/api/v34.html b/docs/agent/web/api/v34.html index faa8df8..f64559b 100644 --- a/docs/agent/web/api/v34.html +++ b/docs/agent/web/api/v34.html @@ -478,7 +478,7 @@

Module livechat.agent.web.api.v34

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, @@ -1555,7 +1555,7 @@

Classes

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, @@ -4388,7 +4388,7 @@

Returns

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) diff --git a/docs/agent/web/api/v35.html b/docs/agent/web/api/v35.html index eac725b..91c0049 100644 --- a/docs/agent/web/api/v35.html +++ b/docs/agent/web/api/v35.html @@ -478,7 +478,7 @@

Module livechat.agent.web.api.v35

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, @@ -1555,7 +1555,7 @@

Classes

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, @@ -4388,7 +4388,7 @@

Returns

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) diff --git a/docs/agent/web/api/v36.html b/docs/agent/web/api/v36.html index c7145f2..4218f1d 100644 --- a/docs/agent/web/api/v36.html +++ b/docs/agent/web/api/v36.html @@ -478,7 +478,7 @@

Module livechat.agent.web.api.v36

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, @@ -1543,7 +1543,7 @@

Classes

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, @@ -4341,7 +4341,7 @@

Returns

httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) diff --git a/livechat/agent/web/api/v34.py b/livechat/agent/web/api/v34.py index 9317b76..9c376ed 100644 --- a/livechat/agent/web/api/v34.py +++ b/livechat/agent/web/api/v34.py @@ -451,7 +451,7 @@ def upload_file(self, httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, diff --git a/livechat/agent/web/api/v35.py b/livechat/agent/web/api/v35.py index 60a2913..8e9366a 100644 --- a/livechat/agent/web/api/v35.py +++ b/livechat/agent/web/api/v35.py @@ -451,7 +451,7 @@ def upload_file(self, httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self, diff --git a/livechat/agent/web/api/v36.py b/livechat/agent/web/api/v36.py index 9d36868..544cdad 100644 --- a/livechat/agent/web/api/v36.py +++ b/livechat/agent/web/api/v36.py @@ -451,7 +451,7 @@ def upload_file(self, httpx.Response: The Response object from `httpx` library, which contains a server’s response to an HTTP request. ''' return self.session.post(f'{self.api_url}/upload_file', - file=file, + files=file, headers=headers) def send_rich_message_postback(self,