Skip to content

Commit 2efdfaa

Browse files
committed
finish voice api, updating for release
1 parent c8e2f69 commit 2efdfaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+480
-91
lines changed

http_client/CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.3.0
2+
- Add new PUT method
3+
14
# 1.2.1
25
- Expose classes and errors at the package level
36

http_client/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[project]
22
name = "vonage-http-client"
3-
version = "1.2.1"
3+
version = "1.3.0"
44
description = "An HTTP client for making requests to Vonage APIs."
55
readme = "README.md"
66
authors = [{ name = "Vonage", email = "devrel@vonage.com" }]
77
requires-python = ">=3.8"
88
dependencies = [
9-
"vonage-utils>=1.0.1",
9+
"vonage-utils>=1.1.0",
1010
"vonage-jwt>=1.1.0",
1111
"requests>=2.27.0",
12+
"typing-extensions>=4.9.0",
1213
"pydantic>=2.6.1",
13-
"typing_extensions>=4.9.0",
1414
]
1515
classifiers = [
1616
"Programming Language :: Python",

messages/CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
# 1.1.0
2+
- Add `http_client` property
3+
14
# 1.0.0
25
- Initial upload

messages/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = 'vonage-messages'
3-
version = '1.0.0'
3+
version = '1.1.0'
44
description = 'Vonage messages package'
55
readme = "README.md"
66
authors = [{ name = "Vonage", email = "devrel@vonage.com" }]
77
requires-python = ">=3.8"
88
dependencies = [
9-
"vonage-http-client>=1.2.1",
10-
"vonage-utils>=1.0.1",
9+
"vonage-http-client>=1.3.0",
10+
"vonage-utils>=1.1.0",
1111
"pydantic>=2.6.1",
1212
]
1313
classifiers = [

messages/src/vonage_messages/messages.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ class Messages:
1717
def __init__(self, http_client: HttpClient) -> None:
1818
self._http_client = http_client
1919

20+
@property
21+
def http_client(self) -> HttpClient:
22+
"""The HTTP client used to make requests to the Messages API.
23+
24+
Returns:
25+
HttpClient: The HTTP client used to make requests to the Messages API.
26+
"""
27+
return self._http_client
28+
2029
@validate_call
2130
def send(self, message: BaseMessage) -> SendMessageResponse:
2231
"""Send a message using Vonage's Messages API.

messages/tests/test_messages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ def test_send_message_invalid_error():
7575

7676
assert e.value.response.status_code == 422
7777
assert e.value.response.json()['title'] == 'Invalid params'
78+
79+
80+
def test_http_client_property():
81+
http_client = HttpClient(get_mock_jwt_auth())
82+
messages = Messages(http_client)
83+
assert messages.http_client == http_client

number_insight_v2/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 0.1.0b0
2+
- Beta release

number_insight_v2/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[project]
22
name = 'vonage-number-insight-v2'
3-
version = '0.1.0'
3+
version = '0.1.0b0'
44
description = 'Vonage Number Insight v2 package'
55
readme = "README.md"
66
authors = [{ name = "Vonage", email = "devrel@vonage.com" }]
77
requires-python = ">=3.8"
88
dependencies = [
9-
"vonage-http-client>=1.0.0",
10-
"vonage-utils>=1.0.0",
9+
"vonage-http-client>=1.3.0",
10+
"vonage-utils>=1.1.0",
1111
"pydantic>=2.6.1",
1212
]
1313
classifiers = [

number_insight_v2/src/vonage_number_insight_v2/number_insight_v2.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ def __init__(self, http_client: HttpClient) -> None:
5959
self._http_client = deepcopy(http_client)
6060
self._auth_type = 'basic'
6161

62+
@property
63+
def http_client(self) -> HttpClient:
64+
"""The HTTP client used to make requests to the Number Insight V2 API.
65+
66+
Returns:
67+
HttpClient: The HTTP client used to make requests to the Number Insight V2 API.
68+
"""
69+
return self._http_client
70+
6271
@validate_call
6372
def fraud_check(self, request: FraudCheckRequest) -> FraudCheckResponse:
6473
"""Initiate a fraud check request."""

number_insight_v2/tests/test_number_insight_v2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,7 @@ def test_ni2_sim_swap_only():
9292
assert 'fraud_score' not in clear_response
9393
assert 'sim_swap' in clear_response
9494
assert 'reason' not in clear_response['sim_swap']
95+
96+
97+
def test_number_insight_v2_http_client():
98+
assert type(ni2.http_client) == HttpClient

0 commit comments

Comments
 (0)