allowed OdyseeChannel to re-use a specified auth_token

This commit is contained in:
Tristan Lee
2022-03-29 09:54:10 -05:00
parent c85dea215a
commit 6dc8710211

View File

@@ -16,7 +16,7 @@ class OdyseeChannel:
#-------------------------------------------------------------------------#
def __init__(self, channel_name):
def __init__(self, channel_name, auth_token = None):
self._channel_name = channel_name
@@ -25,7 +25,10 @@ class OdyseeChannel:
self.info = info
self._channel_id = self.info['channel_id']
self.auth_token = api.get_auth_token()
if auth_token is None:
self.auth_token = api.get_auth_token()
else:
self.auth_token = auth_token
self.info['subscribers'] = api.get_subscribers(
channel_id = self.info['channel_id'],