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

Attachment Support for JSON & XML Notifications #426

Merged
merged 1 commit into from
Aug 15, 2021

Conversation

caronc
Copy link
Owner

@caronc caronc commented Aug 15, 2021

Description:

Related issue (if applicable): #416

JSON and XML notifications now support attachments.

  • XML Schema Verification cleaned up (introducing variation v1.1 which supports attachment) as:
     <Attachments encoding="base64">
        <Attachment filename="apprise-test.gif" mimetype="image/gif">base64 encoded string</Attachment>
        <Attachment filename="apprise-test2.png" mimetype="image/png">base64 encoded string</Attachment>
     </Attachments>
  • JSON formatting just introduces a new attribute of type list to the already existing payload message:
    {
     <previous entries>
    "attachments": [
      {
        "filename": "apprise-test.gif",
        "mimetype": "image/gif",
        "base64": "base64 encoded string"
      },
      {
        "filename": "apprise-test2.png",
        "mimetype": "image/png",
        "base64": "base64 encoded string"
      }
    ]

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-commenter
Copy link

codecov-commenter commented Aug 15, 2021

Codecov Report

Merging #426 (6ec8062) into master (836b729) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #426   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           95        95           
  Lines        12083     12118   +35     
  Branches      2034      2040    +6     
=========================================
+ Hits         12083     12118   +35     
Impacted Files Coverage Δ
apprise/plugins/NotifyJSON.py 100.00% <100.00%> (ø)
apprise/plugins/NotifyXML.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 836b729...6ec8062. Read the comment docs.

@caronc caronc merged commit bb7c771 into master Aug 15, 2021
@caronc caronc deleted the 416-custom-notification-attachments branch September 19, 2021 03:52
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.

2 participants