except: print('Error! Please provide Email Account. ') exit(0) try: password = argv[2] except: print('Error! Please provide Passsword. ') exit(0) try: voice.login(email, password) except: print('Error! Login failed. ') exit(0) try: command = argv[3] except: print('Error! Please provide COMMAND. ') voice.logout() exit(0) data = voice.all() if command == "SETTING": print json.dumps(voice.settings, indent=4, default=str) if command == "PHONES": print json.dumps(voice.phones, indent=4, default=str) if command == "UNREAD": print json.dumps(data.unreadCounts, indent=4, default=str) voice.logout()
try: command = argv[3] except: print ('Error! Please provide a phone number or FOLDER. ') voice.logout() exit(0) if command == "Inbox" : folder = voice.inbox().messages foundmsg = [ msg for msg in folder] elif command == "Messages" : folder = voice.sms().messages foundmsg = [ msg for msg in folder] elif command == "All" : voice.all() folder = voice.all.folder foundmsg = [ msg for msg in folder.messages] elif command == "Spam" : voice.spam() folder = voice.spam.folder foundmsg = [ msg for msg in folder.messages] elif command == "Trash" : voice.trash() folder = voice.trash.folder foundmsg = [ msg for msg in folder.messages] elif command == "Placed" : folder = voice.placed().messages foundmsg = [ msg for msg in folder] elif command == "Received" : voice.received()
exit(0) if command == "Inbox": folder = voice.inbox().messages foundmsg = [msg for msg in folder] elif command == "Voicemail": folder = voice.voicemail().messages foundmsg = [msg for msg in folder] elif command == "Recorded": folder = voice.recorded().messages foundmsg = [msg for msg in folder] elif command == "Messages": folder = voice.sms().messages foundmsg = [msg for msg in folder] elif command == "All": folder = voice.all().messages foundmsg = [msg for msg in folder] elif command == "Spam": folder = voice.spam().folder foundmsg = [msg for msg in folder.messages] elif command == "Trash": folder = voice.trash().folder foundmsg = [msg for msg in folder.messages] elif command == "Placed": folder = voice.placed().messages foundmsg = [msg for msg in folder] elif command == "Received": folder = voice.received().messages foundmsg = [msg for msg in folder] elif command == "Missed": folder = voice.missed().messages