Skip to content

Commit

Permalink
Merge pull request #24 from infobip/ib-tjuhasz/python-v5-release
Browse files Browse the repository at this point in the history
5.0.0 release
  • Loading branch information
ib-tjuhasz authored Dec 23, 2024
2 parents 0c297b0 + f50ef4a commit a6803de
Show file tree
Hide file tree
Showing 522 changed files with 53,673 additions and 7,966 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
45 changes: 39 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,48 @@ All notable changes to the library will be documented in this file.
The format of the file is based on [Keep a Changelog](http://keepachangelog.com/)
and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file.

## [Unreleased]
## [ [5.0.0](https://github.com/infobip/infobip-api-python-client/releases/tag/5.0.0) ] - 2024-12-23

⚠ IMPORTANT NOTE: From this point onward Python 3.7 is no longer supported. The minimum supported version is Python 3.8 due to dependency updates.
🎉 **NEW Major Version of `infobip-api-python-client`.**

⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.
All changes, including breaking changes, are addressed and explained in the list bellow.
If you find out that something was not addressed properly, please submit an issue.

From this point onward Python 3.7 is no longer supported. The minimum supported version is Python 3.8 due to dependency updates.

### Added
- `calls.md` which contains examples and explanations for the Calls API.
- `build.yml` workflow to ensure project build and test integrity.
- `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
- `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.
* Most recent feature set for:
* [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms)
* Introduced `/sms/3/messages (V3)` replacing the `/sms/2/text/advanced (V2)` and `/sms/2/binary/advanced (V2)` endpoints.
* Introduced `/sms/3/reports (V3)` replacing `/sms/1/reports (V1)` endpoint.
* Introduced `/sms/3/logs (V3)` replacing `/sms/1/logs (V1)` endpoint.
* [Infobip 2FA](https://www.infobip.com/docs/api/platform/2fa)
* [Infobip Voice API](https://www.infobip.com/docs/api/channels/voice)
* Support for:
* [Infobip Moments API](https://www.infobip.com/docs/api/customer-engagement/moments).
* [Infobip Email API](https://www.infobip.com/docs/api/channels/email)
* `calls.md` which contains examples and explanations for the Calls API.
* `build.yml` workflow to ensure project build and test integrity.
* `snyk.yml` workflow, which serves the purpose of identifying and addressing dependency vulnerabilities in the project.
* `sonar.yml` workflow to analyze the source code, enhancing code quality and maintainability.

### Changed
* **Fixes and changes**
* Across all voice models, the 'applicationId' field has been removed and replaced with the `platform` field, as it better reflects the state of the endpoint.
* Introduced the new [sms_message](infobip_api_client/models/sms_message.py) class to replace `sms_textual_message` and `sms_binary_message`, providing a unified structure for SMS messaging.
* Added a content field within `sms_message` to define the message content. This supports both textual and binary messages, which can be created using [sms_text_content](infobip_api_client/models/sms_text_content.py) or [sms_binary_content](infobip_api_client/models/sms_binary_content.py), respectively.
* Unified request classes by replacing `sms_advaned_textual_request` and `sms_advaned_binary_request` with the new [sms_request](infobip_api_client/models/sms_request.py) class.
* Consolidated sending functions: use `send_sms_messages` instead of the `send_sms_message` and `send_binary_sms_message` functions.
* Removed delivery time window configuration classes (`sms_delivery_time_window`, `call_routing_allowed_time_window`, `calls_delivery_time_window`, `calls_time_window`) in favor of a unified class: [delivery_time_window](infobip_api_client/models/delivery_time_window.py)
* Removed delivery time configuration classes (`sms_delivery_time_to`, `sms_delivery_time_from`, `calls_time_windows_point`, `call_routing_allowed_time_from`, `call_routing_allowed_time_to`) in favor of a unified class: [delivery_time](infobip_api_client/models/delivery_time.py)
* Removed URL options configuration class (`sms_url_options`) in favor of a unified class: [url_options](infobip_api_client/models/url_options.py)
* Removed TurkeyIys options configuration class (`sms_turkey_iys_options`) in favor of a unified class: [turkey_iys_options](infobip_api_client/models/turkey_iys_options.py)
* Removed delivery day enumeration classes (`sms_delivery_day`, `calls_delivery_day`, `call_routing_allowed_day`) in favor of a unified class: [delivery_day](infobip_api_client/models/delivery_day.py)
* Removed speed limit time unit enumeration class (`sms_speed_limit_time_unit`) in favor of a unified class: [speed_limit_time_unit](infobip_api_client/models/speed_limit_time_unit.py)
* Renamed class from `calls_public_conference_recording` to `calls_conference_recording`.
* Renamed class from `calls_pegasus_provider` to `calls_provider`.
* Renamed class from `calls_pegasus_provider_trunk_type` to `calls_provider_trunk_type`.

### Security
- Bumped werkzeug dependency from `2.1.2` to `3.0.3`.
Expand Down
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from infobip_api_client import SmsMessageContent

# Infobip API Python Client

<img src="https://cdn-web.infobip.com/uploads/2023/01/Infobip-logo.svg" height="93px" alt="Infobip" />
Expand All @@ -24,19 +26,17 @@ We use [OpenAPI Generator](https://openapi-generator.tech/) to generate the pack
Detailed documentation about Infobip API can be found here. The current version of this library includes this subset of Infobip products:

* [SMS](https://www.infobip.com/docs/api/channels/sms)
* [SMS Messaging](https://www.infobip.com/docs/api/channels/sms/sms-messaging)
* [2FA](https://www.infobip.com/docs/api/channels/sms/2fa)
* [2FA](https://www.infobip.com/docs/api/platform/2fa)
* [Voice](https://www.infobip.com/docs/api/channels/voice)
* [Calls](https://www.infobip.com/docs/api/channels/voice/calls)
* [Click To Call](https://www.infobip.com/docs/api/channels/voice/click-to-call)
* [Call Routing](https://www.infobip.com/docs/api/channels/voice/routing)
* [Moments](https://www.infobip.com/docs/api/customer-engagement/moments).
* [Email](https://www.infobip.com/docs/api/channels/email)

## General Info
For `infobip-api-python-client` versioning we use [Semantic Versioning][semver] scheme.

Published under [MIT License][license].

Python 3.7 is minimum supported version by this library.
Python 3.8 is minimum supported version by this library.

## Installation
Pull the library by using the following command:
Expand Down Expand Up @@ -78,23 +78,23 @@ Here's a basic example of sending the SMS message.
from infobip_api_client.models import SmsAdvancedTextualRequest, SmsTextualMessage, SmsDestination, SmsResponse
from infobip_api_client.api.sms_api import SmsApi

sms_request = SmsAdvancedTextualRequest(
sms_request = SmsRequest(
messages=[
SmsTextualMessage(
SmsMessage(
destinations=[
SmsDestination(
to="41793026727",
),
],
_from="SMSInfo",
text="This is a dummy SMS message sent using Python library",
sender="InfoSMS",
content=SmsMessageContent(actual_instance=SmsTextContent(text="This is a dummy SMS message sent using Python library"))
)
]
)

api_instance = SmsApi(api_client)

api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
print(api_response)
```

Expand All @@ -103,15 +103,15 @@ To make your code more robust send the message in try block and handle the `ApiE
from infobip_api_client.exceptions import ApiException

try:
api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
except ApiException as ex:
print("Error occurred while trying to send SMS message.")
```

In case of failure you can inspect the `ApiException` for more information.
```python
try:
api_response: SmsResponse = api_instance.send_sms_message(sms_advanced_textual_request=sms_request)
api_response: SmsResponse = api_instance.send_sms_messages(sms_request=sms_request)
except ApiException as ex:
print("Error occurred while trying to send SMS message.")
print("Error status: %s\n" % ex.status)
Expand Down Expand Up @@ -198,12 +198,14 @@ For Calls quick start guide please check [these_examples](calls.md)

## Ask for help

Feel free to open issues on the repository for any issue or feature request. As per pull requests, for details check the `CONTRIBUTING` [file][contributing] related to it - in short, we will not merge any pull requests, this code is auto-generated.
Feel free to open issues on the repository for any encountered problem or feature request.

If you want to contribute to this library in any way, please follow the guidelines in [CONTRIBUTING][contributing] file.

If it's something that requires our imminent attention feel free to contact us @ [[email protected]](mailto:[email protected]).
For anything that requires our imminent attention, contact us @ [[email protected]](mailto:[email protected]).

[apidocs]: https://www.infobip.com/docs/api
[freetrial]: https://www.infobip.com/docs/freetrial
[freetrial]: https://www.infobip.com/docs/essentials/getting-started/free-trial
[signup]: https://www.infobip.com/signup
[semver]: https://semver.org
[license]: LICENSE
Expand Down
Loading

0 comments on commit a6803de

Please sign in to comment.