mirror of
https://github.com/ProtoThis/python-synology.git
synced 2026-01-19 09:28:42 +00:00
* API discovery (SYNO.API.Info) + use Exceptions - remove dsm_version - use SynologyDSMRequestException for failed requests * _discover_apis any time * simplify requests - Add api.request(api, method, params=None) * Add connection failed tests * Finalized ? * Fix SynologyDSMRequestException not beeing SynologyDSMException * Fix SynologyDSMAPINotExistsException not beeing SynologyDSMException * Add Virtual Machine Manager API documentation * Can get and post request - Add error handling by API code * Pylint * Add get + post tests + SynologyDSMAPIErrorException
24 lines
520 B
Python
24 lines
520 B
Python
"""DSM 6 SYNO.API.Auth data."""
|
|
from tests.const import (
|
|
SESSION_ID,
|
|
DEVICE_TOKEN,
|
|
SYNO_TOKEN,
|
|
ERROR_AUTH_OTP_NOT_SPECIFIED,
|
|
)
|
|
|
|
|
|
DSM_6_AUTH_LOGIN = {
|
|
"data": {"is_portal_port": False, "sid": SESSION_ID, "synotoken": SYNO_TOKEN},
|
|
"success": True,
|
|
}
|
|
DSM_6_AUTH_LOGIN_2SA = ERROR_AUTH_OTP_NOT_SPECIFIED
|
|
DSM_6_AUTH_LOGIN_2SA_OTP = {
|
|
"data": {
|
|
"did": DEVICE_TOKEN,
|
|
"is_portal_port": False,
|
|
"sid": SESSION_ID,
|
|
"synotoken": SYNO_TOKEN,
|
|
},
|
|
"success": True,
|
|
}
|