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

Added Octopush Support #622

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added Octopush Support #622

wants to merge 3 commits into from

Conversation

caronc
Copy link
Owner

@caronc caronc commented Jul 3, 2022

Description:

Related issue (if applicable): n/a

Added Octopush support

You need to have an account with Octopush and generate/access your API key.

Syntax

Valid syntax is as follows:

  • octopush://{api_login}/{api_key}/{target_phone_no}
  • octopush://{sender}:{api_login}/{api_key}/{target_phone_no}
  • octopush://{api_login}/{api_key}/{target_phone_no1}/{target_phone_no2}/{target_phone_noN}
  • octopush://{sender}:{api_login}/{api_key}/{target_phone_no1}/{target_phone_no2}/{target_phone_noN}

Parameter Breakdown

Variable Required Description
api_login Yes This email address associated with your Octopush account
api_key Yes The API Key associated with your setup
sender No Provide the sender of the notification
type No Provide the message cost type. Possible values are sms_premium (which is the default if nothing is specified) or sms_low_cost
purpose No Provide the message/notification purpose; can be either alert (which is the default if not specified) or wholesale.
replies No Set to yes for getting back recipient replies; by default this is set to no
batch No Octopush allows support for a batch mode. If you identify more then one phone number, you can send all of the phone numbers you identify on the URL in a single shot instead of the normal Apprise approach (which sends them one by one). Enabling batch mode has both it's pro's and cons. By default batch mode is disabled.

New Service Completion Status

  • apprise/plugins/octopush.py
  • KEYWORDS
    • add new service into this file (alphabetically).
  • README.md
    • add entry for new service to table (as a quick reference)
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@octopush-support

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  "octopush://api_login/api_key/target_phoneno"

@caronc
Copy link
Owner Author

caronc commented Jul 3, 2022

This is ready to go; i just need someone who has an Octopush account to test this out for me! if they could let me know; that would be fantastic! 🚀

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.35%. Comparing base (98fb486) to head (fb0e0aa).

Additional details and impacted files
@@           Coverage Diff            @@
##           master     #622    +/-   ##
========================================
  Coverage   99.35%   99.35%            
========================================
  Files         146      147     +1     
  Lines       20219    20359   +140     
  Branches     3966     3993    +27     
========================================
+ Hits        20088    20228   +140     
  Misses        121      121            
  Partials       10       10            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

2 participants