Skip to content

Commit

Permalink
Merge pull request #214 from maxkahan/2.x
Browse files Browse the repository at this point in the history
Modularising code, deprecating old code, instantiating API classes from Client
  • Loading branch information
maxkahan committed May 26, 2022
2 parents d6b05ce + 148a382 commit ab38801
Show file tree
Hide file tree
Showing 34 changed files with 1,460 additions and 801 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.6.4
current_version = 2.7.0
commit = True
tag = False

Expand Down
20 changes: 20 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# 2.7.0
- Moved some client methods into their own classes: `account.py, application.py,
message_search.py, number_insight.py, numbers.py, short_codes.py, ussd.py`
- Deprecated the corresponding client methods. These will be removed in a major release that's coming soon.
- Client now instantiates a class object for each API when it is created, e.g. `vonage.Client(key="mykey", secret="mysecret")`
instantiates instances of `Account`, `Sms`, `NumberInsight` etc. These instances can now be called directly from `Client`, e.g.
```
client = vonage.Client(key="mykey", secret="mysecret")
print(f"Account balance is: {client.account.get_balance()}")
print("Sending an SMS")
client.sms.send_message(
"from": "Vonage",
"to": "SOME_PHONE_NUMBER",
"text": "Hello from Vonage's SMS API"
)
```

# 2.6.x

- Dropped support for Python 3.6 and below
Expand Down
Loading

0 comments on commit ab38801

Please sign in to comment.