Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tinder_api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ def get_match_data(self):
"""Returns a [] of match data"""
return [x for x in session.Session().list_matches() if x['_id'] == self.match_id][0]

def unmatch(self):
"""Unmatch the user"""
resp = r.delete('/user/matches/{}?locale=en'.format(self.match_id))
if resp.status_code != 200:
return resp
return "Error, unable to delete the match"

def message(self, body):
"""Messages the user"""
resp = r.post('/user/matches/{}'.format(self.match_id),
Expand Down