Skip to content

Commit 0a18ff4

Browse files
authored
Merge pull request #177 from livechat/ME-1234_remove_follow_unfollow_customer
ME-1234 remove follow_customer and unfollow_customer methods
2 parents 0bcb59d + 875a382 commit 0a18ff4

File tree

8 files changed

+0
-372
lines changed

8 files changed

+0
-372
lines changed

livechat/agent/rtm/api/v34.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -721,45 +721,6 @@ def ban_customer(self,
721721
payload = prepare_payload(locals())
722722
return self.ws.send({'action': 'ban_customer', 'payload': payload})
723723

724-
def follow_customer(self,
725-
id: str = None,
726-
payload: dict = None) -> RtmResponse:
727-
''' Marks a customer as followed.
728-
729-
Args:
730-
id (str): ID of the Customer. UUID v4 format is required.
731-
payload (dict): Custom payload to be used as request's data.
732-
It overrides all other parameters provided for the method.
733-
734-
Returns:
735-
RtmResponse: RTM response structure (`request_id`, `action`,
736-
`type`, `success` and `payload` properties)
737-
'''
738-
if payload is None:
739-
payload = prepare_payload(locals())
740-
return self.ws.send({'action': 'follow_customer', 'payload': payload})
741-
742-
def unfollow_customer(self,
743-
id: str = None,
744-
payload: dict = None) -> RtmResponse:
745-
''' Removes the agent from the list of customer's followers.
746-
747-
Args:
748-
id (str): ID of the Customer. UUID v4 format is required.
749-
payload (dict): Custom payload to be used as request's data.
750-
It overrides all other parameters provided for the method.
751-
752-
Returns:
753-
RtmResponse: RTM response structure (`request_id`, `action`,
754-
`type`, `success` and `payload` properties)
755-
'''
756-
if payload is None:
757-
payload = prepare_payload(locals())
758-
return self.ws.send({
759-
'action': 'unfollow_customer',
760-
'payload': payload
761-
})
762-
763724
# Status
764725

765726
def login(self,

livechat/agent/rtm/api/v35.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -721,45 +721,6 @@ def ban_customer(self,
721721
payload = prepare_payload(locals())
722722
return self.ws.send({'action': 'ban_customer', 'payload': payload})
723723

724-
def follow_customer(self,
725-
id: str = None,
726-
payload: dict = None) -> RtmResponse:
727-
''' Marks a customer as followed.
728-
729-
Args:
730-
id (str): ID of the Customer. UUID v4 format is required.
731-
payload (dict): Custom payload to be used as request's data.
732-
It overrides all other parameters provided for the method.
733-
734-
Returns:
735-
RtmResponse: RTM response structure (`request_id`, `action`,
736-
`type`, `success` and `payload` properties)
737-
'''
738-
if payload is None:
739-
payload = prepare_payload(locals())
740-
return self.ws.send({'action': 'follow_customer', 'payload': payload})
741-
742-
def unfollow_customer(self,
743-
id: str = None,
744-
payload: dict = None) -> RtmResponse:
745-
''' Removes the agent from the list of customer's followers.
746-
747-
Args:
748-
id (str): ID of the Customer. UUID v4 format is required.
749-
payload (dict): Custom payload to be used as request's data.
750-
It overrides all other parameters provided for the method.
751-
752-
Returns:
753-
RtmResponse: RTM response structure (`request_id`, `action`,
754-
`type`, `success` and `payload` properties)
755-
'''
756-
if payload is None:
757-
payload = prepare_payload(locals())
758-
return self.ws.send({
759-
'action': 'unfollow_customer',
760-
'payload': payload
761-
})
762-
763724
# Status
764725

765726
def login(self,

livechat/agent/rtm/api/v36.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -693,45 +693,6 @@ def ban_customer(self,
693693
payload = prepare_payload(locals())
694694
return self.ws.send({'action': 'ban_customer', 'payload': payload})
695695

696-
def follow_customer(self,
697-
id: str = None,
698-
payload: dict = None) -> RtmResponse:
699-
''' Marks a customer as followed.
700-
701-
Args:
702-
id (str): ID of the Customer. UUID v4 format is required.
703-
payload (dict): Custom payload to be used as request's data.
704-
It overrides all other parameters provided for the method.
705-
706-
Returns:
707-
RtmResponse: RTM response structure (`request_id`, `action`,
708-
`type`, `success` and `payload` properties)
709-
'''
710-
if payload is None:
711-
payload = prepare_payload(locals())
712-
return self.ws.send({'action': 'follow_customer', 'payload': payload})
713-
714-
def unfollow_customer(self,
715-
id: str = None,
716-
payload: dict = None) -> RtmResponse:
717-
''' Removes the agent from the list of customer's followers.
718-
719-
Args:
720-
id (str): ID of the Customer. UUID v4 format is required.
721-
payload (dict): Custom payload to be used as request's data.
722-
It overrides all other parameters provided for the method.
723-
724-
Returns:
725-
RtmResponse: RTM response structure (`request_id`, `action`,
726-
`type`, `success` and `payload` properties)
727-
'''
728-
if payload is None:
729-
payload = prepare_payload(locals())
730-
return self.ws.send({
731-
'action': 'unfollow_customer',
732-
'payload': payload
733-
})
734-
735696
# Status
736697

737698
def login(self,

livechat/agent/rtm/api/v37.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -693,45 +693,6 @@ def ban_customer(self,
693693
payload = prepare_payload(locals())
694694
return self.ws.send({'action': 'ban_customer', 'payload': payload})
695695

696-
def follow_customer(self,
697-
id: str = None,
698-
payload: dict = None) -> RtmResponse:
699-
''' Marks a customer as followed.
700-
701-
Args:
702-
id (str): ID of the Customer. UUID v4 format is required.
703-
payload (dict): Custom payload to be used as request's data.
704-
It overrides all other parameters provided for the method.
705-
706-
Returns:
707-
RtmResponse: RTM response structure (`request_id`, `action`,
708-
`type`, `success` and `payload` properties)
709-
'''
710-
if payload is None:
711-
payload = prepare_payload(locals())
712-
return self.ws.send({'action': 'follow_customer', 'payload': payload})
713-
714-
def unfollow_customer(self,
715-
id: str = None,
716-
payload: dict = None) -> RtmResponse:
717-
''' Removes the agent from the list of customer's followers.
718-
719-
Args:
720-
id (str): ID of the Customer. UUID v4 format is required.
721-
payload (dict): Custom payload to be used as request's data.
722-
It overrides all other parameters provided for the method.
723-
724-
Returns:
725-
RtmResponse: RTM response structure (`request_id`, `action`,
726-
`type`, `success` and `payload` properties)
727-
'''
728-
if payload is None:
729-
payload = prepare_payload(locals())
730-
return self.ws.send({
731-
'action': 'unfollow_customer',
732-
'payload': payload
733-
})
734-
735696
# Status
736697

737698
def login(self,

livechat/agent/web/api/v34.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -860,60 +860,6 @@ def ban_customer(self,
860860
json=payload,
861861
headers=headers)
862862

863-
def follow_customer(self,
864-
id: str = None,
865-
payload: dict = None,
866-
headers: dict = None) -> httpx.Response:
867-
''' Marks a customer as followed. As a result, the requester (an agent)
868-
will receive the info about all the changes related to that customer
869-
via pushes. Once the customer leaves the website or is unfollowed,
870-
the agent will no longer receive that information.
871-
872-
Args:
873-
id (str): ID of the Customer.
874-
payload (dict): Custom payload to be used as request's data.
875-
It overrides all other parameters provided for the method.
876-
headers (dict): Custom headers to be used with session headers.
877-
They will be merged with session-level values that are set,
878-
however, these method-level parameters will not be persisted across requests.
879-
880-
Returns:
881-
httpx.Response: The Response object from `httpx` library,
882-
which contains a server’s response to an HTTP request.
883-
'''
884-
if payload is None:
885-
payload = prepare_payload(locals())
886-
return self.session.post(f'{self.api_url}/follow_customer',
887-
json=payload,
888-
headers=headers)
889-
890-
def unfollow_customer(self,
891-
id: str = None,
892-
payload: dict = None,
893-
headers: dict = None) -> httpx.Response:
894-
''' Removes the agent from the list of customer's followers. Calling this
895-
method on a customer the agent's chatting with will result in success,
896-
however, the agent will still receive pushes about the customer's data
897-
updates. The unfollowing will take effect once the chat ends.
898-
899-
Args:
900-
id (str): ID of the Customer.
901-
payload (dict): Custom payload to be used as request's data.
902-
It overrides all other parameters provided for the method.
903-
headers (dict): Custom headers to be used with session headers.
904-
They will be merged with session-level values that are set,
905-
however, these method-level parameters will not be persisted across requests.
906-
907-
Returns:
908-
httpx.Response: The Response object from `httpx` library,
909-
which contains a server’s response to an HTTP request.
910-
'''
911-
if payload is None:
912-
payload = prepare_payload(locals())
913-
return self.session.post(f'{self.api_url}/unfollow_customer',
914-
json=payload,
915-
headers=headers)
916-
917863
# Status
918864

919865
def set_routing_status(self,

livechat/agent/web/api/v35.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -860,60 +860,6 @@ def ban_customer(self,
860860
json=payload,
861861
headers=headers)
862862

863-
def follow_customer(self,
864-
id: str = None,
865-
payload: dict = None,
866-
headers: dict = None) -> httpx.Response:
867-
''' Marks a customer as followed. As a result, the requester (an agent)
868-
will receive the info about all the changes related to that customer
869-
via pushes. Once the customer leaves the website or is unfollowed,
870-
the agent will no longer receive that information.
871-
872-
Args:
873-
id (str): ID of the Customer.
874-
payload (dict): Custom payload to be used as request's data.
875-
It overrides all other parameters provided for the method.
876-
headers (dict): Custom headers to be used with session headers.
877-
They will be merged with session-level values that are set,
878-
however, these method-level parameters will not be persisted across requests.
879-
880-
Returns:
881-
httpx.Response: The Response object from `httpx` library,
882-
which contains a server’s response to an HTTP request.
883-
'''
884-
if payload is None:
885-
payload = prepare_payload(locals())
886-
return self.session.post(f'{self.api_url}/follow_customer',
887-
json=payload,
888-
headers=headers)
889-
890-
def unfollow_customer(self,
891-
id: str = None,
892-
payload: dict = None,
893-
headers: dict = None) -> httpx.Response:
894-
''' Removes the agent from the list of customer's followers. Calling this
895-
method on a customer the agent's chatting with will result in success,
896-
however, the agent will still receive pushes about the customer's data
897-
updates. The unfollowing will take effect once the chat ends.
898-
899-
Args:
900-
id (str): ID of the Customer.
901-
payload (dict): Custom payload to be used as request's data.
902-
It overrides all other parameters provided for the method.
903-
headers (dict): Custom headers to be used with session headers.
904-
They will be merged with session-level values that are set,
905-
however, these method-level parameters will not be persisted across requests.
906-
907-
Returns:
908-
httpx.Response: The Response object from `httpx` library,
909-
which contains a server’s response to an HTTP request.
910-
'''
911-
if payload is None:
912-
payload = prepare_payload(locals())
913-
return self.session.post(f'{self.api_url}/unfollow_customer',
914-
json=payload,
915-
headers=headers)
916-
917863
# Status
918864

919865
def set_routing_status(self,

livechat/agent/web/api/v36.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -819,60 +819,6 @@ def ban_customer(self,
819819
json=payload,
820820
headers=headers)
821821

822-
def follow_customer(self,
823-
id: str = None,
824-
payload: dict = None,
825-
headers: dict = None) -> httpx.Response:
826-
''' Marks a customer as followed. As a result, the requester (an agent)
827-
will receive the info about all the changes related to that customer
828-
via pushes. Once the customer leaves the website or is unfollowed,
829-
the agent will no longer receive that information.
830-
831-
Args:
832-
id (str): ID of the Customer.
833-
payload (dict): Custom payload to be used as request's data.
834-
It overrides all other parameters provided for the method.
835-
headers (dict): Custom headers to be used with session headers.
836-
They will be merged with session-level values that are set,
837-
however, these method-level parameters will not be persisted across requests.
838-
839-
Returns:
840-
httpx.Response: The Response object from `httpx` library,
841-
which contains a server’s response to an HTTP request.
842-
'''
843-
if payload is None:
844-
payload = prepare_payload(locals())
845-
return self.session.post(f'{self.api_url}/follow_customer',
846-
json=payload,
847-
headers=headers)
848-
849-
def unfollow_customer(self,
850-
id: str = None,
851-
payload: dict = None,
852-
headers: dict = None) -> httpx.Response:
853-
''' Removes the agent from the list of customer's followers. Calling this
854-
method on a customer the agent's chatting with will result in success,
855-
however, the agent will still receive pushes about the customer's data
856-
updates. The unfollowing will take effect once the chat ends.
857-
858-
Args:
859-
id (str): ID of the Customer.
860-
payload (dict): Custom payload to be used as request's data.
861-
It overrides all other parameters provided for the method.
862-
headers (dict): Custom headers to be used with session headers.
863-
They will be merged with session-level values that are set,
864-
however, these method-level parameters will not be persisted across requests.
865-
866-
Returns:
867-
httpx.Response: The Response object from `httpx` library,
868-
which contains a server’s response to an HTTP request.
869-
'''
870-
if payload is None:
871-
payload = prepare_payload(locals())
872-
return self.session.post(f'{self.api_url}/unfollow_customer',
873-
json=payload,
874-
headers=headers)
875-
876822
# Status
877823

878824
def set_routing_status(self,

0 commit comments

Comments
 (0)