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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "onesignal-rust-api"
version = "5.7.0"
version = "5.8.0"
authors = ["devrel@onesignal.com"]
edition = "2018"
description = "A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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

## Installation

Add to `Cargo.toml` under `[dependencies]`:

```toml
onesignal-rust-api = "5.7.0"
onesignal-rust-api = "5.8.0"
```

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

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | Option<**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** | Option<**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** | Option<**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** | Option<[**serde_json::Value**](.md)> | 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
6 changes: 4 additions & 2 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1768,7 +1768,7 @@ Name | Type | Description | Required | Notes

## get_notifications

> crate::models::NotificationSlice get_notifications(app_id, limit, offset, kind)
> crate::models::NotificationSlice get_notifications(app_id, limit, offset, kind, time_offset)
View notifications

View the details of multiple notifications
Expand All @@ -1791,8 +1791,9 @@ async fn main() {
let limit: Option<i32> = None;
let offset: Option<i32> = None;
let kind: Option<i32> = None;
let time_offset: Option<&str> = None;

match default_api::get_notifications(&configuration, app_id, limit, offset, kind).await {
match default_api::get_notifications(&configuration, app_id, limit, offset, kind, time_offset).await {
Ok(resp) => println!("{:?}", resp),
Err(e @ onesignal_rust_api::apis::Error::ResponseError(_)) => {
// `e.error_messages()` flattens any error-envelope shape to a Vec<String>;
Expand All @@ -1813,6 +1814,7 @@ Name | Type | Description | Required | Notes
**limit** | Option<**i32**> | How many notifications to return. Max is 50. Default is 50. | |
**offset** | Option<**i32**> | 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** | Option<**i32**> | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | |
**time_offset** | Option<**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. | |

### Return type

Expand Down
2 changes: 2 additions & 0 deletions docs/NotificationSlice.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Name | Type | Description | Notes
**total_count** | Option<**i32**> | | [optional]
**offset** | Option<**i32**> | | [optional]
**limit** | Option<**i32**> | | [optional]
**time_offset** | Option<**String**> | The time_offset cursor specified in the request, if any. | [optional]
**next_time_offset** | Option<**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** | Option<[**Vec<crate::models::NotificationWithMeta>**](NotificationWithMeta.md)> | | [optional]

[[Back to API list]](https://github.com/OneSignal/onesignal-rust-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-rust-api)
Expand Down
4 changes: 2 additions & 2 deletions src/apis/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,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
*/
Expand Down Expand Up @@ -45,7 +45,7 @@ impl Default for Configuration {
fn default() -> Self {
Configuration {
base_path: "https://api.onesignal.com".to_owned(),
user_agent: Some("OpenAPI-Generator/5.7.0/rust".to_owned()),
user_agent: Some("OpenAPI-Generator/5.8.0/rust".to_owned()),
client: reqwest::Client::new(),
basic_auth: None,
oauth_access_token: None,
Expand Down
Loading