Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Added Segments.remove_contact
Browse files Browse the repository at this point in the history
  • Loading branch information
sebphi committed Jun 27, 2018
1 parent ccdb143 commit 29fedad
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mautic/segments.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,18 @@ def add_contact(self, segment_id, contact_id):
)
)
return self.process_response(response)

def remove_contact(self, segment_id, contact_id):
"""
Remove a contact from the segment
:param segment_id: int Segment ID
:param contact_id: int Contact ID
:return: dict|str
"""
response = self._client.session.post(
'{url}/{id}/contact/remove/{contact_id}'.format(
url=self.endpoint_url, id=segment_id, contact_id=contact_id
)
)
return self.process_response(response)

0 comments on commit 29fedad

Please sign in to comment.