Skip to content

Commit

Permalink
Added serialization note for batch publish documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Apr 10, 2024
1 parent b37daab commit be40570
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,14 @@ If you're using Laravel and want to support **realtime broadcasting and events**
- The following is an example of using the batch publish API based on the [Ably batch publish rest endpoint documentation](https://ably.com/docs/api/rest-api#batch-publish).

```php
// batch publish needs php array to be passed and serialization is handled based on useBinaryProtocol
$payload = array(
"channels" => ["channel1", "channel2", "channel3", "channel4"],
"messages" => array(
"id" => "1",
"data" => "foo"
)
);
);
$batchPublishPaginatedResult = $client->request("POST", "/messages", [], $payload);
```
- See the [ably rest endpoint doc](https://ably.com/docs/api/rest-api) for more information on other endpoints.
Expand Down

0 comments on commit be40570

Please sign in to comment.