From ea8f2633fb01ba1616e210e04105eb5d7949ce48 Mon Sep 17 00:00:00 2001 From: skamieniarz Date: Wed, 16 Feb 2022 09:17:39 +0100 Subject: [PATCH 1/3] Add 0.2.1 entry to changelog --- changelog.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 2f0fafc..eb93204 100644 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,12 @@ # Change Log All notable changes to this project will be documented in this file. +## [0.2.1] - 2022-02-16 -## [0.2.0] - 2021-01-31 +### Changed +- Handling of configuration file. + +## [0.2.0] - 2022-01-31 ### Added - API stable version 3.4 as a default. From a53acff52cab6c5030c1ef1c5ace9be1f24e71b0 Mon Sep 17 00:00:00 2001 From: skamieniarz Date: Wed, 16 Feb 2022 09:17:52 +0100 Subject: [PATCH 2/3] Bump version in setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index b6ce2ab..de223d8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = lc-sdk-python -version = 0.2.0 +version = 0.2.1 description = Package which lets to work with LiveChat API. long_description = file: README.md long_description_content_type = text/markdown From 59442630bcc041ec4d966c7aff5eed21820cbff9 Mon Sep 17 00:00:00 2001 From: skamieniarz Date: Wed, 16 Feb 2022 09:23:31 +0100 Subject: [PATCH 3/3] Update docs --- docs/agent_rtm.html | 80 ++++++++++++++++++++++++++----------- docs/agent_web.html | 8 ++-- docs/configuration_api.html | 8 ++-- docs/customer_rtm.html | 8 ++-- docs/customer_web.html | 8 ++-- docs/reports_api.html | 8 ++-- 6 files changed, 72 insertions(+), 48 deletions(-) diff --git a/docs/agent_rtm.html b/docs/agent_rtm.html index 519f75b..0353121 100755 --- a/docs/agent_rtm.html +++ b/docs/agent_rtm.html @@ -34,16 +34,14 @@

Module livechat.agent.rtm.client

import typing from abc import ABCMeta -from configparser import ConfigParser +from livechat.config import CONFIG from livechat.utils.helpers import prepare_payload from livechat.utils.structures import RtmResponse from livechat.utils.ws_client import WebsocketClient -config = ConfigParser() -config.read('configs/main.ini') -stable_version = config.get('api', 'stable') -api_url = config.get('api', 'url') +stable_version = CONFIG.get('stable') +api_url = CONFIG.get('url') class AgentRTM: @@ -273,7 +271,9 @@

Module livechat.agent.rtm.client

payload = prepare_payload(locals()) return self.ws.send({'action': 'follow_chat', 'payload': payload}) - def unfollow_chat(self, id: str = None, payload: dict = None) -> RtmResponse: + def unfollow_chat(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Removes the requester from the chat followers. Args: @@ -630,7 +630,9 @@

Module livechat.agent.rtm.client

# Customers - def get_customer(self, id: str = None, payload: dict = None) -> RtmResponse: + def get_customer(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Returns the info about the Customer with a given ID. Args: @@ -747,7 +749,9 @@

Module livechat.agent.rtm.client

payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, id: str = None, payload: dict = None) -> RtmResponse: + def follow_customer(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Marks a customer as followed. Args: @@ -763,7 +767,9 @@

Module livechat.agent.rtm.client

payload = prepare_payload(locals()) return self.ws.send({'action': 'follow_customer', 'payload': payload}) - def unfollow_customer(self, id: str = None, payload: dict = None) -> RtmResponse: + def unfollow_customer(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Removes the agent from the list of customer's followers. Args: @@ -871,7 +877,9 @@

Module livechat.agent.rtm.client

'payload': payload }) - def set_away_status(self, away: bool = None, payload: dict = None) -> RtmResponse: + def set_away_status(self, + away: bool = None, + payload: dict = None) -> RtmResponse: ''' Sets an Agent's connection to the away state. Args: @@ -1024,7 +1032,9 @@

Module livechat.agent.rtm.client

# Chats - def deactivate_chat(self, id: str = None, payload: dict = None) -> RtmResponse: + def deactivate_chat(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Deactivates a chat by closing the currently open thread. Args: @@ -1316,7 +1326,9 @@

Raises

# Chats - def deactivate_chat(self, id: str = None, payload: dict = None) -> RtmResponse: + def deactivate_chat(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Deactivates a chat by closing the currently open thread. Args: @@ -1572,7 +1584,9 @@

Returns

Expand source code -
def deactivate_chat(self, id: str = None, payload: dict = None) -> RtmResponse:
+
def deactivate_chat(self,
+                    id: str = None,
+                    payload: dict = None) -> RtmResponse:
     ''' Deactivates a chat by closing the currently open thread.
 
         Args:
@@ -2236,7 +2250,9 @@ 

Inherited members

payload = prepare_payload(locals()) return self.ws.send({'action': 'follow_chat', 'payload': payload}) - def unfollow_chat(self, id: str = None, payload: dict = None) -> RtmResponse: + def unfollow_chat(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Removes the requester from the chat followers. Args: @@ -2593,7 +2609,9 @@

Inherited members

# Customers - def get_customer(self, id: str = None, payload: dict = None) -> RtmResponse: + def get_customer(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Returns the info about the Customer with a given ID. Args: @@ -2710,7 +2728,9 @@

Inherited members

payload = prepare_payload(locals()) return self.ws.send({'action': 'ban_customer', 'payload': payload}) - def follow_customer(self, id: str = None, payload: dict = None) -> RtmResponse: + def follow_customer(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Marks a customer as followed. Args: @@ -2726,7 +2746,9 @@

Inherited members

payload = prepare_payload(locals()) return self.ws.send({'action': 'follow_customer', 'payload': payload}) - def unfollow_customer(self, id: str = None, payload: dict = None) -> RtmResponse: + def unfollow_customer(self, + id: str = None, + payload: dict = None) -> RtmResponse: ''' Removes the agent from the list of customer's followers. Args: @@ -2834,7 +2856,9 @@

Inherited members

'payload': payload }) - def set_away_status(self, away: bool = None, payload: dict = None) -> RtmResponse: + def set_away_status(self, + away: bool = None, + payload: dict = None) -> RtmResponse: ''' Sets an Agent's connection to the away state. Args: @@ -3496,7 +3520,9 @@

Returns

Expand source code -
def follow_customer(self, id: str = None, payload: dict = None) -> RtmResponse:
+
def follow_customer(self,
+                    id: str = None,
+                    payload: dict = None) -> RtmResponse:
     ''' Marks a customer as followed.
 
         Args:
@@ -3582,7 +3608,9 @@ 

Returns

Expand source code -
def get_customer(self, id: str = None, payload: dict = None) -> RtmResponse:
+
def get_customer(self,
+                 id: str = None,
+                 payload: dict = None) -> RtmResponse:
     ''' Returns the info about the Customer with a given ID.
 
         Args:
@@ -4464,7 +4492,9 @@ 

Returns

Expand source code -
def set_away_status(self, away: bool = None, payload: dict = None) -> RtmResponse:
+
def set_away_status(self,
+                    away: bool = None,
+                    payload: dict = None) -> RtmResponse:
     ''' Sets an Agent's connection to the away state.
 
         Args:
@@ -4715,7 +4745,9 @@ 

Returns

Expand source code -
def unfollow_chat(self, id: str = None, payload: dict = None) -> RtmResponse:
+
def unfollow_chat(self,
+                  id: str = None,
+                  payload: dict = None) -> RtmResponse:
     ''' Removes the requester from the chat followers.
 
         Args:
@@ -4755,7 +4787,9 @@ 

Returns

Expand source code -
def unfollow_customer(self, id: str = None, payload: dict = None) -> RtmResponse:
+
def unfollow_customer(self,
+                      id: str = None,
+                      payload: dict = None) -> RtmResponse:
     ''' Removes the agent from the list of customer's followers.
 
         Args:
diff --git a/docs/agent_web.html b/docs/agent_web.html
index 15f9869..cd375c8 100755
--- a/docs/agent_web.html
+++ b/docs/agent_web.html
@@ -34,17 +34,15 @@ 

Module livechat.agent.web.client

import typing from abc import ABCMeta -from configparser import ConfigParser import httpx +from livechat.config import CONFIG from livechat.utils.helpers import prepare_payload from livechat.utils.httpx_logger import HttpxLogger -config = ConfigParser() -config.read('configs/main.ini') -stable_version = config.get('api', 'stable') -api_url = config.get('api', 'url') +stable_version = CONFIG.get('stable') +api_url = CONFIG.get('url') # pylint: disable=R0903 diff --git a/docs/configuration_api.html b/docs/configuration_api.html index 90afec4..c9df860 100755 --- a/docs/configuration_api.html +++ b/docs/configuration_api.html @@ -33,17 +33,15 @@

Module livechat.configuration.client

from __future__ import annotations from abc import ABCMeta -from configparser import ConfigParser import httpx +from livechat.config import CONFIG from livechat.utils.helpers import prepare_payload from livechat.utils.httpx_logger import HttpxLogger -config = ConfigParser() -config.read('configs/main.ini') -stable_version = config.get('api', 'stable') -api_url = config.get('api', 'url') +stable_version = CONFIG.get('stable') +api_url = CONFIG.get('url') class ConfigurationApi: diff --git a/docs/customer_rtm.html b/docs/customer_rtm.html index 00d67d9..315b91d 100755 --- a/docs/customer_rtm.html +++ b/docs/customer_rtm.html @@ -34,16 +34,14 @@

Module livechat.customer.rtm.client

from __future__ import annotations from abc import ABCMeta -from configparser import ConfigParser +from livechat.config import CONFIG from livechat.utils.helpers import prepare_payload from livechat.utils.structures import RtmResponse from livechat.utils.ws_client import WebsocketClient -config = ConfigParser() -config.read('configs/main.ini') -stable_version = config.get('api', 'stable') -api_url = config.get('api', 'url') +stable_version = CONFIG.get('stable') +api_url = CONFIG.get('url') class CustomerRTM: diff --git a/docs/customer_web.html b/docs/customer_web.html index 112651f..0cf0258 100755 --- a/docs/customer_web.html +++ b/docs/customer_web.html @@ -34,17 +34,15 @@

Module livechat.customer.web.client

import typing from abc import ABCMeta -from configparser import ConfigParser import httpx +from livechat.config import CONFIG from livechat.utils.helpers import prepare_payload from livechat.utils.httpx_logger import HttpxLogger -config = ConfigParser() -config.read('configs/main.ini') -stable_version = config.get('api', 'stable') -api_url = config.get('api', 'url') +stable_version = CONFIG.get('stable') +api_url = CONFIG.get('url') # pylint: disable=R0903 diff --git a/docs/reports_api.html b/docs/reports_api.html index 8224daf..f8f3bdc 100755 --- a/docs/reports_api.html +++ b/docs/reports_api.html @@ -34,17 +34,15 @@

Module livechat.reports.client

from __future__ import annotations from abc import ABCMeta -from configparser import ConfigParser import httpx +from livechat.config import CONFIG from livechat.utils.helpers import prepare_payload from livechat.utils.httpx_logger import HttpxLogger -config = ConfigParser() -config.read('configs/main.ini') -stable_version = config.get('api', 'stable') -api_url = config.get('api', 'url') +stable_version = CONFIG.get('stable') +api_url = CONFIG.get('url') class ReportsApi: