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 Parse Platform Support #212

Merged
merged 2 commits into from
Oct 20, 2020
Merged

Added Parse Platform Support #212

merged 2 commits into from
Oct 20, 2020

Conversation

caronc
Copy link
Owner

@caronc caronc commented Mar 14, 2020

Description:

Related issue (if applicable): fixes #208

Syntax:

  • parsep://{app_id}:{master_key}@{hostname}
  • parseps://{app_id}:{master_key}@{hostname}

Note: parsep:// is for insecure (http://) where as parseps:// is for secure (https://) connections.

By default, it will notify both the ios and android configuration you have set up with the Parse Platform Setup. If you wish to override this and only notify one, you can use the device directive:

  • parsep://{app_id}:{master_key}@{hostname}?device=android
  • parsep://{app_id}:{master_key}@{hostname}?device=ios

There is no need to specify /parse/push in the pparse:// URL's as it is implied.

New Service Completion Status

  • apprise/plugins/NotifyParsePlatform.py
  • setup.py
    • add new service into the keywords section of the setup() declaration
  • 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

@codecov-io
Copy link

codecov-io commented Mar 14, 2020

Codecov Report

Merging #212 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #212   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           84        85    +1     
  Lines        10533     10625   +92     
  Branches      1759      1772   +13     
=========================================
+ Hits         10533     10625   +92     
Impacted Files Coverage Δ
apprise/plugins/NotifyParsePlatform.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6ce71c...db1df71. Read the comment docs.

@caronc caronc force-pushed the 208-parse-platform-support branch from 6c664a1 to 1838fec Compare March 16, 2020 00:30
@caronc caronc added the blocked Blocked due to missing information and/or an issue outside of this project. label Mar 30, 2020
@caronc
Copy link
Owner Author

caronc commented Mar 30, 2020

Blocked until the branch can be tested.
Ping @millette and @dplewis perhaps? 🙂

@millette
Copy link

millette commented Apr 1, 2020

Thanks @caronc - maybe @lord-aerion can help, since it was his comment that lead me to parse platform:

laurent22/joplin#15 (comment)

@lord-aerion
Copy link

I'm not sure I can be of much help as I'm not a developer. I have a Gihub account for other reasons. Getting into development is a pipe dream, really…

My comment re: Parse Server came from some research I'd done when trying to find an open source alternative to Google Firebase, which is often cited as a reason why certain projects (such as Joplin) can't be fully open sourced. This hinders adoption by F-Droid.

Testing, however, is something I'd be happy to assist with.

@caronc
Copy link
Owner Author

caronc commented Apr 1, 2020

# Create a virtual environment to work in
# This way you can just destroy it after when it's all over.
# It will create a directory called apprise
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install our branch:
pip install git+https://github.com/caronc/apprise.git@208-parse-platform-support

# Test'r out! :)
# Substitute {app_id} for your actual App ID
# Substitute {master_key} for your actual Master Key
# Substitute {hostname} for your actual Parse Platform Server you have installed
apprise -t "Title" -b "Body" parsep://{app_id}:{master_key}@{hostname}

# That will hopefully pass along notifications.

# Where apprise excels is you might not really want to put all of that
# information on your command line. It's a pain in the butt .. but
# you can also just create a configuration file and put it in there.
# Open up any text file at all (brand new one) and put this in it
# (obviously subbing out all credentials and hostname for your own):
# parsep://{app_id}:{master_key}@{hostname}

# Then test apprise:
apprise -t "Title" -b "Body" -c your_config_file_you_created.txt

If you place your config file in special spots, you don't even have to specify the config file. it will just be read in all the time. But for now you don't need to worry about that. If you can help pass along that it works (or doesn't); that would be absolutely awesome.

No pressure though of course! 🙂

@dplewis
Copy link

dplewis commented Apr 1, 2020

I’m free this weekend to test this PR.

@dplewis
Copy link

dplewis commented Oct 19, 2020

@caronc Sorry for the super late reply. I tried the branch out and it worked. I was able to send push notifications.

Thank you for taking time to implement this. I can do a separate PR to improve the payload. (deviceToken, pushType etc).

@caronc caronc removed the blocked Blocked due to missing information and/or an issue outside of this project. label Oct 19, 2020
@caronc caronc merged commit 54c3f6d into master Oct 20, 2020
@caronc
Copy link
Owner Author

caronc commented Oct 20, 2020

@dplewis no problem! Thank you for testing it; content is now merged into the master.

@caronc caronc deleted the 208-parse-platform-support branch October 21, 2020 00:18
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.

Parse Platform
5 participants