Conversation
9567ce4 to
78711a8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1323 +/- ##
==========================================
+ Coverage 99.38% 99.40% +0.01%
==========================================
Files 162 165 +3
Lines 21160 21848 +688
Branches 3804 3901 +97
==========================================
+ Hits 21029 21717 +688
Misses 121 121
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e17d37f to
aa64c02
Compare
f2cdbd3 to
ca27daf
Compare
ca27daf to
e8b8d76
Compare
Contributor
|
@caronc Nice work thanks! |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Related issue (if applicable): #1009
This is very much a work in progress
Account Setup
Vapid/WebPush requires a
subscriptions.jsonfile that identifies all of the users you wish to notify and aprivate_key.pemSyntax:
vapid://subscription_id/vapid://subscription_id/targetvapid://subscription_id/target1/target2/targetN/Parameter Breakdown
private keyinPEMformat belonging to the account associated with thesubscription_idsubscriptions.jsonfile identifying the configuration you wish to reference.chrome). Possible values arechrome,firefox,edge, andopera. This just simplifies the upstream source that is used when the notification is sent.Mode Table:
You will see a lot of duplication (many modes pointing to the same location). The idea is if the end points change, we will update it inside Apprise so your code/URL will not have to change later.
https://fcm.googleapis.com/fcm/sendhttps://updates.push.services.mozilla.com/wpush/v1https://fcm.googleapis.com/fcm/sendhttps://fcm.googleapis.com/fcm/sendhttps://web.push.apple.com'https://fcm.googleapis.com/fcm/sendhttps://fcm.googleapis.com/fcm/sendhttps://fcm.googleapis.com/fcm/sendsubscriptions.json Setup
In order to use Vapid, you must have a
subscriptions.jsonfile that it can point to. The Vapid plugin supports the 2 following formats:abc123{ "endpoint": "https://fcm.googleapis.com/fcm/send/abc123", "keys": { "p256dh": "BNcW4oA7zq5H9TKIrA3XfKclN2fX9P_7NR...", "auth": "k9Xzm43nBGo=", } }name1andname2{ "name1": { "endpoint": "https://fcm.googleapis.com/fcm/send/...", "keys": { "p256dh": "BNcW4oA7zq5H9TKIrA3XfKclN2fX9P_7NR...", "auth": "k9Xzm43nBGo=", } }, "name2": { "endpoint": "https://fcm.googleapis.com/fcm/send/...", "keys": { "p256dh": "BNcW4oA7zq5H9TKIrA3XfKclN2fX9P_7NR...", "auth": "k9Xzm43nBGo=", } }It is though targets that you notify one or more endpoints. If you're using persistent storage with Apprise, you can simply manage your
subscription.jsonfile located here and your URL can stay clean. Alternatively, you can specify?subfile=on your URL and point it to a subscription file you wish to load. The location can be local to the filesystem as well as a remote location (such assubfile=https://user:pass@myhost/special/location/subscription.jsonIf no target is specified on your URL, then a target that matches your own
subscriberidis looked up in thesubcriptions.jsonfilePrivate Key (PEM) Setup
Similar to the
subscription.json, you need to point to aprivate_key.pemfile. If you are using Apprise persisent storage, you can place the file here. Alternatively you can specify?keyfile=on the URL and point it to a local or remote file you wish to use.Persistent Storage Tips
The following command will list all of the persistent storage locations associated with your configuration:
Simply locate the ID associated with the Vapid account you wish to update; consider that the directory ID's can be found as:
%APPDATA%/Apprise/cache~/.local/share/apprise/cacheFor more details on this; see here.
Apprise URL Construction
This is a more complicated plugin to work with since it requires a binary PEM private key and a
subscription.jsonfile as well. It would be advised to use a Apprise Configuration YAML file that looks like this:Remember that both the
keyfileandsubfilecan be URLs as well (even ones protected behind user/passwords such as:If you do not define a keyfile and/or a subfile, the rules above apply as documented above and default ones are looked upon in your persistent storage directory.
New Service Completion Status
%global common_descriptionChecklist
flake8)Testing
Anyone can help test this source code as follows: