Skip to content

Commit 11625b8

Browse files
added phone number formatting
1 parent 972a101 commit 11625b8

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

README.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,46 +41,57 @@ from notify_mi import notify
4141
```python
4242
# send only a text message
4343
# include phone_number and phone_provider (see providers list below)
44+
# phone number: "(619) 123-4567", "619-123-4567", or "6191234567" (all acceptable)
4445
notify.send_message("Hello World!",
45-
("gmail", "password"),
46-
phone_number = "your_number",
47-
phone_provider= "your_phone_provider")
46+
("gmail", "password"),
47+
phone_number = "your_number",
48+
phone_provider= "your_phone_provider")
4849
```
4950

5051
###### Text + Email
5152
```python
5253
# send text message + email
5354
# include phone_number, phone_provider (see providers list below), and receiver email
55+
# phone number: "(619) 123-4567", "619-123-4567", or "6191234567" (all acceptable)
5456
notify.send_message("Hello World!",
55-
("gmail", "password"),
56-
phone_number = "your_number",
57-
phone_provider= "your_phone_provider",
58-
send_to = "email@gmail.com")
57+
("gmail", "password"),
58+
phone_number = "your_number",
59+
phone_provider= "your_phone_provider",
60+
send_to = "email@gmail.com")
5961
```
6062

6163
###### Email Only
6264
```python
6365
# send only email
6466
# include receiver email
6567
notify.send_message("Hello World!",
66-
("gmail", "password"),
67-
send_to = "email@gmail.com")
68+
("gmail", "password"),
69+
send_to = "email@gmail.com")
6870
```
6971

70-
###### Optional Parameters
72+
###### Other Parameters
7173
```python
7274
# add a subject line to the message
7375
notify.send_message(subject = "EMERGENCY",
74-
message = "No sweets detected in fridge!")
76+
message = "No sweets detected in fridge!")
7577

7678
# add a file attachment (69 file types supported)
7779
notify.send_message(subject = "I found it",
78-
message = "My dream car",
79-
file_attachment = "/path/car.png")
80+
message = "My dream car",
81+
file_attachment = "/path/car.png")
8082

8183
# run without blocking main thread
8284
notify.send_message("Hello World!",
83-
threaded = True)
85+
threaded = True)
86+
87+
# you can re-order any of the parameters
88+
notify.send_message(threaded = True,
89+
file_attachment = "/path/to/file"
90+
phone_number = "your_number",
91+
phone_provider = "your_phone_provider",
92+
send_to = "email@gmail.com",
93+
sender_credentials = ("gmail", "password"),
94+
message = "No sweets detected in fridge!")
8495
```
8596

8697
###### List of Phone Providers

0 commit comments

Comments
 (0)