Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Sms77api.py #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

abao168899
Copy link

This pull request includes a significant change to the Sms77api.py file, specifically the addition of a new method for sending bulk SMS messages. The most important changes include the removal of two helper functions and the addition of the bulk_sms method.

New functionality:

  • src/sms77api/Sms77api.py: Added the bulk_sms method to send multiple SMS messages in a single call. This method iterates over a list of messages, validates each message, and sends it using the existing sms method.

Code cleanup:

  • src/sms77api/Sms77api.py: Removed the expect_json helper function, which was used to determine if a request should expect a JSON response.
  • src/sms77api/Sms77api.py: Removed the local_params helper function, which was used to clean up local parameters.Send SMS in bulk

Send SMS in bulk
@abao168899
Copy link
Author

This pull request introduces a significant new feature to the Sms77api class by adding a method for sending bulk SMS messages. Additionally, it removes two utility functions that are no longer needed. Below are the most important changes:

New Features:

  • Added the bulk_sms method to the Sms77api class, which allows sending multiple SMS messages in a single call. This method takes a list of messages and an optional dictionary of parameters. Each message must contain 'to' and 'text' fields. (src/sms77api/Sms77api.py)

Code Cleanup:

  • Removed the expect_json function, which was used to determine if the response should be in JSON format based on the endpoint and parameters. (src/sms77api/Sms77api.py)
  • Removed the local_params function, which was used to filter out the 'self' parameter from the local variables dictionary. (src/sms77api/Sms77api.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant