Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Be a good citizen and display a warning id removed methods are used.

  • Loading branch information...
commit 580b0d69aaf52c59212aae200a6b5aa0e0f99384 1 parent f543378
@Kami Kami authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 face_client/face_client.py
View
12 face_client/face_client.py
@@ -14,6 +14,7 @@
import urllib
import urllib2
import os.path
+import warnings
try:
import json
@@ -35,6 +36,11 @@ def __init__(self, api_key=None, api_secret=None):
self.twitter_credentials = None
self.facebook_credentials = None
+ def set_twitter_user_credentials(self, *args, **kwargs):
+ warnings.warn(('Twitter username & password auth has been ' +
+ 'deprecated. Please use oauth based auth - ' +
+ 'set_twitter_oauth_credentials()'))
+
def set_twitter_oauth_credentials(self, user=None, secret=None,
token=None):
if not user or not secret or not token:
@@ -44,6 +50,12 @@ def set_twitter_oauth_credentials(self, user=None, secret=None,
'twitter_oauth_secret': secret,
'twitter_oauth_token': token}
+ def set_facebook_access_token(self, *args, **kwargs):
+ warnings.warn(('Method has been renamed to ' +
+ ' set_facebook_oauth_credentials(). Support for' +
+ 'username & password based auth has also been dropped.' +
+ 'Now only oAuth2 token based auth is supported'))
+
def set_facebook_oauth_credentials(self, user_id=None, session_id=None,
oauth_token=None):
for (key, value) in [('user_id', user_id), ('session_id', session_id),
Please sign in to comment.
Something went wrong with that request. Please try again.