docs: Make update-notification-settings use curl example system.

This commit is contained in:
Vishnu KS
2019-10-18 12:30:43 +05:30
parent bbf2474bd0
commit f2242c1487
4 changed files with 5 additions and 15 deletions

View File

@@ -14,21 +14,8 @@ per-stream notification settings.
{generate_code_example(python)|/settings/notifications:patch|example} {generate_code_example(python)|/settings/notifications:patch|example}
{tab|curl} {tab|curl}
``` curl
curl -X PATCH {{ api_url }}/v1/settings/notifications \ {generate_code_example(curl, include=["enable_offline_push_notifications", "enable_online_push_notifications"])|/settings/notifications:patch|example}
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
-d "enable_stream_desktop_notifications=true" \
-d "enable_stream_email_notifications=true" \
-d "enable_stream_push_notifications=true" \
-d "enable_stream_sounds=true" \
-d "enable_desktop_notifications=true" \
-d "enable_sounds=true" \
-d "enable_offline_email_notifications=true" \
-d "enable_offline_push_notifications=true" \
-d "enable_online_push_notifications=true" \
-d "enable_digest_emails=true" \
-d "message_content_in_email_notifications=true"
```
{end_tabs} {end_tabs}

View File

@@ -782,6 +782,7 @@ markdown_docs_length_exclude = {
"templates/zerver/api/incoming-webhooks-walkthrough.md", "templates/zerver/api/incoming-webhooks-walkthrough.md",
# This macro has a long indented URL # This macro has a long indented URL
"templates/zerver/help/include/git-webhook-url-with-branches-indented.md", "templates/zerver/help/include/git-webhook-url-with-branches-indented.md",
"templates/zerver/api/update-notification-settings.md",
# These two are the same file and have some too-long lines for GitHub badges # These two are the same file and have some too-long lines for GitHub badges
"README.md", "README.md",
"docs/overview/readme.md", "docs/overview/readme.md",

View File

@@ -36,6 +36,7 @@ exclude_list = [
'remove-linkifiers.md', 'remove-linkifiers.md',
# Endpoint does not accept bot requests # Endpoint does not accept bot requests
'get-user-groups.md', 'get-user-groups.md',
'update-notification-settings.md',
# Example files do not exist # Example files do not exist
'upload-custom-emoji.md', 'upload-custom-emoji.md',
'upload-file.md', 'upload-file.md',

View File

@@ -2185,6 +2185,7 @@ paths:
description: Notification sound name. description: Notification sound name.
schema: schema:
type: string type: string
format: json
example: ding example: ding
- name: enable_desktop_notifications - name: enable_desktop_notifications
in: query in: query