Skip to content

Commit

Permalink
docs: Make update-notification-settings use curl example system.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerkid committed Oct 21, 2019
1 parent bbf2474 commit f2242c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
17 changes: 2 additions & 15 deletions templates/zerver/api/update-notification-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,8 @@ per-stream notification settings.
{generate_code_example(python)|/settings/notifications:patch|example}

{tab|curl}
``` curl
curl -X PATCH {{ api_url }}/v1/settings/notifications \
-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"
```

{generate_code_example(curl, include=["enable_offline_push_notifications", "enable_online_push_notifications"])|/settings/notifications:patch|example}

{end_tabs}

Expand Down
1 change: 1 addition & 0 deletions tools/linter_lib/custom_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@
"templates/zerver/api/incoming-webhooks-walkthrough.md",
# This macro has a long indented URL
"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
"README.md",
"docs/overview/readme.md",
Expand Down
1 change: 1 addition & 0 deletions zerver/openapi/test_curl_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'remove-linkifiers.md',
# Endpoint does not accept bot requests
'get-user-groups.md',
'update-notification-settings.md',
# Example files do not exist
'upload-custom-emoji.md',
'upload-file.md',
Expand Down
1 change: 1 addition & 0 deletions zerver/openapi/zulip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,7 @@ paths:
description: Notification sound name.
schema:
type: string
format: json
example: ding
- name: enable_desktop_notifications
in: query
Expand Down

0 comments on commit f2242c1

Please sign in to comment.