login_api.py 268 B

12345678910
  1. from common import config
  2. from common.util import req_api
  3. class LoginApi:
  4. def __init__(self):
  5. pass
  6. def login(self):
  7. return req_api(f'{config.DCIM_BASE_URL}/rest/openapi/sm/session', data={'userid': config.USERNAME, 'value': config.PASSWORD})