Skip to content

Commit

Permalink
Merge pull request #66 from livechat/0-2-1-release
Browse files Browse the repository at this point in the history
0.2.1 release
  • Loading branch information
skamieniarz authored Feb 16, 2022
2 parents 39dc926 + 5944263 commit 1c6741a
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 50 deletions.
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
80 changes: 57 additions & 23 deletions docs/agent_rtm.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>

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(&#39;configs/main.ini&#39;)
stable_version = config.get(&#39;api&#39;, &#39;stable&#39;)
api_url = config.get(&#39;api&#39;, &#39;url&#39;)
stable_version = CONFIG.get(&#39;stable&#39;)
api_url = CONFIG.get(&#39;url&#39;)


class AgentRTM:
Expand Down Expand Up @@ -273,7 +271,9 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>
payload = prepare_payload(locals())
return self.ws.send({&#39;action&#39;: &#39;follow_chat&#39;, &#39;payload&#39;: payload})

def unfollow_chat(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def unfollow_chat(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Removes the requester from the chat followers.

Args:
Expand Down Expand Up @@ -630,7 +630,9 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>

# Customers

def get_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def get_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Returns the info about the Customer with a given ID.

Args:
Expand Down Expand Up @@ -747,7 +749,9 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>
payload = prepare_payload(locals())
return self.ws.send({&#39;action&#39;: &#39;ban_customer&#39;, &#39;payload&#39;: payload})

def follow_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def follow_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Marks a customer as followed.

Args:
Expand All @@ -763,7 +767,9 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>
payload = prepare_payload(locals())
return self.ws.send({&#39;action&#39;: &#39;follow_customer&#39;, &#39;payload&#39;: payload})

def unfollow_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def unfollow_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Removes the agent from the list of customer&#39;s followers.

Args:
Expand Down Expand Up @@ -871,7 +877,9 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>
&#39;payload&#39;: payload
})

def set_away_status(self, away: bool = None, payload: dict = None) -&gt; RtmResponse:
def set_away_status(self,
away: bool = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sets an Agent&#39;s connection to the away state.

Args:
Expand Down Expand Up @@ -1024,7 +1032,9 @@ <h1 class="title">Module <code>livechat.agent.rtm.client</code></h1>

# Chats

def deactivate_chat(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def deactivate_chat(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Deactivates a chat by closing the currently open thread.

Args:
Expand Down Expand Up @@ -1316,7 +1326,9 @@ <h2 id="raises">Raises</h2>

# Chats

def deactivate_chat(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def deactivate_chat(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Deactivates a chat by closing the currently open thread.

Args:
Expand Down Expand Up @@ -1572,7 +1584,9 @@ <h2 id="returns">Returns</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def deactivate_chat(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
<pre><code class="python">def deactivate_chat(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Deactivates a chat by closing the currently open thread.

Args:
Expand Down Expand Up @@ -2236,7 +2250,9 @@ <h3>Inherited members</h3>
payload = prepare_payload(locals())
return self.ws.send({&#39;action&#39;: &#39;follow_chat&#39;, &#39;payload&#39;: payload})

def unfollow_chat(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def unfollow_chat(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Removes the requester from the chat followers.

Args:
Expand Down Expand Up @@ -2593,7 +2609,9 @@ <h3>Inherited members</h3>

# Customers

def get_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def get_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Returns the info about the Customer with a given ID.

Args:
Expand Down Expand Up @@ -2710,7 +2728,9 @@ <h3>Inherited members</h3>
payload = prepare_payload(locals())
return self.ws.send({&#39;action&#39;: &#39;ban_customer&#39;, &#39;payload&#39;: payload})

def follow_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def follow_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Marks a customer as followed.

Args:
Expand All @@ -2726,7 +2746,9 @@ <h3>Inherited members</h3>
payload = prepare_payload(locals())
return self.ws.send({&#39;action&#39;: &#39;follow_customer&#39;, &#39;payload&#39;: payload})

def unfollow_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
def unfollow_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Removes the agent from the list of customer&#39;s followers.

Args:
Expand Down Expand Up @@ -2834,7 +2856,9 @@ <h3>Inherited members</h3>
&#39;payload&#39;: payload
})

def set_away_status(self, away: bool = None, payload: dict = None) -&gt; RtmResponse:
def set_away_status(self,
away: bool = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sets an Agent&#39;s connection to the away state.

Args:
Expand Down Expand Up @@ -3496,7 +3520,9 @@ <h2 id="returns">Returns</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def follow_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
<pre><code class="python">def follow_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Marks a customer as followed.

Args:
Expand Down Expand Up @@ -3582,7 +3608,9 @@ <h2 id="returns">Returns</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
<pre><code class="python">def get_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Returns the info about the Customer with a given ID.

Args:
Expand Down Expand Up @@ -4464,7 +4492,9 @@ <h2 id="returns">Returns</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def set_away_status(self, away: bool = None, payload: dict = None) -&gt; RtmResponse:
<pre><code class="python">def set_away_status(self,
away: bool = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Sets an Agent&#39;s connection to the away state.

Args:
Expand Down Expand Up @@ -4715,7 +4745,9 @@ <h2 id="returns">Returns</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def unfollow_chat(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
<pre><code class="python">def unfollow_chat(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Removes the requester from the chat followers.

Args:
Expand Down Expand Up @@ -4755,7 +4787,9 @@ <h2 id="returns">Returns</h2>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def unfollow_customer(self, id: str = None, payload: dict = None) -&gt; RtmResponse:
<pre><code class="python">def unfollow_customer(self,
id: str = None,
payload: dict = None) -&gt; RtmResponse:
&#39;&#39;&#39; Removes the agent from the list of customer&#39;s followers.

Args:
Expand Down
8 changes: 3 additions & 5 deletions docs/agent_web.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@ <h1 class="title">Module <code>livechat.agent.web.client</code></h1>

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(&#39;configs/main.ini&#39;)
stable_version = config.get(&#39;api&#39;, &#39;stable&#39;)
api_url = config.get(&#39;api&#39;, &#39;url&#39;)
stable_version = CONFIG.get(&#39;stable&#39;)
api_url = CONFIG.get(&#39;url&#39;)


# pylint: disable=R0903
Expand Down
8 changes: 3 additions & 5 deletions docs/configuration_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ <h1 class="title">Module <code>livechat.configuration.client</code></h1>
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(&#39;configs/main.ini&#39;)
stable_version = config.get(&#39;api&#39;, &#39;stable&#39;)
api_url = config.get(&#39;api&#39;, &#39;url&#39;)
stable_version = CONFIG.get(&#39;stable&#39;)
api_url = CONFIG.get(&#39;url&#39;)


class ConfigurationApi:
Expand Down
8 changes: 3 additions & 5 deletions docs/customer_rtm.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ <h1 class="title">Module <code>livechat.customer.rtm.client</code></h1>
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(&#39;configs/main.ini&#39;)
stable_version = config.get(&#39;api&#39;, &#39;stable&#39;)
api_url = config.get(&#39;api&#39;, &#39;url&#39;)
stable_version = CONFIG.get(&#39;stable&#39;)
api_url = CONFIG.get(&#39;url&#39;)


class CustomerRTM:
Expand Down
8 changes: 3 additions & 5 deletions docs/customer_web.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@ <h1 class="title">Module <code>livechat.customer.web.client</code></h1>

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(&#39;configs/main.ini&#39;)
stable_version = config.get(&#39;api&#39;, &#39;stable&#39;)
api_url = config.get(&#39;api&#39;, &#39;url&#39;)
stable_version = CONFIG.get(&#39;stable&#39;)
api_url = CONFIG.get(&#39;url&#39;)


# pylint: disable=R0903
Expand Down
8 changes: 3 additions & 5 deletions docs/reports_api.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@ <h1 class="title">Module <code>livechat.reports.client</code></h1>
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(&#39;configs/main.ini&#39;)
stable_version = config.get(&#39;api&#39;, &#39;stable&#39;)
api_url = config.get(&#39;api&#39;, &#39;url&#39;)
stable_version = CONFIG.get(&#39;stable&#39;)
api_url = CONFIG.get(&#39;url&#39;)


class ReportsApi:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1c6741a

Please sign in to comment.