-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
29 lines (24 loc) · 788 Bytes
/
main.py
File metadata and controls
29 lines (24 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Python 3
from Configuration import Configuration
from DevicesService import DevicesService
from ItemsService import ItemsService
from UsersService import UsersService
BASE_URL = 'http://localhost:7373/'
GENERATION_VERSION = '110'
REGISTRATION__CODE = '1001c086'
USERNAME = 'Admin'
PASSWORD = '123'
def main():
config = Configuration(BASE_URL, GENERATION_VERSION)
device = DevicesService(config, REGISTRATION__CODE)
device.register()
print(f'Device Name: {device.DeviceName}')
user = UsersService(device)
user.login(USERNAME, PASSWORD)
print(f'User Title: {user.UserTitle}')
item_service = ItemsService(user)
items = item_service.get_items()
print('Items:')
print(items)
if __name__ == '__main__':
main()