Skip to content

Added Octopush Support#622

Open
caronc wants to merge 2 commits intomasterfrom
octopush-support
Open

Added Octopush Support#622
caronc wants to merge 2 commits intomasterfrom
octopush-support

Conversation

@caronc
Copy link
Copy Markdown
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

  • docs: Added Octopush support apprise-docs#42
  • apprise/plugins/octopush.py
  • KEYWORDS updated in pyproject.toml
  • 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
Copy Markdown
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
Copy Markdown

codecov-commenter commented Jul 3, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (58d0f1e) to head (3c9ccfd).

Additional details and impacted files
@@            Coverage Diff             @@
##            master      #622    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          202       203     +1     
  Lines        27591     27736   +145     
  Branches      4533      4557    +24     
==========================================
+ Hits         27591     27736   +145     
Files with missing lines Coverage Δ
apprise/plugins/octopush.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Octopush notification backend to Apprise (including URL syntax support, batching options, and related documentation/packaging updates).

Changes:

  • Introduces NotifyOctopush plugin implementing Octopush SMS delivery (URL parsing, batching, replies, purpose/type options).
  • Adds comprehensive unit tests covering URL parsing/validation and batching behavior.
  • Updates user-facing and packaging metadata to list Octopush as a supported service.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
apprise/plugins/octopush.py New Octopush notification plugin implementation (parsing, payload creation, request/response handling, batching).
tests/test_plugin_octopush.py New test suite validating URL handling, parameter parsing, request payloads, and batch splitting.
README.md Adds Octopush to the supported services table with example URL formats.
packaging/redhat/python-apprise.spec Updates RPM description list to include Octopush.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants