Items¶
Base¶
- class terminusgps.wialon.items.base.WialonObject(session: WialonSession, id: int | str | None = None)[source]¶
Base class for Wialon objects in a Wialon session.
Public Methods:
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
- abstractmethod create(*args, **kwargs) dict[str, str] [source]¶
Creates the object in Wialon and sets its id.
- delete_afield(id: int | str) dict[str, str] [source]¶
Deletes an admin field by id in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon object id wasn’t set.
ValueError – If
id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- delete_cfield(id: int | str) dict[str, str] [source]¶
Deletes a custom field by id in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon object id wasn’t set.
ValueError – If
id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- get_afields() list[dict[str, str]] [source]¶
Returns a list of admin field dictionaries from Wialon.
- Raises:
AssertionError – If the Wialon object id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A list of admin field dictionaries.
- Return type:
- get_cfields() list[dict[str, str]] [source]¶
Returns a list of custom field dictionaries from Wialon.
- Raises:
AssertionError – If the Wialon object id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A list of admin field dictionaries.
- Return type:
- log_action(action: WialonLogAction, new_value: str, old_value: str) dict[str, str] [source]¶
Creates a log record for the Wialon object.
- set_afield(key: str, value: str, id: int | str | None = None) dict[str, str] [source]¶
Sets an admin field in Wialon.
If
id
isn’t provided, a new admin field is created.- Parameters:
- Raises:
AssertionError – If the Wialon object id wasn’t set.
ValueError – If
id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An admin field dictionary.
- Return type:
- set_cfield(key: str, value: str, id: int | str | None = None) dict[str, str] [source]¶
Sets a custom field in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon object id wasn’t set.
ValueError – If
id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A custom field dictionary.
- Return type:
- set_pfield(key: str, value: str) dict[str, str] [source]¶
Sets a profile field for the object in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon object id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A profile field dictionary.
- Return type:
- property session: WialonSession¶
Wialon object API session.
Factories¶
- class terminusgps.wialon.items.factory.WialonObjectFactory(session: WialonSession)[source]¶
Creates and retrieves Wialon objects from Wialon.
Public Methods:
__init__
(session)create
()Creates a Wialon object in Wialon and returns its Python equivalent.
get
()Retrieves a Wialon object from Wialon and returns its Python equivalent.
Private Methods:
_get_wialon_cls
(items_type)_create_wialon_obj
(cls, *args, **kwargs)_retrieve_wialon_obj
(cls, id)
Wialon objects¶
- class terminusgps.wialon.items.account.WialonAccount(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon account.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(resource_id, billing_plan)Creates the account in Wialon and sets its id.
delete
([reasons])Deletes the account in Wialon.
activate
()Enables the account in Wialon.
Disables the account in Wialon.
do_payment
(balance_update, days_update, ...)Makes an account payment in Wialon.
set_dealer_rights
(enabled)Enables or disables the account's dealer rights in Wialon.
set_flags
(flags[, block_balance, deny_balance])Sets settings flags for the account in Wialon.
set_plan
(name)Sets the account's billing plan to
name
.set_minimum_days
(days)Sets the account's minimum days to
days
in Wialon.get_data
([response_type])Returns account data from Wialon.
Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- activate() dict[str, str] [source]¶
Enables the account in Wialon.
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- create(resource_id: int | str, billing_plan: str) dict[str, str] [source]¶
Creates the account in Wialon and sets its id.
- Parameters:
resource_id – A Wialon resource id.
billing_plan (str) – A Wialon account billing plan.
- Raises:
ValueError – If
resource_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- deactivate() dict[str, str] [source]¶
Disables the account in Wialon.
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- delete(reasons: Collection[str] | None = None) dict[str, str] [source]¶
Deletes the account in Wialon.
- Parameters:
reasons (Collection[str] | None) – An optional collection of reason strings. Default is
None
.- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- do_payment(balance_update: Decimal, days_update: int, description: str) dict[str, str] [source]¶
Makes an account payment in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- get_data(response_type: int = 1) dict[str, str] [source]¶
Returns account data from Wialon.
- Parameters:
response_type (int) – A response flag integer. Default is
1
.- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary containing the account’s data from Wialon.
- Return type:
- set_dealer_rights(enabled: bool) dict[str, str] [source]¶
Enables or disables the account’s dealer rights in Wialon.
- Parameters:
enabled (bool) – Whether to set the account as a dealer or not.
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- set_flags(flags: int, block_balance: Decimal = Decimal('0.00'), deny_balance: Decimal = Decimal('0.00')) dict[str, str] [source]¶
Sets settings flags for the account in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- set_minimum_days(days: int) dict[str, str] [source]¶
Sets the account’s minimum days to
days
in Wialon.- Parameters:
days (int) – Minimum number of days as an integer.
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- set_plan(name: str) dict[str, str] [source]¶
Sets the account’s billing plan to
name
.- Parameters:
name (str) – A Wialon billing plan name.
- Raises:
AssertionError – If the Wialon account id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- class terminusgps.wialon.items.resource.WialonResource(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon resource/account.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(creator_id, name[, skip_creator_check])Creates the resource in Wialon and sets its id.
get_notification_data
([notification_ids])Returns the resource's notification data by id(s).
get_driver_bindings
(start, stop[, unit_id, ...])Returns the resource's bound drivers from
start
tostop
.get_creator_id
()Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- create(creator_id: int | str, name: str, skip_creator_check: bool = False) dict[str, str] [source]¶
Creates the resource in Wialon and sets its id.
- Parameters:
- Raises:
ValueError – If
creator_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- get_driver_bindings(start: datetime, stop: datetime, unit_id: int | str = 0, driver_id: int | str = 0) dict[str, str] [source]¶
Returns the resource’s bound drivers from
start
tostop
.- Parameters:
- Raises:
AssertionError – If the Wialon resource id wasn’t set.
ValueError – If
unit_id
wasn’t a digit.ValueError – If
driver_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary of Wialon drivers.
- Return type:
- get_notification_data(notification_ids: Collection[int] | None = None) dict[str, str] [source]¶
Returns the resource’s notification data by id(s).
Returns all notification data if
notification_ids
isNone
.- Parameters:
notification_ids (Collection[int] | None) – An optional collection of notification ids. Default is
None
.- Raises:
AssertionError – If the Wialon resource id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary of notification data.
- Return type:
- class terminusgps.wialon.items.retranslator.WialonRetranslator(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon retranslator.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(creator_id, name, config)Creates the retranslator in Wialon and sets its id.
Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- create(creator_id: int | str, name: str, config: str) dict[str, str] [source]¶
Creates the retranslator in Wialon and sets its id.
- Parameters:
- Raises:
ValueError – If
creator_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- class terminusgps.wialon.items.route.WialonRoute(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon route.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(creator_id, name)Creates the route in Wialon and sets its id.
Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- create(creator_id: str | int, name: str) dict[str, str] [source]¶
Creates the route in Wialon and sets its id.
- Parameters:
- Raises:
ValueError – If
creator_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- class terminusgps.wialon.items.unit.WialonUnit(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon unit.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(creator_id, name, hw_type_id)Creates the unit in Wialon and sets its id.
activate
()Activates the unit in Wialon.
Deactivates the unit in Wialon.
execute_command
(command_name[, link_type, ...])Executes a unit command in Wialon.
get_command_definitions
([command_ids])Returns the unit's command definition data by id(s).
get_imei
()Returns the IMEI (sys_unique_id) for the unit.
Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- activate() dict[str, str] [source]¶
Activates the unit in Wialon.
- Raises:
AssertionError – If the Wialon unit id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary with the unit’s current status.
- Return type:
- create(creator_id: int | str, name: str, hw_type_id: int | str) dict[str, str] [source]¶
Creates the unit in Wialon and sets its id.
- Parameters:
- Raises:
ValueError – If
creator_id
wasn’t a digit.ValueError – If
hw_type_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- deactivate() dict[str, str] [source]¶
Deactivates the unit in Wialon.
- Raises:
AssertionError – If the Wialon unit id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary with the unit’s current status.
- Return type:
- execute_command(command_name: str, link_type: str = 'vrt', parameters: str = '', timeout: int = 300, flags: int = 0) dict[str, str] [source]¶
Executes a unit command in Wialon.
- Parameters:
command_name (str) – Name of the command.
link_type (str) – Link type to send the command with. Default is
"vrt"
.parameters (str) – Additional command execution parameters. Default is
""
.timeout (int) – How long (in seconds) before timing out the command execution. Default is
300
.flags (int) – Command execution flags. Default is
0
.
- Raises:
AssertionError – If the Wialon unit id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- get_command_definitions(command_ids: Collection[int] | None = None) dict[str, str] [source]¶
Returns the unit’s command definition data by id(s).
Returns all command definition data if
command_ids
isNone
.- Parameters:
command_ids (Collection[int] | None) – An optional collection of command ids. Default is
None
.- Raises:
AssertionError – If the Wialon unit id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary of command definition data.
- Return type:
- class terminusgps.wialon.items.unit_group.WialonUnitGroup(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon unit group.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(creator_id, name)Creates the unit group in Wialon and sets its id.
update_units
(unit_ids)Sets the unit group's unit list in Wialon to
unit_ids
.Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- create(creator_id: int | str, name: str) dict[str, str] [source]¶
Creates the unit group in Wialon and sets its id.
- Parameters:
- Raises:
ValueError – If
creator_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- update_units(unit_ids: Collection[int]) dict[str, str] [source]¶
Sets the unit group’s unit list in Wialon to
unit_ids
.- Parameters:
unit_ids (Collection[int]) – A collection of Wialon unit ids.
- Raises:
AssertionError – If the Wialon unit group id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary containing the unit group’s new unit list.
- Return type:
- class terminusgps.wialon.items.user.WialonUser(session: WialonSession, id: int | str | None = None)[source]¶
A Wialon user.
Public Data Attributes:
Inherited from
WialonObject
Wialon object API session.
Wialon object id.
Public Methods:
create
(creator_id, name, password)Creates the user in Wialon and sets its id.
get_access
(object_type[, direct, flags])Returns a dictionary of Wialon objects the user has access to.
set_access
(obj, access_mask)Sets the user's access to
obj
according toaccess_mask
in Wialon.set_flags
(flags, flags_mask)Sets the user settings flags in Wialon.
set_password
(old_password, new_password)Sets the user's password to
new_password
in Wialon.Inherited from
WialonObject
__init__
(session[, id])Sets the Wialon object's session and id.
__str__
()Returns the Wialon object id as a string.
__repr__
()Returns the Wialon object type and parameters used to initialize it.
create
(*args, **kwargs)Creates the object in Wialon and sets its id.
delete
()Deletes the object in Wialon.
set_name
(name)Sets the object's name in Wialon.
get_name
()Gets and returns the object's name from Wialon.
log_action
(action, new_value, old_value)Creates a log record for the Wialon object.
Returns a list of admin field dictionaries from Wialon.
set_afield
(key, value[, id])Sets an admin field in Wialon.
delete_afield
(id)Deletes an admin field by id in Wialon.
Returns a list of custom field dictionaries from Wialon.
set_cfield
(key, value[, id])Sets a custom field in Wialon.
delete_cfield
(id)Deletes a custom field by id in Wialon.
set_pfield
(key, value)Sets a profile field for the object in Wialon.
Private Data Attributes:
_abc_impl
Inherited from
WialonObject
_abc_impl
Inherited from
ABC
_abc_impl
- create(creator_id: int | str, name: str, password: str) dict[str, str] [source]¶
Creates the user in Wialon and sets its id.
- Parameters:
- Raises:
ValueError – If
creator_id
wasn’t a digit.WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A Wialon object dictionary.
- Return type:
- get_access(object_type: str, direct: bool = True, flags: int = 1) dict[str, str] [source]¶
Returns a dictionary of Wialon objects the user has access to.
- Parameters:
- Raises:
AssertionError – If the Wialon user id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary of Wialon objects.
- Return type:
- set_access(obj: WialonObject, access_mask: int) dict[str, str] [source]¶
Sets the user’s access to
obj
according toaccess_mask
in Wialon.- Parameters:
obj (WialonObject) – A Wialon object.
access_mask (int) – A Wialon access mask integer.
- Raises:
AssertionError – If the Wialon user id wasn’t set.
ValueError – If the other Wialon object’s id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type:
- set_flags(flags: int, flags_mask: int) dict[str, str] [source]¶
Sets the user settings flags in Wialon.
- Parameters:
- Raises:
AssertionError – If the Wialon user id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
A dictionary containing the user’s new settings flags.
- Return type:
- set_password(old_password: str, new_password: str) dict[str, str] [source]¶
Sets the user’s password to
new_password
in Wialon.- Parameters:
- Raises:
AssertionError – If the Wialon user id wasn’t set.
WialonAPIError – If something went wrong calling the Wialon API.
- Returns:
An empty dictionary.
- Return type: