Code updates

Updated code to use config file
This commit is contained in:
kdeng00
2022-10-01 18:10:18 -04:00
parent 4639700be1
commit 4b4d49d23d
3 changed files with 75 additions and 9 deletions
+12 -1
View File
@@ -10,8 +10,19 @@ import Models
class OneNoteManager(object):
def __init__(self, token=None):
def __init__(self, token=None, config=None):
self.token = token
self.config = config
self.initialize_onenote(self.config)
def initialize_onenote(self, config):
self.__APP_ID = config.app_id
self.__SECRET = config.secret
self.__SCOPES = config.scopes
self.__AUTHORITY_URL = config.authority_url
self.__base_url = config.base_url
self.__token = Models.ResponseToken(access_token=config.token)
def __auth_header(self):