2019-09-04 17:45:26 +01:00
|
|
|
from spotframework.net.user import NetworkUser
|
2019-06-11 11:59:24 +01:00
|
|
|
from spotframework.net.network import Network
|
2019-05-26 20:42:01 +01:00
|
|
|
|
2019-08-02 12:02:24 +01:00
|
|
|
import os
|
2019-09-05 12:20:21 +01:00
|
|
|
import logging
|
|
|
|
|
|
|
|
logger = logging.getLogger('spotframework')
|
|
|
|
stream_log_format = '%(levelname)s %(name)s:%(funcName)s - %(message)s'
|
|
|
|
stream_formatter = logging.Formatter(stream_log_format)
|
|
|
|
|
|
|
|
stream_handler = logging.StreamHandler()
|
|
|
|
stream_handler.setFormatter(stream_formatter)
|
|
|
|
|
|
|
|
logger.addHandler(stream_handler)
|
2019-08-02 12:02:24 +01:00
|
|
|
|
2019-05-26 20:42:01 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
|
2019-09-04 17:45:26 +01:00
|
|
|
network = Network(NetworkUser(os.environ['SPOTCLIENT'],
|
|
|
|
os.environ['SPOTSECRET'],
|
|
|
|
os.environ['SPOTACCESS'],
|
|
|
|
os.environ['SPOTREFRESH']))
|
2019-05-26 20:42:01 +01:00
|
|
|
|
|
|
|
print(network.user.access_token)
|