Skip to content

Commit 148a382

Browse files
committed
updated CHANGES.md and README.md
1 parent af777b4 commit 148a382

File tree

2 files changed

+92
-134
lines changed

2 files changed

+92
-134
lines changed

CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
- Moved some client methods into their own classes: `account.py, application.py,
33
message_search.py, number_insight.py, numbers.py, short_codes.py, ussd.py`
44
- Deprecated the corresponding client methods. These will be removed in a major release that's coming soon.
5+
- Client now instantiates a class object for each API when it is created, e.g. `vonage.Client(key="mykey", secret="mysecret")`
6+
instantiates instances of `Account`, `Sms`, `NumberInsight` etc. These instances can now be called directly from `Client`, e.g.
7+
```
8+
client = vonage.Client(key="mykey", secret="mysecret")
9+
10+
print(f"Account balance is: {client.account.get_balance()}")
11+
12+
print("Sending an SMS")
13+
client.sms.send_message(
14+
"from": "Vonage",
15+
"to": "SOME_PHONE_NUMBER",
16+
"text": "Hello from Vonage's SMS API"
17+
)
18+
19+
```
520

621
# 2.6.x
722

0 commit comments

Comments
 (0)