diff --git a/docs/agent/web/api/v34.html b/docs/agent/web/api/v34.html index 5c2d7fa..d12c109 100644 --- a/docs/agent/web/api/v34.html +++ b/docs/agent/web/api/v34.html @@ -476,7 +476,7 @@
livechat.agent.web.api.v34
livechat.agent.web.api.v35
livechat.agent.web.base
livechat.agent.web.base
livechat.agent.web.base
-def get_client(access_token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False) ‑> Union[AgentWebV33, AgentWebV34, AgentWebV35]
+def get_client(access_token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True) ‑> Union[AgentWebV33, AgentWebV34, AgentWebV35]
Returns client for specific API version.
@@ -152,6 +166,13 @@http2
: bool
False
.proxies
: dict
verify
: bool
True
(default CA bundle),
+a path to an SSL certificate file, an ssl.SSLContext
, or False
+(which will disable verification). Defaults to True
.API client object for specified version.
@@ -169,7 +190,9 @@livechat.configuration.api.v33
livechat.configuration.api.v33
livechat.configuration.api.v33
livechat.configuration.api.v33
-def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, job_title: str = None, groups: list = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
Creates a new Bot.
@@ -2668,10 +2674,12 @@max_chats_count
: int
default_group_priority
: str
job_title
: str
groups
: list
webhooks
: dict
work_scheduler
: dict
timezone
: str
-def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, groups: list = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
Updates an existing Bot.
@@ -4683,6 +4693,8 @@max_chats_count
: int
default_group_priority
: str
groups
: list
webhooks
: dict
livechat.configuration.api.v34
livechat.configuration.api.v34
livechat.configuration.api.v34
livechat.configuration.api.v34
-def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, job_title: str = None, groups: list = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
Creates a new Bot.
@@ -2668,10 +2676,12 @@max_chats_count
: int
default_group_priority
: str
job_title
: str
groups
: list
webhooks
: dict
work_scheduler
: dict
timezone
: str
-def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
Updates an existing Bot.
@@ -4683,6 +4695,8 @@max_chats_count
: int
default_group_priority
: str
groups
: list
webhooks
: dict
livechat.configuration.api.v35
livechat.configuration.api.v35
livechat.configuration.api.v35
livechat.configuration.api.v35
livechat.configuration.api.v35
livechat.configuration.api.v35
livechat.configuration.api.v35
-def check_product_limits(self, plan: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+
+def check_product_limits_for_plan(self, plan: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
-
Checks product limits for plans.
@@ -3338,10 +3286,10 @@ Returns
Expand source code
-def check_product_limits(self,
- plan: str = None,
- payload: dict = None,
- headers: dict = None) -> httpx.Response:
+def check_product_limits_for_plan(self,
+ plan: str = None,
+ payload: dict = None,
+ headers: dict = None) -> httpx.Response:
''' Checks product limits for plans.
Args:
plan (str): License plan to check limit for.
@@ -3465,7 +3413,7 @@ Returns
-def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+def create_bot(self, name: str = None, avatar: str = None, max_chats_count: int = None, default_group_priority: str = None, job_title: str = None, groups: list = None, work_scheduler: dict = None, timezone: str = None, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
-
Creates a new bot.
@@ -3477,10 +3425,12 @@ Args
- Avatar URL.
max_chats_count
: int
- Max. number of incoming chats that can be routed to the Bot; default: 6.
+default_group_priority
: str
+- The default routing priority for a group without defined priority.
+job_title
: str
+- Bot's job title.
groups
: list
- Groups the Bot belongs to.
-webhooks
: dict
-- Webhooks sent to the Bot.
work_scheduler
: dict
- Work scheduler options to set for the new Bot.
timezone
: str
@@ -3509,8 +3459,9 @@ Returns
name: str = None,
avatar: str = None,
max_chats_count: int = None,
+ default_group_priority: str = None,
+ job_title: str = None,
groups: list = None,
- webhooks: dict = None,
work_scheduler: dict = None,
timezone: str = None,
owner_client_id: str = None,
@@ -3521,8 +3472,9 @@ Returns
name (str): Display name.
avatar (str): Avatar URL.
max_chats_count (int): Max. number of incoming chats that can be routed to the Bot; default: 6.
+ default_group_priority (str): The default routing priority for a group without defined priority.
+ job_title (str): Bot's job title.
groups (list): Groups the Bot belongs to.
- webhooks (dict): Webhooks sent to the Bot.
work_scheduler (dict): Work scheduler options to set for the new Bot.
timezone (str): The time zone in which the Bot's work scheduler should operate.
owner_client_id (str): ID of the client bot will be assigned to.
@@ -4300,58 +4252,6 @@ Returns
headers=headers)
-
-def get_license_id(self, organization_id: str = None, params: dict = None, headers: dict = None) ‑> httpx.Response
-
--
-
Returns license ID by given organization ID.
-Args
-
-organization_id
: str
-- Organization ID to get license ID for.
-params
: dict
-- Custom params to be used in request's query string.
-It overrides all other parameters provided for the method.
-headers
: dict
-- Custom headers to be used with session headers.
-They will be merged with session-level values that are set,
-however, these method-level parameters will not be persisted across requests.
-
-Returns
-
-httpx.Response
-- The Response object from
httpx
library,
-which contains a server's response to an HTTP request.
-
-
-
-Expand source code
-
-def get_license_id(self,
- organization_id: str = None,
- params: dict = None,
- headers: dict = None) -> httpx.Response:
- ''' Returns license ID by given organization ID.
-
- Args:
- organization_id (str): Organization ID to get license ID for.
- params (dict): Custom params to be used in request's query string.
- It overrides all other parameters provided for the method.
- headers (dict): Custom headers to be used with session headers.
- They will be merged with session-level values that are set,
- however, these method-level parameters will not be persisted across requests.
-
- Returns:
- httpx.Response: The Response object from `httpx` library,
- which contains a server's response to an HTTP request.
- '''
- if params is None:
- params = prepare_payload(locals())
- return self.session.get(f'{self.api_url}/get_license_id',
- params=params,
- headers=headers)
-
-
def get_license_webhooks_state(self, owner_client_id: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
@@ -4406,17 +4306,15 @@ Returns
headers=headers)
-
-def get_organization_id(self, license_id: int = None, params: dict = None, headers: dict = None) ‑> httpx.Response
+
+def get_product_source(self, payload: dict = None, headers: dict = None) ‑> httpx.Response
-
-
Returns organization ID by given license ID.
+Retrieves the source parameters that were passed when activating the LiveChat product.
Args
-license_id
: int
-- License ID to get organization ID for.
-params
: dict
-- Custom params to be used in request's query string.
+
payload
: dict
+- Custom payload to be used as request's data.
It overrides all other parameters provided for the method.
headers
: dict
- Custom headers to be used with session headers.
@@ -4433,28 +4331,24 @@
Returns
Expand source code
-def get_organization_id(self,
- license_id: int = None,
- params: dict = None,
- headers: dict = None) -> httpx.Response:
- ''' Returns organization ID by given license ID.
-
+def get_product_source(self,
+ payload: dict = None,
+ headers: dict = None) -> httpx.Response:
+ ''' Retrieves the source parameters that were passed when activating the LiveChat product.
Args:
- license_id (int): License ID to get organization ID for.
- params (dict): Custom params to be used in request's query string.
+ payload (dict): Custom payload to be used as request's data.
It overrides all other parameters provided for the method.
headers (dict): Custom headers to be used with session headers.
They will be merged with session-level values that are set,
however, these method-level parameters will not be persisted across requests.
-
Returns:
httpx.Response: The Response object from `httpx` library,
which contains a server's response to an HTTP request.
'''
- if params is None:
- params = prepare_payload(locals())
- return self.session.get(f'{self.api_url}/get_organization_id',
- params=params,
+ if payload is None:
+ payload = prepare_payload(locals())
+ return self.session.get(f'{self.api_url}/get_product_source',
+ json=payload,
headers=headers)
@@ -5677,7 +5571,7 @@ Returns
-def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, webhooks: dict = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+def update_bot(self, id: str = None, name: str = None, avatar: str = None, max_chats_count: int = None, groups: list = None, default_group_priority: str = None, work_scheduler: dict = None, timezone: str = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
-
Updates an existing Bot.
@@ -5693,8 +5587,8 @@ Args
- Max. number of incoming chats that can be routed to the Bot.
groups
: list
- Groups the Bot belongs to.
-webhooks
: dict
-- Webhooks sent to the Bot.
+default_group_priority
: str
+- The default routing priority for a group without defined priority.
work_scheduler
: dict
- Work scheduler options to set for the new Bot.
timezone
: str
@@ -5723,7 +5617,7 @@ Returns
avatar: str = None,
max_chats_count: int = None,
groups: list = None,
- webhooks: dict = None,
+ default_group_priority: str = None,
work_scheduler: dict = None,
timezone: str = None,
payload: dict = None,
@@ -5736,7 +5630,7 @@ Returns
avatar (str): Avatar URL.
max_chats_count (int): Max. number of incoming chats that can be routed to the Bot.
groups (list): Groups the Bot belongs to.
- webhooks (dict): Webhooks sent to the Bot.
+ default_group_priority (str): The default routing priority for a group without defined priority.
work_scheduler (dict): Work scheduler options to set for the new Bot.
timezone (str): The time zone in which the Bot's work scheduler should operate.
payload (dict): Custom payload to be used as request's data.
@@ -6017,7 +5911,7 @@ batch_suspend_agents
batch_unsuspend_agents
batch_update_agents
-check_product_limits
+check_product_limits_for_plan
create_agent
create_bot
create_group
@@ -6034,9 +5928,8 @@ get_agent
get_bot
get_group
-get_license_id
get_license_webhooks_state
-get_organization_id
+get_product_source
list_agents
list_auto_accesses
list_bots
diff --git a/docs/configuration/base.html b/docs/configuration/base.html
index b2c79c8..9f5bb98 100644
--- a/docs/configuration/base.html
+++ b/docs/configuration/base.html
@@ -54,7 +54,9 @@ Module livechat.configuration.base
token: str,
version: str = stable_version,
base_url: str = api_url,
- http2: bool = False
+ http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True
) -> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35]:
''' Returns client for specific Configuration API version.
@@ -65,6 +67,11 @@ Module livechat.configuration.base
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
Returns:
ConfigurationApi: API client object for specified version.
@@ -73,9 +80,12 @@ Module livechat.configuration.base
ValueError: If the specified version does not exist.
'''
client = {
- '3.3': ConfigurationApiV33(token, base_url, http2),
- '3.4': ConfigurationApiV34(token, base_url, http2),
- '3.5': ConfigurationApiV35(token, base_url, http2),
+ '3.3': ConfigurationApiV33(token, base_url, http2, proxies,
+ verify),
+ '3.4': ConfigurationApiV34(token, base_url, http2, proxies,
+ verify),
+ '3.5': ConfigurationApiV35(token, base_url, http2, proxies,
+ verify),
}.get(version)
if not client:
raise ValueError('Provided version does not exist.')
@@ -109,7 +119,9 @@ Classes
token: str,
version: str = stable_version,
base_url: str = api_url,
- http2: bool = False
+ http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True
) -> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35]:
''' Returns client for specific Configuration API version.
@@ -120,6 +132,11 @@ Classes
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
Returns:
ConfigurationApi: API client object for specified version.
@@ -128,9 +145,12 @@ Classes
ValueError: If the specified version does not exist.
'''
client = {
- '3.3': ConfigurationApiV33(token, base_url, http2),
- '3.4': ConfigurationApiV34(token, base_url, http2),
- '3.5': ConfigurationApiV35(token, base_url, http2),
+ '3.3': ConfigurationApiV33(token, base_url, http2, proxies,
+ verify),
+ '3.4': ConfigurationApiV34(token, base_url, http2, proxies,
+ verify),
+ '3.5': ConfigurationApiV35(token, base_url, http2, proxies,
+ verify),
}.get(version)
if not client:
raise ValueError('Provided version does not exist.')
@@ -139,7 +159,7 @@ Classes
Static methods
-def get_client(token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False) ‑> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35]
+def get_client(token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True) ‑> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35]
-
Returns client for specific Configuration API version.
@@ -155,6 +175,13 @@ Args
http2
: bool
- A boolean indicating if HTTP/2 support should be
enabled. Defaults to
False
.
+proxies
: dict
+- A dictionary mapping proxy keys to proxy URLs.
+verify
: bool
+- SSL certificates (a.k.a CA bundle) used to
+verify the identity of requested hosts. Either
True
(default CA bundle),
+a path to an SSL certificate file, an ssl.SSLContext
, or False
+(which will disable verification). Defaults to True
.
Returns
@@ -175,7 +202,9 @@ Raises
token: str,
version: str = stable_version,
base_url: str = api_url,
- http2: bool = False
+ http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True
) -> Union[ConfigurationApiV33, ConfigurationApiV34, ConfigurationApiV35]:
''' Returns client for specific Configuration API version.
@@ -186,6 +215,11 @@ Raises
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
Returns:
ConfigurationApi: API client object for specified version.
@@ -194,9 +228,12 @@ Raises
ValueError: If the specified version does not exist.
'''
client = {
- '3.3': ConfigurationApiV33(token, base_url, http2),
- '3.4': ConfigurationApiV34(token, base_url, http2),
- '3.5': ConfigurationApiV35(token, base_url, http2),
+ '3.3': ConfigurationApiV33(token, base_url, http2, proxies,
+ verify),
+ '3.4': ConfigurationApiV34(token, base_url, http2, proxies,
+ verify),
+ '3.5': ConfigurationApiV35(token, base_url, http2, proxies,
+ verify),
}.get(version)
if not client:
raise ValueError('Provided version does not exist.')
diff --git a/docs/customer/web/base.html b/docs/customer/web/base.html
index 8f34c95..841fa1f 100644
--- a/docs/customer/web/base.html
+++ b/docs/customer/web/base.html
@@ -54,18 +54,25 @@ Module livechat.customer.web.base
version: str = stable_version,
base_url: str = api_url,
http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True,
organization_id: str = None
) -> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35]:
''' Returns client for specific API version.
Args:
license_id (int): License ID. Required to use for API version <= 3.3.
- token (str): Full token with type (Bearer/Basic) that will be
+ access_token (str): Full token with type (Bearer/Basic) that will be
used as `Authorization` header in requests to API.
version (str): API's version. Defaults to the stable version of API.
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
organization_id (str): Organization ID, replaced license ID in v3.4.
Returns:
@@ -85,19 +92,25 @@ Module livechat.customer.web.base
'license_id': license_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
'3.4': {
'organization_id': organization_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
'3.5': {
'organization_id': organization_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
}.get(version)
if client:
@@ -134,18 +147,25 @@ Classes
version: str = stable_version,
base_url: str = api_url,
http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True,
organization_id: str = None
) -> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35]:
''' Returns client for specific API version.
Args:
license_id (int): License ID. Required to use for API version <= 3.3.
- token (str): Full token with type (Bearer/Basic) that will be
+ access_token (str): Full token with type (Bearer/Basic) that will be
used as `Authorization` header in requests to API.
version (str): API's version. Defaults to the stable version of API.
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
organization_id (str): Organization ID, replaced license ID in v3.4.
Returns:
@@ -165,19 +185,25 @@ Classes
'license_id': license_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
'3.4': {
'organization_id': organization_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
'3.5': {
'organization_id': organization_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
}.get(version)
if client:
@@ -187,7 +213,7 @@ Classes
Static methods
-def get_client(license_id: int = None, access_token: str = None, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False, organization_id: str = None) ‑> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35]
+def get_client(license_id: int = None, access_token: str = None, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True, organization_id: str = None) ‑> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35]
-
Returns client for specific API version.
@@ -195,7 +221,7 @@ Args
license_id
: int
- License ID. Required to use for API version <= 3.3.
-token
: str
+access_token
: str
- Full token with type (Bearer/Basic) that will be
used as
Authorization
header in requests to API.
version
: str
@@ -205,6 +231,13 @@ Args
http2
: bool
- A boolean indicating if HTTP/2 support should be
enabled. Defaults to
False
.
+proxies
: dict
+- A dictionary mapping proxy keys to proxy URLs.
+verify
: bool
+- SSL certificates (a.k.a CA bundle) used to
+verify the identity of requested hosts. Either
True
(default CA bundle),
+a path to an SSL certificate file, an ssl.SSLContext
, or False
+(which will disable verification). Defaults to True
.
organization_id
: str
- Organization ID, replaced license ID in v3.4.
@@ -227,18 +260,25 @@ Raises
version: str = stable_version,
base_url: str = api_url,
http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True,
organization_id: str = None
) -> Union[CustomerWebV33, CustomerWebV34, CustomerWebV35]:
''' Returns client for specific API version.
Args:
license_id (int): License ID. Required to use for API version <= 3.3.
- token (str): Full token with type (Bearer/Basic) that will be
+ access_token (str): Full token with type (Bearer/Basic) that will be
used as `Authorization` header in requests to API.
version (str): API's version. Defaults to the stable version of API.
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
organization_id (str): Organization ID, replaced license ID in v3.4.
Returns:
@@ -258,19 +298,25 @@ Raises
'license_id': license_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
'3.4': {
'organization_id': organization_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
'3.5': {
'organization_id': organization_id,
'access_token': access_token,
'base_url': base_url,
- 'http2': http2
+ 'http2': http2,
+ 'proxies': proxies,
+ 'verify': verify
},
}.get(version)
if client:
diff --git a/docs/reports/api/v34.html b/docs/reports/api/v34.html
index 61a7632..c8cce4c 100644
--- a/docs/reports/api/v34.html
+++ b/docs/reports/api/v34.html
@@ -312,7 +312,7 @@ Module livechat.reports.api.v34
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/response_time',
+ return self.session.post(f'{self.api_url}/chats/response_time',
json=payload,
headers=headers)
@@ -342,7 +342,7 @@ Module livechat.reports.api.v34
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/first_response_time',
+ return self.session.post(f'{self.api_url}/chats/first_response_time',
json=payload,
headers=headers)
@@ -705,7 +705,7 @@ Classes
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/response_time',
+ return self.session.post(f'{self.api_url}/chats/response_time',
json=payload,
headers=headers)
@@ -735,7 +735,7 @@ Classes
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/first_response_time',
+ return self.session.post(f'{self.api_url}/chats/first_response_time',
json=payload,
headers=headers)
@@ -1058,7 +1058,7 @@ Returns
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/first_response_time',
+ return self.session.post(f'{self.api_url}/chats/first_response_time',
json=payload,
headers=headers)
@@ -1378,7 +1378,7 @@ Returns
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/response_time',
+ return self.session.post(f'{self.api_url}/chats/response_time',
json=payload,
headers=headers)
diff --git a/docs/reports/api/v35.html b/docs/reports/api/v35.html
index 03feb73..cc1c9bb 100644
--- a/docs/reports/api/v35.html
+++ b/docs/reports/api/v35.html
@@ -312,7 +312,7 @@ Module livechat.reports.api.v35
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/response_time',
+ return self.session.post(f'{self.api_url}/chats/response_time',
json=payload,
headers=headers)
@@ -342,7 +342,7 @@ Module livechat.reports.api.v35
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/first_response_time',
+ return self.session.post(f'{self.api_url}/chats/first_response_time',
json=payload,
headers=headers)
@@ -411,11 +411,11 @@ Module livechat.reports.api.v35
# Tags
- def tags_chat_usage(self,
- timezone: str = None,
- filters: dict = None,
- payload: dict = None,
- headers: dict = None) -> httpx.Response:
+ def chat_usage(self,
+ timezone: str = None,
+ filters: dict = None,
+ payload: dict = None,
+ headers: dict = None) -> httpx.Response:
''' Shows the total number of chats marked with each tag.
Args:
@@ -736,7 +736,7 @@ Classes
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/response_time',
+ return self.session.post(f'{self.api_url}/chats/response_time',
json=payload,
headers=headers)
@@ -766,7 +766,7 @@ Classes
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/first_response_time',
+ return self.session.post(f'{self.api_url}/chats/first_response_time',
json=payload,
headers=headers)
@@ -835,11 +835,11 @@ Classes
# Tags
- def tags_chat_usage(self,
- timezone: str = None,
- filters: dict = None,
- payload: dict = None,
- headers: dict = None) -> httpx.Response:
+ def chat_usage(self,
+ timezone: str = None,
+ filters: dict = None,
+ payload: dict = None,
+ headers: dict = None) -> httpx.Response:
''' Shows the total number of chats marked with each tag.
Args:
@@ -933,6 +933,66 @@ Returns
headers=headers)
+
+def chat_usage(self, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
+
+-
+
Shows the total number of chats marked with each tag.
+Args
+
+timezone
: str
+- IANA Time Zone (e.g. America/Phoenix).
+Defaults to the requester's timezone.
+When the requester's timezone isn't present, then
filters.from
is parsed to get the timezone.
+filters
: dict
+- If none provided, your report will span the last seven days.
+payload
: dict
+- Custom payload to be used as request's data.
+It overrides all other parameters provided for the method.
+headers
: dict
+- Custom headers to be used with session headers.
+They will be merged with session-level values that are set,
+however, these method-level parameters will not be persisted across requests.
+
+Returns
+
+httpx.Response
+- The Response object from
httpx
library,
+which contains a server’s response to an HTTP request.
+
+
+
+Expand source code
+
+def chat_usage(self,
+ timezone: str = None,
+ filters: dict = None,
+ payload: dict = None,
+ headers: dict = None) -> httpx.Response:
+ ''' Shows the total number of chats marked with each tag.
+
+ Args:
+ timezone (str): IANA Time Zone (e.g. America/Phoenix).
+ Defaults to the requester's timezone.
+ When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
+ filters (dict): If none provided, your report will span the last seven days.
+ payload (dict): Custom payload to be used as request's data.
+ It overrides all other parameters provided for the method.
+ headers (dict): Custom headers to be used with session headers.
+ They will be merged with session-level values that are set,
+ however, these method-level parameters will not be persisted across requests.
+
+ Returns:
+ httpx.Response: The Response object from `httpx` library,
+ which contains a server’s response to an HTTP request.
+ '''
+ if payload is None:
+ payload = prepare_payload(locals())
+ return self.session.post(f'{self.api_url}/tags/chat_usage',
+ json=payload,
+ headers=headers)
+
+
def duration(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
@@ -1120,7 +1180,7 @@ Returns
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/first_response_time',
+ return self.session.post(f'{self.api_url}/chats/first_response_time',
json=payload,
headers=headers)
@@ -1440,7 +1500,7 @@ Returns
'''
if payload is None:
payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/agents/response_time',
+ return self.session.post(f'{self.api_url}/chats/response_time',
json=payload,
headers=headers)
@@ -1569,66 +1629,6 @@ Returns
headers=headers)
-
--
-
Shows the total number of chats marked with each tag.
-Args
-
-timezone
: str
-- IANA Time Zone (e.g. America/Phoenix).
-Defaults to the requester's timezone.
-When the requester's timezone isn't present, then
filters.from
is parsed to get the timezone.
-filters
: dict
-- If none provided, your report will span the last seven days.
-payload
: dict
-- Custom payload to be used as request's data.
-It overrides all other parameters provided for the method.
-headers
: dict
-- Custom headers to be used with session headers.
-They will be merged with session-level values that are set,
-however, these method-level parameters will not be persisted across requests.
-
-Returns
-
-httpx.Response
-- The Response object from
httpx
library,
-which contains a server’s response to an HTTP request.
-
-
-
-Expand source code
-
-def tags_chat_usage(self,
- timezone: str = None,
- filters: dict = None,
- payload: dict = None,
- headers: dict = None) -> httpx.Response:
- ''' Shows the total number of chats marked with each tag.
-
- Args:
- timezone (str): IANA Time Zone (e.g. America/Phoenix).
- Defaults to the requester's timezone.
- When the requester's timezone isn't present, then `filters.from` is parsed to get the timezone.
- filters (dict): If none provided, your report will span the last seven days.
- payload (dict): Custom payload to be used as request's data.
- It overrides all other parameters provided for the method.
- headers (dict): Custom headers to be used with session headers.
- They will be merged with session-level values that are set,
- however, these method-level parameters will not be persisted across requests.
-
- Returns:
- httpx.Response: The Response object from `httpx` library,
- which contains a server’s response to an HTTP request.
- '''
- if payload is None:
- payload = prepare_payload(locals())
- return self.session.post(f'{self.api_url}/tags/chat_usage',
- json=payload,
- headers=headers)
-
-
def total_chats(self, distribution: str = None, timezone: str = None, filters: dict = None, payload: dict = None, headers: dict = None) ‑> httpx.Response
@@ -1715,6 +1715,7 @@ Index
ReportsApiV35
availability
+chat_usage
duration
engagement
first_response_time
@@ -1725,7 +1726,6 @@ response_time
surveys
tags
-tags_chat_usage
total_chats
diff --git a/docs/reports/base.html b/docs/reports/base.html
index 05ced11..f511f2c 100644
--- a/docs/reports/base.html
+++ b/docs/reports/base.html
@@ -55,7 +55,9 @@ Module livechat.reports.base
token: str,
version: str = stable_version,
base_url: str = api_url,
- http2: bool = False
+ http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True
) -> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35]:
''' Returns client for specific Reports API version.
@@ -66,6 +68,11 @@ Module livechat.reports.base
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
Returns:
ReportsApi: API client object for specified version.
@@ -74,9 +81,9 @@ Module livechat.reports.base
ValueError: If the specified version does not exist.
'''
client = {
- '3.3': ReportsApiV33(token, base_url, http2),
- '3.4': ReportsApiV34(token, base_url, http2),
- '3.5': ReportsApiV35(token, base_url, http2),
+ '3.3': ReportsApiV33(token, base_url, http2, proxies, verify),
+ '3.4': ReportsApiV34(token, base_url, http2, proxies, verify),
+ '3.5': ReportsApiV35(token, base_url, http2, proxies, verify),
}.get(version)
if not client:
raise ValueError('Provided version does not exist.')
@@ -110,7 +117,9 @@ Classes
token: str,
version: str = stable_version,
base_url: str = api_url,
- http2: bool = False
+ http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True
) -> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35]:
''' Returns client for specific Reports API version.
@@ -121,6 +130,11 @@ Classes
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
Returns:
ReportsApi: API client object for specified version.
@@ -129,9 +143,9 @@ Classes
ValueError: If the specified version does not exist.
'''
client = {
- '3.3': ReportsApiV33(token, base_url, http2),
- '3.4': ReportsApiV34(token, base_url, http2),
- '3.5': ReportsApiV35(token, base_url, http2),
+ '3.3': ReportsApiV33(token, base_url, http2, proxies, verify),
+ '3.4': ReportsApiV34(token, base_url, http2, proxies, verify),
+ '3.5': ReportsApiV35(token, base_url, http2, proxies, verify),
}.get(version)
if not client:
raise ValueError('Provided version does not exist.')
@@ -140,7 +154,7 @@ Classes
Static methods
-def get_client(token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False) ‑> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35]
+def get_client(token: str, version: str = '3.4', base_url: str = 'api.livechatinc.com', http2: bool = False, proxies: dict = None, verify: bool = True) ‑> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35]
-
Returns client for specific Reports API version.
@@ -156,6 +170,13 @@ Args
http2
: bool
- A boolean indicating if HTTP/2 support should be
enabled. Defaults to
False
.
+proxies
: dict
+- A dictionary mapping proxy keys to proxy URLs.
+verify
: bool
+- SSL certificates (a.k.a CA bundle) used to
+verify the identity of requested hosts. Either
True
(default CA bundle),
+a path to an SSL certificate file, an ssl.SSLContext
, or False
+(which will disable verification). Defaults to True
.
Returns
@@ -176,7 +197,9 @@ Raises
token: str,
version: str = stable_version,
base_url: str = api_url,
- http2: bool = False
+ http2: bool = False,
+ proxies: dict = None,
+ verify: bool = True
) -> Union[ReportsApiV33, ReportsApiV34, ReportsApiV35]:
''' Returns client for specific Reports API version.
@@ -187,6 +210,11 @@ Raises
base_url (str): API's base url. Defaults to API's production URL.
http2 (bool): A boolean indicating if HTTP/2 support should be
enabled. Defaults to `False`.
+ proxies (dict): A dictionary mapping proxy keys to proxy URLs.
+ verify (bool): SSL certificates (a.k.a CA bundle) used to
+ verify the identity of requested hosts. Either `True` (default CA bundle),
+ a path to an SSL certificate file, an `ssl.SSLContext`, or `False`
+ (which will disable verification). Defaults to `True`.
Returns:
ReportsApi: API client object for specified version.
@@ -195,9 +223,9 @@ Raises
ValueError: If the specified version does not exist.
'''
client = {
- '3.3': ReportsApiV33(token, base_url, http2),
- '3.4': ReportsApiV34(token, base_url, http2),
- '3.5': ReportsApiV35(token, base_url, http2),
+ '3.3': ReportsApiV33(token, base_url, http2, proxies, verify),
+ '3.4': ReportsApiV34(token, base_url, http2, proxies, verify),
+ '3.5': ReportsApiV35(token, base_url, http2, proxies, verify),
}.get(version)
if not client:
raise ValueError('Provided version does not exist.')