Replies: 1 comment 1 reply
-
Something like this? (Untested code, this will delete all SMS): #!/usr/bin/env python3
"""
python3 delete_sms_list.py http://admin:[email protected]/
"""
from argparse import ArgumentParser
from huawei_lte_api.Connection import Connection
from huawei_lte_api.Client import Client
from huawei_lte_api.enums.client import ResponseEnum
parser = ArgumentParser()
parser.add_argument('url', type=str)
parser.add_argument('--username', type=str)
parser.add_argument('--password', type=str)
args = parser.parse_args()
with Connection(args.url, username=args.username, password=args.password) as connection:
client = Client(connection)
for message in client.sms.get_messages(): # See Sms.get_messages() for filtering options
print('Deleting message {}'.format(message.index))
client.sms.delete_sms(message.index) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please, how to delete SMS list?
Can you give an example?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions