norkunas / onesignal-php-api

OneSignal API for PHP
MIT License
233 stars 82 forks source link

How to send multiple different messages to different player_id, in a single send? #138

Closed rafaellfmachado closed 4 years ago

rafaellfmachado commented 4 years ago

I would like to send it in this format, because it would make it easier, as I would be able to send all messages in one request, thus not overloading the server.

exemple: { "app_id": "5eb5a37e-b458-11e3-ac11-000c2940e624", "notifications": [ { "include_player_ids": "6392d91a-b206-4b7b-a620-cd68e32c3a76", "headings": { "en": "English Title 001" }, "contents": { "en": "English Message 001" } }, { "include_player_ids": "76ece62b-bcfe-468c-8a78-839aeaa8c5fa", "headings": { "en": "English Title 002" }, "contents": { "en": "English Message 002" } }, { "include_player_ids": "8e0f21fa-9a5a-4ae7-a9a6-ca1f24294b86", "headings": { "en": "English Title 001" }, "contents": { "en": "English Message 001" } }, { "include_player_ids": "b98881cc-1e94-4366-bbd9-db8f3429292b", "headings": { "en": "English Title 003" }, "contents": { "en": "English Message 003" } } ] }

norkunas commented 4 years ago

Hello, this library is just a wrapper to official OneSignal api endpoins, so you should look if it's possible at their documentation :)