-
Notifications
You must be signed in to change notification settings - Fork 42
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
add batch push publish docs #2480
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great thanks for this, a few comments. I think we also need to include something about:
- What the response looks like, especially for partially failed requests, similar to https://ably-docs-batch-push-qfok2100v.herokuapp.com/docs/api/rest-api?lang=javascript#batch-publish
- Supported parameters or options as in https://ably-docs-batch-push-qfok2100v.herokuapp.com/docs/api/rest-api?lang=javascript#push-publish
- What the limit is per request
@@ -1226,3 +1226,54 @@ final message = Message(name: 'name', data: 'data', extras: extras); | |||
channel = rest.channels.get('pushenabled:foo'); | |||
channel.publish(message); | |||
``` | |||
|
|||
|
|||
h2(#via-batch-push-api). Publish via batch push API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this heading should be a nested header under the "Publish directly" section, as this relates to direct publishing
|
||
h2(#via-batch-push-api). Publish via batch push API | ||
|
||
The batch push API allows you to publish push notifications to multiple devices or browsers in a single request. This is useful for when you need to send a large number of push notifications on an ad-hoc basis (ie when using push channel subscriptions is not practical). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The batch push API allows you to publish push notifications to multiple devices or browsers in a single request. This is useful for when you need to send a large number of push notifications on an ad-hoc basis (ie when using push channel subscriptions is not practical). | |
The batch push API allows you to publish push notifications to multiple devices or browsers in a single request. This is useful when you need to send a large number of distinct push notifications to multiple recipients. If you are publishing the same notification to multiple recipients, prefer publishing "via channels":#via-channels. |
The following example shows how to publish multiple push notifications in one request using the batch API with the generic REST SDK @request@ method: | ||
|
||
```[rest_javascript] | ||
await rest.request('POST', '/push/admin/batch/publish', null, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be /push/batch/publish
no?
``` | ||
|
||
```[rest_nodejs] | ||
await rest.request('POST', '/push/admin/batch/publish', null, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
@@ -1152,6 +1153,55 @@ A successful request returns an empty response. | |||
|
|||
An unsuccessful request returns an error. | |||
|
|||
h3(#push-publish-batch). Publish via batch push API | |||
|
|||
Convenience endpoint to deliver a push notification payload to multiple devices or browsers in a single request by specifying a list of recipients and corresponding payloads. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convenience endpoint to deliver a push notification payload to multiple devices or browsers in a single request by specifying a list of recipients and corresponding payloads. | |
Convenience endpoint to deliver multiple push notification payloads to multiple devices or browsers in a single request by specifying a list of recipients and corresponding payloads. |
|
||
Convenience endpoint to deliver a push notification payload to multiple devices or browsers in a single request by specifying a list of recipients and corresponding payloads. | ||
|
||
h6. POST rest.ably.io/push/admin/batch/publish |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
adds REST API reference and conceptual docs for batch push
see implementation here: https://github.com/ably/realtime/pull/7217
PUB-1319