mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-15 23:00:18 -07:00
19 lines
362 B
Python
19 lines
362 B
Python
import wideq
|
|
|
|
|
|
def example():
|
|
gw = wideq.gateway_info()
|
|
oauth_base = gw['empUri']
|
|
api_root = gw['thinqUri']
|
|
print(wideq.oauth_url(oauth_base))
|
|
|
|
access_token = wideq.parse_oauth_callback(input())
|
|
print(access_token)
|
|
|
|
session_info = wideq.login(api_root, access_token)
|
|
print(session_info)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
example()
|