mirror of
https://github.com/caronc/apprise-api.git
synced 2024-12-12 18:00:51 +01:00
improved website examples to show attachments using curl
This commit is contained in:
parent
b1adfaf77b
commit
16be9da9d4
@ -115,6 +115,12 @@
|
||||
-F attach1=@Screenshot-1.png \<br/>
|
||||
-F attach2=@/my/path/to/Apprise.doc \<br/>
|
||||
http{% if request.is_secure %}s{% endif %}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/<em>{{key}}</em></code></pre>
|
||||
{% blocktrans %}Sends a notification to our endpoints with an attachment{% endblocktrans %}
|
||||
<pre><code class="bash">
|
||||
curl -X POST \<br/>
|
||||
-F "tag=all" \ <br/>
|
||||
-F "attach=https://raw.githubusercontent.com/caronc/apprise/master/apprise/assets/themes/default/apprise-logo.png" \ <br/>
|
||||
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/<em>{{key}}</em>"</code></pre>
|
||||
</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
|
@ -99,6 +99,11 @@
|
||||
-F attach2=@Screenshot-2.png \ <br/>
|
||||
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/"
|
||||
</code></pre>
|
||||
<pre><code class="bash">
|
||||
# {% blocktrans %}Send an web based file attachment to a <a href="https://github.com/caronc/apprise/wiki/Notify_discord" target="_blank">Discord</a> server:{% endblocktrans %}<br/>
|
||||
curl -X POST -F 'urls=discord://credentials' \<br/>
|
||||
-F "attach=https://raw.githubusercontent.com/caronc/apprise/master/apprise/assets/themes/default/apprise-logo.png" \ <br/>
|
||||
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/"</code></pre>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
@ -492,6 +497,12 @@
|
||||
-F "tag=all" \ <br/>
|
||||
-F "body=test body" \ <br/>
|
||||
-F "title=test title" \ <br/>
|
||||
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/<em>{{key}}</em>"</code></pre>
|
||||
<pre><code class="bash">
|
||||
# {% blocktrans %}Sends a notification to our endpoints with an attachment{% endblocktrans %}<br/>
|
||||
curl -X POST \<br/>
|
||||
-F "tag=all" \ <br/>
|
||||
-F "attach=https://raw.githubusercontent.com/caronc/apprise/master/apprise/assets/themes/default/apprise-logo.png" \ <br/>
|
||||
"{{request.scheme}}://{{request.META.HTTP_HOST}}{{BASE_URL}}/notify/<em>{{key}}</em>"</code></pre>
|
||||
<pre><code class="bash">
|
||||
# {% blocktrans %}Notifies all URLs assigned the <em>devops</em> tag{% endblocktrans %}<br/>
|
||||
|
@ -1043,11 +1043,9 @@ class NotifyTests(SimpleTestCase):
|
||||
|
||||
json_data = {
|
||||
'body': 'test message',
|
||||
'format': None,
|
||||
}
|
||||
|
||||
# Same results for any empty string:
|
||||
json_data['format'] = ''
|
||||
response = self.client.post(
|
||||
'/notify/{}'.format(key),
|
||||
data=json.dumps(json_data),
|
||||
|
@ -293,7 +293,6 @@ class StatelessNotifyTests(SimpleTestCase):
|
||||
assert response.status_code == 400
|
||||
assert mock_notify.call_count == 0
|
||||
|
||||
|
||||
@override_settings(APPRISE_RECURSION_MAX=1)
|
||||
@mock.patch('apprise.Apprise.notify')
|
||||
def test_stateless_notify_recursion(self, mock_notify):
|
||||
|
Loading…
Reference in New Issue
Block a user