@@ -163,6 +163,8 @@ def _request(self, endpoint=None, **kwargs):
163163 kwargs ['api_secret' ] = api .secret_key
164164 if 'api_public' not in kwargs and api .public_key :
165165 kwargs ['api_key' ] = api .public_key
166+ if 'access_token' not in kwargs and api .access_token :
167+ kwargs ['access_token' ] = api .access_token
166168
167169 # We need to ensure this is a list so that
168170 # multiple values for a key work
@@ -232,10 +234,11 @@ class DisqusAPI(Resource):
232234 'json' : (json .loads , ValueError ),
233235 }
234236
235- def __init__ (self , secret_key = None , public_key = None , format = 'json' , version = '3.0 ' ,
236- timeout = None , interfaces = INTERFACES , ** kwargs ):
237+ def __init__ (self , secret_key = None , public_key = None , access_token = None , format = 'json ' ,
238+ version = '3.0' , timeout = None , interfaces = INTERFACES , ** kwargs ):
237239 self .secret_key = secret_key
238240 self .public_key = public_key
241+ self .access_token = access_token
239242 if not public_key :
240243 warnings .warn ('You should pass ``public_key`` in addition to your secret key.' )
241244 self .format = format
0 commit comments