Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ A powerful way to send personalized messages at scale and build effective custom

For more information, please visit [https://onesignal.com](https://onesignal.com).

- API version: 5.7.0
- Package version: 5.7.0
- API version: 5.8.0
- Package version: 5.8.0

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onesignal/onesignal-php-api",
"version": "5.7.0",
"version": "5.8.0",
"description": "A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com",
"keywords": [
"onesignal",
Expand Down
6 changes: 4 additions & 2 deletions docs/Api/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ Name | Type | Description | Notes
## `getNotifications()`

```php
getNotifications($app_id, $limit, $offset, $kind): \onesignal\client\model\NotificationSlice
getNotifications($app_id, $limit, $offset, $kind, $time_offset): \onesignal\client\model\NotificationSlice
```

View notifications
Expand Down Expand Up @@ -2054,9 +2054,10 @@ $app_id = '00000000-0000-0000-0000-000000000000'; // string | The app ID that yo
$limit = 10; // int | How many notifications to return. Max is 50. Default is 50.
$offset = 0; // int | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at.
$kind = 0; // int | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only
$time_offset = '2025-01-01T00:00:00.000Z'; // string | Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned.

try {
$result = $apiInstance->getNotifications($app_id, $limit, $offset, $kind);
$result = $apiInstance->getNotifications($app_id, $limit, $offset, $kind, $time_offset);
print_r($result);
} catch (\onesignal\client\ApiException $e) {
echo 'Exception when calling DefaultApi->getNotifications: ', $e->getMessage(), PHP_EOL;
Expand All @@ -2078,6 +2079,7 @@ Name | Type | Description | Notes
**limit** | **int**| How many notifications to return. Max is 50. Default is 50. | [optional]
**offset** | **int**| Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | [optional]
**kind** | **int**| Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | [optional]
**time_offset** | **string**| Time-offset pagination cursor for sequential pulls of all messages. Accepts either an ISO 8601 formatted timestamp (e.g. `2025-01-01T00:00:00.000Z`) or the opaque Base64 cursor token returned as `next_time_offset` in a prior response. When set, results are sorted ascending by send_after and the standard `offset` parameter cannot be used. Repeat the request with each `next_time_offset` until an empty notifications array is returned. | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion docs/Model/CreateNotificationSuccessResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). | [optional]
**id** | **string** | Notification identifier when the request created a notification. An empty string means no notification was created; read `errors` for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer them over comparing `id` directly. | [optional]
**external_id** | **string** | Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under `include_aliases.external_id`). | [optional]
**errors** | **mixed** | Polymorphic field: may be an array of human-readable strings and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`, or `invalid_player_ids`) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize. | [optional]

Expand Down
2 changes: 2 additions & 0 deletions docs/Model/NotificationSlice.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Name | Type | Description | Notes
**total_count** | **int** | | [optional]
**offset** | **int** | | [optional]
**limit** | **int** | | [optional]
**time_offset** | **string** | The time_offset cursor specified in the request, if any. | [optional]
**next_time_offset** | **string** | An opaque Base64 cursor token representing the next page of messages to fetch. Present when time_offset was provided in the request. Pass this value as time_offset on the next request to continue paginating. | [optional]
**notifications** | [**\onesignal\client\model\NotificationWithMeta[]**](NotificationWithMeta.md) | | [optional]

[[Back to API list]](https://github.com/OneSignal/onesignal-php-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-php-api)
2 changes: 1 addition & 1 deletion lib/ApiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
*
* The version of the OpenAPI document: 5.7.0
* The version of the OpenAPI document: 5.8.0
* Contact: devrel@onesignal.com
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.0-SNAPSHOT
Expand Down
8 changes: 4 additions & 4 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
*
* The version of the OpenAPI document: 5.7.0
* The version of the OpenAPI document: 5.8.0
* Contact: devrel@onesignal.com
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.0-SNAPSHOT
Expand Down Expand Up @@ -99,7 +99,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/5.7.0/PHP';
protected $userAgent = 'OpenAPI-Generator/5.8.0/PHP';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -430,8 +430,8 @@ public static function toDebugReport()
$report = 'PHP SDK (onesignal\client) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 5.7.0' . PHP_EOL;
$report .= ' SDK Package Version: 5.7.0' . PHP_EOL;
$report .= ' The version of the OpenAPI document: 5.8.0' . PHP_EOL;
$report .= ' SDK Package Version: 5.8.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
2 changes: 1 addition & 1 deletion lib/HeaderSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
*
* The version of the OpenAPI document: 5.7.0
* The version of the OpenAPI document: 5.8.0
* Contact: devrel@onesignal.com
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.0-SNAPSHOT
Expand Down
2 changes: 1 addition & 1 deletion lib/ObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
*
* The version of the OpenAPI document: 5.7.0
* The version of the OpenAPI document: 5.8.0
* Contact: devrel@onesignal.com
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.0-SNAPSHOT
Expand Down
Loading