Added support for meta callback and updating of likes remaining.
1 files changed, 13 insertions(+), 0 deletions(-)

M tinder/api.py
M tinder/api.py +13 -0
@@ 131,6 131,10 @@ class API(object):
         method='DELETE',
     )
 
+    meta = bind_api(
+        path='/meta',
+    )
+
     ## HELPERS ##
 
     def report_spam(self, user_id):

          
@@ 163,6 167,15 @@ class API(object):
 
         return data.get('match', False)
 
+    def update_likes_remaining(self):
+        data = self.meta()
+        try:
+            self.likes_remaining = data['rating']['likes_remaining']
+            if self.debug:
+                log.info('* Likes Remaining: {0}'.format(self.likes_remaining))
+        except (KeyError, TypeError):
+            pass
+
     def nearby(self, limit=11):
         data = self.recs(limit=limit)
         if not 'results' in data: