@@ -163,6 +163,8 @@ def _request(self, endpoint=None, **kwargs):
163
163
kwargs ['api_secret' ] = api .secret_key
164
164
if 'api_public' not in kwargs and api .public_key :
165
165
kwargs ['api_key' ] = api .public_key
166
+ if 'access_token' not in kwargs and api .access_token :
167
+ kwargs ['access_token' ] = api .access_token
166
168
167
169
# We need to ensure this is a list so that
168
170
# multiple values for a key work
@@ -232,10 +234,11 @@ class DisqusAPI(Resource):
232
234
'json' : (json .loads , ValueError ),
233
235
}
234
236
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 ):
237
239
self .secret_key = secret_key
238
240
self .public_key = public_key
241
+ self .access_token = access_token
239
242
if not public_key :
240
243
warnings .warn ('You should pass ``public_key`` in addition to your secret key.' )
241
244
self .format = format
0 commit comments