Skip to content

Commit ab38801

Browse files
authored
Merge pull request #214 from maxkahan/2.x
Modularising code, deprecating old code, instantiating API classes from Client
2 parents d6b05ce + 148a382 commit ab38801

34 files changed

+1460
-801
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.6.4
2+
current_version = 2.7.0
33
commit = True
44
tag = False
55

CHANGES.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# 2.7.0
2+
- Moved some client methods into their own classes: `account.py, application.py,
3+
message_search.py, number_insight.py, numbers.py, short_codes.py, ussd.py`
4+
- 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+
```
20+
121
# 2.6.x
222

323
- Dropped support for Python 3.6 and below

0 commit comments

Comments
 (0)