diff --git a/.github/ISSUE_TEMPLATE/ask-question.yml b/.github/ISSUE_TEMPLATE/ask-question.yml index 3da173f..6a3c282 100644 --- a/.github/ISSUE_TEMPLATE/ask-question.yml +++ b/.github/ISSUE_TEMPLATE/ask-question.yml @@ -1,7 +1,7 @@ name: 🙋‍♂️ Ask a question description: Tell us what's on your mind -title: "[question]: " -labels: ["triage"] +title: "[Question]: " +labels: ["Question"] body: - type: markdown attributes: @@ -22,4 +22,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index f274813..f99d9f6 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,7 +1,7 @@ name: 🪳 Bug report description: File a bug report title: "[Bug]: " -labels: ["bug", "triage"] +labels: ["Bug"] body: - type: markdown attributes: @@ -48,4 +48,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/ISSUE_TEMPLATE/general-feedback.yml b/.github/ISSUE_TEMPLATE/general-feedback.yml index e632759..704514e 100644 --- a/.github/ISSUE_TEMPLATE/general-feedback.yml +++ b/.github/ISSUE_TEMPLATE/general-feedback.yml @@ -1,7 +1,7 @@ name: 📣 General feedback description: Tell us what's on your mind -title: "[Bug]: " -labels: ["triage"] +title: "[Feedback]: " +labels: ["Feedback"] body: - type: markdown attributes: @@ -22,4 +22,4 @@ body: description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md) options: - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file + required: true diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml new file mode 100644 index 0000000..69960fe --- /dev/null +++ b/.github/workflows/project.yml @@ -0,0 +1,17 @@ +name: Add issues to project + +on: + issues: + types: + - opened + +jobs: + add-to-project: + runs-on: ubuntu-latest + steps: + - name: Add issue to project + uses: actions/add-to-project@v1.0.2 + with: + # SDK Server Project + project-url: https://github.com/orgs/OneSignal/projects/11 + github-token: ${{ secrets.GH_PROJECTS_TOKEN }} diff --git a/README.md b/README.md index 36383bb..a2164b6 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com -- API version: 1.4.0 -- SDK version: 2.2.0 +- API version: 5.0.1 +- SDK version: 5.0.0-beta1 - Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen For more information, please visit [https://onesignal.com](https://onesignal.com) @@ -73,7 +73,7 @@ namespace Example // that require the OneSignal User Auth Key. var userConfig = new Configuration(); userConfig.BasePath = "https://api.onesignal.com"; - userConfig.AccessToken = "ORGANIZATION_KEY"; // Organization key is only required for creating new apps and other top-level endpoints + userConfig.AccessToken = "USER_AUTH_KEY"; var userInstance = new DefaultApi(userConfig); @@ -96,7 +96,7 @@ namespace Example // that require the OneSignal App REST API Key. var appConfig = new Configuration(); appConfig.BasePath = "https://api.onesignal.com"; - appConfig.AccessToken = "REST_API_KEY"; // App REST API key required for most endpoints + appConfig.AccessToken = "REST_API_KEY"; var appInstance = new DefaultApi(appConfig); @@ -126,41 +126,34 @@ All URIs are relative to *https://api.onesignal.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DefaultApi* | [**BeginLiveActivity**](docs/DefaultApi.md#beginliveactivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity *DefaultApi* | [**CancelNotification**](docs/DefaultApi.md#cancelnotification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification +*DefaultApi* | [**CreateAlias**](docs/DefaultApi.md#createalias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**CreateAliasBySubscription**](docs/DefaultApi.md#createaliasbysubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | *DefaultApi* | [**CreateApp**](docs/DefaultApi.md#createapp) | **POST** /apps | Create an app *DefaultApi* | [**CreateNotification**](docs/DefaultApi.md#createnotification) | **POST** /notifications | Create notification -*DefaultApi* | [**CreatePlayer**](docs/DefaultApi.md#createplayer) | **POST** /players | Add a device -*DefaultApi* | [**CreateSegments**](docs/DefaultApi.md#createsegments) | **POST** /apps/{app_id}/segments | Create Segments +*DefaultApi* | [**CreateSegment**](docs/DefaultApi.md#createsegment) | **POST** /apps/{app_id}/segments | Create Segment *DefaultApi* | [**CreateSubscription**](docs/DefaultApi.md#createsubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | *DefaultApi* | [**CreateUser**](docs/DefaultApi.md#createuser) | **POST** /apps/{app_id}/users | *DefaultApi* | [**DeleteAlias**](docs/DefaultApi.md#deletealias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | -*DefaultApi* | [**DeletePlayer**](docs/DefaultApi.md#deleteplayer) | **DELETE** /players/{player_id} | Delete a user record -*DefaultApi* | [**DeleteSegments**](docs/DefaultApi.md#deletesegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments +*DefaultApi* | [**DeleteSegment**](docs/DefaultApi.md#deletesegment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment *DefaultApi* | [**DeleteSubscription**](docs/DefaultApi.md#deletesubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | *DefaultApi* | [**DeleteUser**](docs/DefaultApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -*DefaultApi* | [**EndLiveActivity**](docs/DefaultApi.md#endliveactivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity *DefaultApi* | [**ExportEvents**](docs/DefaultApi.md#exportevents) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events -*DefaultApi* | [**ExportPlayers**](docs/DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Players -*DefaultApi* | [**FetchAliases**](docs/DefaultApi.md#fetchaliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | -*DefaultApi* | [**FetchUser**](docs/DefaultApi.md#fetchuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -*DefaultApi* | [**FetchUserIdentity**](docs/DefaultApi.md#fetchuseridentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**ExportSubscriptions**](docs/DefaultApi.md#exportsubscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions +*DefaultApi* | [**GetAliases**](docs/DefaultApi.md#getaliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +*DefaultApi* | [**GetAliasesBySubscription**](docs/DefaultApi.md#getaliasesbysubscription) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | *DefaultApi* | [**GetApp**](docs/DefaultApi.md#getapp) | **GET** /apps/{app_id} | View an app *DefaultApi* | [**GetApps**](docs/DefaultApi.md#getapps) | **GET** /apps | View apps -*DefaultApi* | [**GetEligibleIams**](docs/DefaultApi.md#geteligibleiams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams | *DefaultApi* | [**GetNotification**](docs/DefaultApi.md#getnotification) | **GET** /notifications/{notification_id} | View notification *DefaultApi* | [**GetNotificationHistory**](docs/DefaultApi.md#getnotificationhistory) | **POST** /notifications/{notification_id}/history | Notification History *DefaultApi* | [**GetNotifications**](docs/DefaultApi.md#getnotifications) | **GET** /notifications | View notifications *DefaultApi* | [**GetOutcomes**](docs/DefaultApi.md#getoutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes -*DefaultApi* | [**GetPlayer**](docs/DefaultApi.md#getplayer) | **GET** /players/{player_id} | View device -*DefaultApi* | [**GetPlayers**](docs/DefaultApi.md#getplayers) | **GET** /players | View devices -*DefaultApi* | [**IdentifyUserByAlias**](docs/DefaultApi.md#identifyuserbyalias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | -*DefaultApi* | [**IdentifyUserBySubscriptionId**](docs/DefaultApi.md#identifyuserbysubscriptionid) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +*DefaultApi* | [**GetSegments**](docs/DefaultApi.md#getsegments) | **GET** /apps/{app_id}/segments | Get Segments +*DefaultApi* | [**GetUser**](docs/DefaultApi.md#getuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | *DefaultApi* | [**TransferSubscription**](docs/DefaultApi.md#transfersubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | +*DefaultApi* | [**UnsubscribeEmailWithToken**](docs/DefaultApi.md#unsubscribeemailwithtoken) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token *DefaultApi* | [**UpdateApp**](docs/DefaultApi.md#updateapp) | **PUT** /apps/{app_id} | Update an app *DefaultApi* | [**UpdateLiveActivity**](docs/DefaultApi.md#updateliveactivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push -*DefaultApi* | [**UpdatePlayer**](docs/DefaultApi.md#updateplayer) | **PUT** /players/{player_id} | Edit device -*DefaultApi* | [**UpdatePlayerTags**](docs/DefaultApi.md#updateplayertags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id *DefaultApi* | [**UpdateSubscription**](docs/DefaultApi.md#updatesubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | *DefaultApi* | [**UpdateUser**](docs/DefaultApi.md#updateuser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | @@ -172,37 +165,25 @@ Class | Method | HTTP request | Description - [Model.BasicNotification](docs/BasicNotification.md) - [Model.BasicNotificationAllOf](docs/BasicNotificationAllOf.md) - [Model.BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md) - - [Model.BeginLiveActivityRequest](docs/BeginLiveActivityRequest.md) - [Model.Button](docs/Button.md) - - [Model.CancelNotificationSuccessResponse](docs/CancelNotificationSuccessResponse.md) - [Model.CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md) - - [Model.CreatePlayerSuccessResponse](docs/CreatePlayerSuccessResponse.md) - [Model.CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md) - [Model.CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md) - - [Model.CreateSubscriptionRequestBody](docs/CreateSubscriptionRequestBody.md) - [Model.CreateUserConflictResponse](docs/CreateUserConflictResponse.md) - [Model.CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md) - [Model.CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md) - - [Model.DeletePlayerNotFoundResponse](docs/DeletePlayerNotFoundResponse.md) - - [Model.DeletePlayerSuccessResponse](docs/DeletePlayerSuccessResponse.md) - - [Model.DeleteSegmentNotFoundResponse](docs/DeleteSegmentNotFoundResponse.md) - - [Model.DeleteSegmentSuccessResponse](docs/DeleteSegmentSuccessResponse.md) - [Model.DeliveryData](docs/DeliveryData.md) - [Model.ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md) - - [Model.ExportPlayersRequestBody](docs/ExportPlayersRequestBody.md) - - [Model.ExportPlayersSuccessResponse](docs/ExportPlayersSuccessResponse.md) + - [Model.ExportSubscriptionsRequestBody](docs/ExportSubscriptionsRequestBody.md) + - [Model.ExportSubscriptionsSuccessResponse](docs/ExportSubscriptionsSuccessResponse.md) - [Model.Filter](docs/Filter.md) - - [Model.FilterExpressions](docs/FilterExpressions.md) + - [Model.FilterExpression](docs/FilterExpression.md) - [Model.GenericError](docs/GenericError.md) - - [Model.GenericErrorErrorsInner](docs/GenericErrorErrorsInner.md) - - [Model.GetNotificationRequestBody](docs/GetNotificationRequestBody.md) - - [Model.InlineResponse200](docs/InlineResponse200.md) - - [Model.InlineResponse2003](docs/InlineResponse2003.md) - - [Model.InlineResponse201](docs/InlineResponse201.md) - - [Model.InlineResponse202](docs/InlineResponse202.md) - - [Model.InvalidIdentifierError](docs/InvalidIdentifierError.md) + - [Model.GenericSuccessBoolResponse](docs/GenericSuccessBoolResponse.md) + - [Model.GetNotificationHistoryRequestBody](docs/GetNotificationHistoryRequestBody.md) + - [Model.GetSegmentsSuccessResponse](docs/GetSegmentsSuccessResponse.md) + - [Model.LanguageStringMap](docs/LanguageStringMap.md) - [Model.Notification](docs/Notification.md) - - [Model.Notification200Errors](docs/Notification200Errors.md) - [Model.NotificationAllOf](docs/NotificationAllOf.md) - [Model.NotificationHistorySuccessResponse](docs/NotificationHistorySuccessResponse.md) - [Model.NotificationSlice](docs/NotificationSlice.md) @@ -215,42 +196,36 @@ Class | Method | HTTP request | Description - [Model.PlatformDeliveryData](docs/PlatformDeliveryData.md) - [Model.PlatformDeliveryDataEmailAllOf](docs/PlatformDeliveryDataEmailAllOf.md) - [Model.PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md) - - [Model.Player](docs/Player.md) - - [Model.PlayerNotificationTarget](docs/PlayerNotificationTarget.md) - - [Model.PlayerNotificationTargetIncludeAliases](docs/PlayerNotificationTargetIncludeAliases.md) - - [Model.PlayerSlice](docs/PlayerSlice.md) + - [Model.PropertiesBody](docs/PropertiesBody.md) - [Model.PropertiesDeltas](docs/PropertiesDeltas.md) - [Model.PropertiesObject](docs/PropertiesObject.md) - [Model.Purchase](docs/Purchase.md) - - [Model.RateLimiterError](docs/RateLimiterError.md) + - [Model.RateLimitError](docs/RateLimitError.md) - [Model.Segment](docs/Segment.md) + - [Model.SegmentData](docs/SegmentData.md) - [Model.SegmentNotificationTarget](docs/SegmentNotificationTarget.md) - - [Model.StringMap](docs/StringMap.md) - - [Model.SubscriptionObject](docs/SubscriptionObject.md) + - [Model.Subscription](docs/Subscription.md) + - [Model.SubscriptionBody](docs/SubscriptionBody.md) + - [Model.SubscriptionNotificationTarget](docs/SubscriptionNotificationTarget.md) - [Model.TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md) - [Model.UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md) - [Model.UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md) - - [Model.UpdatePlayerSuccessResponse](docs/UpdatePlayerSuccessResponse.md) - - [Model.UpdatePlayerTagsRequestBody](docs/UpdatePlayerTagsRequestBody.md) - - [Model.UpdatePlayerTagsSuccessResponse](docs/UpdatePlayerTagsSuccessResponse.md) - - [Model.UpdateSubscriptionRequestBody](docs/UpdateSubscriptionRequestBody.md) - [Model.UpdateUserRequest](docs/UpdateUserRequest.md) - [Model.User](docs/User.md) - - [Model.UserIdentityRequestBody](docs/UserIdentityRequestBody.md) - - [Model.UserIdentityResponse](docs/UserIdentityResponse.md) - - [Model.UserSubscriptionOptions](docs/UserSubscriptionOptions.md) + - [Model.UserIdentityBody](docs/UserIdentityBody.md) + - [Model.WebButton](docs/WebButton.md) ## Documentation for Authorization - -### app_key + +### rest_api_key - **Type**: Bearer Authentication - -### user_key + +### user_auth_key - **Type**: Bearer Authentication diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 07047ac..b8d93a3 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | **List<string>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | **List<string>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | **List<string>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**IncludeExternalUserIds** | **List<string>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] +**IncludeSubscriptionIds** | **List<string>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] **IncludeEmailTokens** | **List<string>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] **IncludePhoneNumbers** | **List<string>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] -**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] -**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] +**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] +**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | **Dictionary<string, List<string>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] **TargetChannel** | **string** | | [optional] **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] @@ -32,13 +31,12 @@ Name | Type | Description | Notes **IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | **string** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | [**StringMap**](StringMap.md) | | [optional] -**Headings** | [**StringMap**](StringMap.md) | | [optional] -**Subtitle** | [**StringMap**](StringMap.md) | | [optional] +**Contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] **HuaweiMsgType** | **string** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | **string** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -55,7 +53,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | **string** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | **string** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] +**WebButtons** | [**List<WebButton>**](WebButton.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] **IosCategory** | **string** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] **AndroidChannelId** | **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | **string** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -101,6 +99,8 @@ Name | Type | Description | Notes **ThreadId** | **string** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | **decimal?** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] +**IosInterruptionLevel** | **string** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] **EmailSubject** | **string** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | **string** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -109,7 +109,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | **List<string>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | [**List<Filter>**](Filter.md) | | [optional] +**Filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] **CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index d04d9c1..da6aa6d 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -18,13 +18,12 @@ Name | Type | Description | Notes **IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional] **ExternalId** | **string** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | [**StringMap**](StringMap.md) | | [optional] -**Headings** | [**StringMap**](StringMap.md) | | [optional] -**Subtitle** | [**StringMap**](StringMap.md) | | [optional] +**Contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] **HuaweiMsgType** | **string** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | **string** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -41,7 +40,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | **string** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | **string** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] +**WebButtons** | [**List<WebButton>**](WebButton.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] **IosCategory** | **string** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] **AndroidChannelId** | **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | **string** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -87,6 +86,8 @@ Name | Type | Description | Notes **ThreadId** | **string** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | **decimal?** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] +**IosInterruptionLevel** | **string** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] **EmailSubject** | **string** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | **string** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -95,7 +96,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | **List<string>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | [**List<Filter>**](Filter.md) | | [optional] +**Filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] **CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateNotificationSuccessResponse.md b/docs/CreateNotificationSuccessResponse.md index f9710ca..9898307 100644 --- a/docs/CreateNotificationSuccessResponse.md +++ b/docs/CreateNotificationSuccessResponse.md @@ -5,9 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | | [optional] -**Recipients** | **int** | Estimated number of subscribers targetted by notification. | [optional] **ExternalId** | **string** | | [optional] -**Errors** | [**Notification200Errors**](Notification200Errors.md) | | [optional] +**Errors** | **Object** | Errors include the identifiers that are invalid, or that there are no subscribers. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreatePlayerSuccessResponse.md b/docs/CreatePlayerSuccessResponse.md deleted file mode 100644 index 1a0edd0..0000000 --- a/docs/CreatePlayerSuccessResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalApi.Model.CreatePlayerSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] -**Id** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CreateSubscriptionRequestBody.md b/docs/CreateSubscriptionRequestBody.md deleted file mode 100644 index b28aed6..0000000 --- a/docs/CreateSubscriptionRequestBody.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalApi.Model.CreateSubscriptionRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] -**RetainPreviousOwner** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index a4d34b8..a7a3817 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -4,52 +4,45 @@ All URIs are relative to *https://api.onesignal.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**BeginLiveActivity**](DefaultApi.md#beginliveactivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity [**CancelNotification**](DefaultApi.md#cancelnotification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification +[**CreateAlias**](DefaultApi.md#createalias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**CreateAliasBySubscription**](DefaultApi.md#createaliasbysubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | [**CreateApp**](DefaultApi.md#createapp) | **POST** /apps | Create an app [**CreateNotification**](DefaultApi.md#createnotification) | **POST** /notifications | Create notification -[**CreatePlayer**](DefaultApi.md#createplayer) | **POST** /players | Add a device -[**CreateSegments**](DefaultApi.md#createsegments) | **POST** /apps/{app_id}/segments | Create Segments +[**CreateSegment**](DefaultApi.md#createsegment) | **POST** /apps/{app_id}/segments | Create Segment [**CreateSubscription**](DefaultApi.md#createsubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | [**CreateUser**](DefaultApi.md#createuser) | **POST** /apps/{app_id}/users | [**DeleteAlias**](DefaultApi.md#deletealias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | -[**DeletePlayer**](DefaultApi.md#deleteplayer) | **DELETE** /players/{player_id} | Delete a user record -[**DeleteSegments**](DefaultApi.md#deletesegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments +[**DeleteSegment**](DefaultApi.md#deletesegment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment [**DeleteSubscription**](DefaultApi.md#deletesubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | [**DeleteUser**](DefaultApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -[**EndLiveActivity**](DefaultApi.md#endliveactivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity [**ExportEvents**](DefaultApi.md#exportevents) | **POST** /notifications/{notification_id}/export_events?app_id={app_id} | Export CSV of Events -[**ExportPlayers**](DefaultApi.md#exportplayers) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Players -[**FetchAliases**](DefaultApi.md#fetchaliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | -[**FetchUser**](DefaultApi.md#fetchuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | -[**FetchUserIdentity**](DefaultApi.md#fetchuseridentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**ExportSubscriptions**](DefaultApi.md#exportsubscriptions) | **POST** /players/csv_export?app_id={app_id} | Export CSV of Subscriptions +[**GetAliases**](DefaultApi.md#getaliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | +[**GetAliasesBySubscription**](DefaultApi.md#getaliasesbysubscription) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | [**GetApp**](DefaultApi.md#getapp) | **GET** /apps/{app_id} | View an app [**GetApps**](DefaultApi.md#getapps) | **GET** /apps | View apps -[**GetEligibleIams**](DefaultApi.md#geteligibleiams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams | [**GetNotification**](DefaultApi.md#getnotification) | **GET** /notifications/{notification_id} | View notification [**GetNotificationHistory**](DefaultApi.md#getnotificationhistory) | **POST** /notifications/{notification_id}/history | Notification History [**GetNotifications**](DefaultApi.md#getnotifications) | **GET** /notifications | View notifications [**GetOutcomes**](DefaultApi.md#getoutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes -[**GetPlayer**](DefaultApi.md#getplayer) | **GET** /players/{player_id} | View device -[**GetPlayers**](DefaultApi.md#getplayers) | **GET** /players | View devices -[**IdentifyUserByAlias**](DefaultApi.md#identifyuserbyalias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity | -[**IdentifyUserBySubscriptionId**](DefaultApi.md#identifyuserbysubscriptionid) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity | +[**GetSegments**](DefaultApi.md#getsegments) | **GET** /apps/{app_id}/segments | Get Segments +[**GetUser**](DefaultApi.md#getuser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} | [**TransferSubscription**](DefaultApi.md#transfersubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner | +[**UnsubscribeEmailWithToken**](DefaultApi.md#unsubscribeemailwithtoken) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token [**UpdateApp**](DefaultApi.md#updateapp) | **PUT** /apps/{app_id} | Update an app [**UpdateLiveActivity**](DefaultApi.md#updateliveactivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push -[**UpdatePlayer**](DefaultApi.md#updateplayer) | **PUT** /players/{player_id} | Edit device -[**UpdatePlayerTags**](DefaultApi.md#updateplayertags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id [**UpdateSubscription**](DefaultApi.md#updatesubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | [**UpdateUser**](DefaultApi.md#updateuser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | - -# **BeginLiveActivity** -> void BeginLiveActivity (string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest) + +# **CancelNotification** +> GenericSuccessBoolResponse CancelNotification (string appId, string notificationId) -Start Live Activity +Stop a scheduled or currently outgoing notification -Starts a Live Activity +Used to stop a scheduled or currently outgoing notification ### Example ```csharp @@ -61,28 +54,28 @@ using OneSignalApi.Model; namespace Example { - public class BeginLiveActivityExample + public class CancelNotificationExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var activityId = "activityId_example"; // string | Live Activity record ID - var beginLiveActivityRequest = new BeginLiveActivityRequest(); // BeginLiveActivityRequest | + var appId = "appId_example"; // string | + var notificationId = "notificationId_example"; // string | try { - // Start Live Activity - apiInstance.BeginLiveActivity(appId, activityId, beginLiveActivityRequest); + // Stop a scheduled or currently outgoing notification + GenericSuccessBoolResponse result = apiInstance.CancelNotification(appId, notificationId); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.BeginLiveActivity: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.CancelNotification: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -95,40 +88,40 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **activityId** | **string**| Live Activity record ID | - **beginLiveActivityRequest** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md)| | + **appId** | **string**| | + **notificationId** | **string**| | ### Return type -void (empty response body) +[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | OK | - | +| **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CancelNotification** -> CancelNotificationSuccessResponse CancelNotification (string appId, string notificationId) + +# **CreateAlias** +> UserIdentityBody CreateAlias (string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody) -Stop a scheduled or currently outgoing notification -Used to stop a scheduled or currently outgoing notification + +Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). ### Example ```csharp @@ -140,28 +133,29 @@ using OneSignalApi.Model; namespace Example { - public class CancelNotificationExample + public class CreateAliasExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); var appId = "appId_example"; // string | - var notificationId = "notificationId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | + var userIdentityBody = new UserIdentityBody(); // UserIdentityBody | try { - // Stop a scheduled or currently outgoing notification - CancelNotificationSuccessResponse result = apiInstance.CancelNotification(appId, notificationId); + UserIdentityBody result = apiInstance.CreateAlias(appId, aliasLabel, aliasId, userIdentityBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CancelNotification: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.CreateAlias: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -175,19 +169,21 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **appId** | **string**| | - **notificationId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | + **userIdentityBody** | [**UserIdentityBody**](UserIdentityBody.md)| | ### Return type -[**CancelNotificationSuccessResponse**](CancelNotificationSuccessResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -196,17 +192,19 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | +| **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CreateApp** -> App CreateApp (App app) + +# **CreateAliasBySubscription** +> UserIdentityBody CreateAliasBySubscription (string appId, string subscriptionId, UserIdentityBody userIdentityBody) -Create an app -Creates a new OneSignal app + +Upserts one or more Aliases for the User identified by :subscription_id. ### Example ```csharp @@ -218,27 +216,28 @@ using OneSignalApi.Model; namespace Example { - public class CreateAppExample + public class CreateAliasBySubscriptionExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: user_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var app = new App(); // App | + var appId = "appId_example"; // string | + var subscriptionId = "subscriptionId_example"; // string | + var userIdentityBody = new UserIdentityBody(); // UserIdentityBody | try { - // Create an app - App result = apiInstance.CreateApp(app); + UserIdentityBody result = apiInstance.CreateAliasBySubscription(appId, subscriptionId, userIdentityBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateApp: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.CreateAliasBySubscription: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -251,15 +250,17 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **app** | [**App**](App.md)| | + **appId** | **string**| | + **subscriptionId** | **string**| | + **userIdentityBody** | [**UserIdentityBody**](UserIdentityBody.md)| | ### Return type -[**App**](App.md) +[**UserIdentityBody**](UserIdentityBody.md) ### Authorization -[user_key](../README.md#user_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -272,17 +273,19 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | +| **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CreateNotification** -> CreateNotificationSuccessResponse CreateNotification (Notification notification) + +# **CreateApp** +> App CreateApp (App app) -Create notification +Create an app -Sends notifications to your users +Creates a new OneSignal app ### Example ```csharp @@ -294,27 +297,27 @@ using OneSignalApi.Model; namespace Example { - public class CreateNotificationExample + public class CreateAppExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: user_auth_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var notification = new Notification(); // Notification | + var app = new App(); // App | try { - // Create notification - CreateNotificationSuccessResponse result = apiInstance.CreateNotification(notification); + // Create an app + App result = apiInstance.CreateApp(app); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateNotification: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.CreateApp: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -327,15 +330,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **notification** | [**Notification**](Notification.md)| | + **app** | [**App**](App.md)| | ### Return type -[**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md) +[**App**](App.md) ### Authorization -[app_key](../README.md#app_key) +[user_auth_key](../README.md#user_auth_key) ### HTTP request headers @@ -346,19 +349,19 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | OK, invalid_player_ids, invalid_external_user_ids or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_player_ids\" or \"invalid_external_user_ids\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | +| **200** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CreatePlayer** -> CreatePlayerSuccessResponse CreatePlayer (Player player) + +# **CreateNotification** +> CreateNotificationSuccessResponse CreateNotification (Notification notification) -Add a device +Create notification -Register a new device to one of your OneSignal apps 🚧 Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. 🚧 iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. +Sends notifications to your users ### Example ```csharp @@ -370,27 +373,27 @@ using OneSignalApi.Model; namespace Example { - public class CreatePlayerExample + public class CreateNotificationExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var player = new Player(); // Player | + var notification = new Notification(); // Notification | try { - // Add a device - CreatePlayerSuccessResponse result = apiInstance.CreatePlayer(player); + // Create notification + CreateNotificationSuccessResponse result = apiInstance.CreateNotification(notification); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreatePlayer: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.CreateNotification: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -403,15 +406,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **player** | [**Player**](Player.md)| | + **notification** | [**Notification**](Notification.md)| | ### Return type -[**CreatePlayerSuccessResponse**](CreatePlayerSuccessResponse.md) +[**CreateNotificationSuccessResponse**](CreateNotificationSuccessResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -422,20 +425,19 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | OK | - | +| **200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | | **400** | Bad Request | - | -| **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **CreateSegments** -> CreateSegmentSuccessResponse CreateSegments (string appId, Segment segment = null) + +# **CreateSegment** +> CreateSegmentSuccessResponse CreateSegment (string appId, Segment segment = null) -Create Segments +Create Segment -Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. +Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. ### Example ```csharp @@ -447,13 +449,13 @@ using OneSignalApi.Model; namespace Example { - public class CreateSegmentsExample + public class CreateSegmentExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -462,13 +464,13 @@ namespace Example try { - // Create Segments - CreateSegmentSuccessResponse result = apiInstance.CreateSegments(appId, segment); + // Create Segment + CreateSegmentSuccessResponse result = apiInstance.CreateSegment(appId, segment); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.CreateSegments: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.CreateSegment: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -490,7 +492,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -510,7 +512,7 @@ Name | Type | Description | Notes # **CreateSubscription** -> InlineResponse201 CreateSubscription (string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody) +> SubscriptionBody CreateSubscription (string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody) @@ -532,18 +534,18 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); var appId = "appId_example"; // string | var aliasLabel = "aliasLabel_example"; // string | var aliasId = "aliasId_example"; // string | - var createSubscriptionRequestBody = new CreateSubscriptionRequestBody(); // CreateSubscriptionRequestBody | + var subscriptionBody = new SubscriptionBody(); // SubscriptionBody | try { - InlineResponse201 result = apiInstance.CreateSubscription(appId, aliasLabel, aliasId, createSubscriptionRequestBody); + SubscriptionBody result = apiInstance.CreateSubscription(appId, aliasLabel, aliasId, subscriptionBody); Debug.WriteLine(result); } catch (ApiException e) @@ -564,15 +566,15 @@ Name | Type | Description | Notes **appId** | **string**| | **aliasLabel** | **string**| | **aliasId** | **string**| | - **createSubscriptionRequestBody** | [**CreateSubscriptionRequestBody**](CreateSubscriptionRequestBody.md)| | + **subscriptionBody** | [**SubscriptionBody**](SubscriptionBody.md)| | ### Return type -[**InlineResponse201**](InlineResponse201.md) +[**SubscriptionBody**](SubscriptionBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -586,6 +588,7 @@ Name | Type | Description | Notes | **201** | CREATED | - | | **202** | ACCEPTED | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **409** | Operation is not permitted due to user having the maximum number of subscriptions assigned | - | | **429** | Rate Limit Exceeded | - | @@ -615,7 +618,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -651,7 +654,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -673,7 +676,7 @@ Name | Type | Description | Notes # **DeleteAlias** -> InlineResponse200 DeleteAlias (string appId, string aliasLabel, string aliasId, string aliasLabelToDelete) +> UserIdentityBody DeleteAlias (string appId, string aliasLabel, string aliasId, string aliasLabelToDelete) @@ -695,7 +698,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -706,7 +709,7 @@ namespace Example try { - InlineResponse200 result = apiInstance.DeleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete); + UserIdentityBody result = apiInstance.DeleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete); Debug.WriteLine(result); } catch (ApiException e) @@ -731,90 +734,11 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[app_key](../README.md#app_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **409** | Conflict | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeletePlayer** -> DeletePlayerSuccessResponse DeletePlayer (string appId, string playerId) - -Delete a user record - -Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class DeletePlayerExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var playerId = "playerId_example"; // string | The OneSignal player_id - - try - { - // Delete a user record - DeletePlayerSuccessResponse result = apiInstance.DeletePlayer(appId, playerId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.DeletePlayer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **playerId** | **string**| The OneSignal player_id | - -### Return type - -[**DeletePlayerSuccessResponse**](DeletePlayerSuccessResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -828,17 +752,18 @@ Name | Type | Description | Notes | **200** | OK | - | | **400** | Bad Request | - | | **404** | Not Found | - | +| **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **DeleteSegments** -> DeleteSegmentSuccessResponse DeleteSegments (string appId, string segmentId) + +# **DeleteSegment** +> GenericSuccessBoolResponse DeleteSegment (string appId, string segmentId) -Delete Segments +Delete Segment -Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. +Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. ### Example ```csharp @@ -850,13 +775,13 @@ using OneSignalApi.Model; namespace Example { - public class DeleteSegmentsExample + public class DeleteSegmentExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -865,13 +790,13 @@ namespace Example try { - // Delete Segments - DeleteSegmentSuccessResponse result = apiInstance.DeleteSegments(appId, segmentId); + // Delete Segment + GenericSuccessBoolResponse result = apiInstance.DeleteSegment(appId, segmentId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.DeleteSegments: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.DeleteSegment: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -889,11 +814,11 @@ Name | Type | Description | Notes ### Return type -[**DeleteSegmentSuccessResponse**](DeleteSegmentSuccessResponse.md) +[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -935,7 +860,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -970,7 +895,7 @@ void (empty response body) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -983,6 +908,7 @@ void (empty response body) |-------------|-------------|------------------| | **202** | ACCEPTED | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | @@ -1012,7 +938,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -1049,7 +975,7 @@ void (empty response body) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -1067,13 +993,13 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **EndLiveActivity** -> void EndLiveActivity (string appId, string activityId, string subscriptionId) + +# **ExportEvents** +> ExportEventsSuccessResponse ExportEvents (string notificationId, string appId) -Stop Live Activity +Export CSV of Events -Stops a Live Activity +Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. ### Example ```csharp @@ -1085,28 +1011,28 @@ using OneSignalApi.Model; namespace Example { - public class EndLiveActivityExample + public class ExportEventsExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. - var activityId = "activityId_example"; // string | Live Activity record ID - var subscriptionId = "subscriptionId_example"; // string | Subscription ID + var notificationId = "notificationId_example"; // string | The ID of the notification to export events from. + var appId = "appId_example"; // string | The ID of the app that the notification belongs to. try { - // Stop Live Activity - apiInstance.EndLiveActivity(appId, activityId, subscriptionId); + // Export CSV of Events + ExportEventsSuccessResponse result = apiInstance.ExportEvents(notificationId, appId); + Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.EndLiveActivity: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.ExportEvents: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1119,17 +1045,16 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | - **activityId** | **string**| Live Activity record ID | - **subscriptionId** | **string**| Subscription ID | + **notificationId** | **string**| The ID of the notification to export events from. | + **appId** | **string**| The ID of the app that the notification belongs to. | ### Return type -void (empty response body) +[**ExportEventsSuccessResponse**](ExportEventsSuccessResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -1140,19 +1065,20 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | OK | - | +| **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ExportEvents** -> ExportEventsSuccessResponse ExportEvents (string notificationId, string appId) + +# **ExportSubscriptions** +> ExportSubscriptionsSuccessResponse ExportSubscriptions (string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = null) -Export CSV of Events +Export CSV of Subscriptions -Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. +Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | ### Example ```csharp @@ -1164,28 +1090,28 @@ using OneSignalApi.Model; namespace Example { - public class ExportEventsExample + public class ExportSubscriptionsExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var notificationId = "notificationId_example"; // string | The ID of the notification to export events from. - var appId = "appId_example"; // string | The ID of the app that the notification belongs to. + var appId = "appId_example"; // string | The app ID that you want to export devices from + var exportSubscriptionsRequestBody = new ExportSubscriptionsRequestBody(); // ExportSubscriptionsRequestBody | (optional) try { - // Export CSV of Events - ExportEventsSuccessResponse result = apiInstance.ExportEvents(notificationId, appId); + // Export CSV of Subscriptions + ExportSubscriptionsSuccessResponse result = apiInstance.ExportSubscriptions(appId, exportSubscriptionsRequestBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ExportEvents: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.ExportSubscriptions: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1198,20 +1124,20 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **notificationId** | **string**| The ID of the notification to export events from. | - **appId** | **string**| The ID of the app that the notification belongs to. | + **appId** | **string**| The app ID that you want to export devices from | + **exportSubscriptionsRequestBody** | [**ExportSubscriptionsRequestBody**](ExportSubscriptionsRequestBody.md)| | [optional] ### Return type -[**ExportEventsSuccessResponse**](ExportEventsSuccessResponse.md) +[**ExportSubscriptionsSuccessResponse**](ExportSubscriptionsSuccessResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json @@ -1220,18 +1146,17 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | -| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **ExportPlayers** -> ExportPlayersSuccessResponse ExportPlayers (string appId, ExportPlayersRequestBody exportPlayersRequestBody = null) + +# **GetAliases** +> UserIdentityBody GetAliases (string appId, string aliasLabel, string aliasId) -Export CSV of Players -Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + +Lists all Aliases for the User identified by (:alias_label, :alias_id). ### Example ```csharp @@ -1243,28 +1168,28 @@ using OneSignalApi.Model; namespace Example { - public class ExportPlayersExample + public class GetAliasesExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The app ID that you want to export devices from - var exportPlayersRequestBody = new ExportPlayersRequestBody(); // ExportPlayersRequestBody | (optional) + var appId = "appId_example"; // string | + var aliasLabel = "aliasLabel_example"; // string | + var aliasId = "aliasId_example"; // string | try { - // Export CSV of Players - ExportPlayersSuccessResponse result = apiInstance.ExportPlayers(appId, exportPlayersRequestBody); + UserIdentityBody result = apiInstance.GetAliases(appId, aliasLabel, aliasId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.ExportPlayers: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetAliases: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1277,20 +1202,21 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The app ID that you want to export devices from | - **exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md)| | [optional] + **appId** | **string**| | + **aliasLabel** | **string**| | + **aliasId** | **string**| | ### Return type -[**ExportPlayersSuccessResponse**](ExportPlayersSuccessResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -1299,13 +1225,14 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **FetchAliases** -> UserIdentityResponse FetchAliases (string appId, string subscriptionId) + +# **GetAliasesBySubscription** +> UserIdentityBody GetAliasesBySubscription (string appId, string subscriptionId) @@ -1321,13 +1248,13 @@ using OneSignalApi.Model; namespace Example { - public class FetchAliasesExample + public class GetAliasesBySubscriptionExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -1336,12 +1263,12 @@ namespace Example try { - UserIdentityResponse result = apiInstance.FetchAliases(appId, subscriptionId); + UserIdentityBody result = apiInstance.GetAliasesBySubscription(appId, subscriptionId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.FetchAliases: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetAliasesBySubscription: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1359,11 +1286,11 @@ Name | Type | Description | Notes ### Return type -[**UserIdentityResponse**](UserIdentityResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -1376,16 +1303,17 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **FetchUser** -> User FetchUser (string appId, string aliasLabel, string aliasId) - + +# **GetApp** +> App GetApp (string appId) +View an app -Returns the User’s properties, Aliases, and Subscriptions. +View the details of a single OneSignal app ### Example ```csharp @@ -1397,28 +1325,27 @@ using OneSignalApi.Model; namespace Example { - public class FetchUserExample + public class GetAppExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: user_auth_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | - var aliasLabel = "aliasLabel_example"; // string | - var aliasId = "aliasId_example"; // string | + var appId = "appId_example"; // string | An app id try { - User result = apiInstance.FetchUser(appId, aliasLabel, aliasId); + // View an app + App result = apiInstance.GetApp(appId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.FetchUser: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetApp: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -1431,17 +1358,15 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| | - **aliasLabel** | **string**| | - **aliasId** | **string**| | + **appId** | **string**| An app id | ### Return type -[**User**](User.md) +[**App**](App.md) ### Authorization -[app_key](../README.md#app_key) +[user_auth_key](../README.md#user_auth_key) ### HTTP request headers @@ -1458,13 +1383,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **FetchUserIdentity** -> InlineResponse200 FetchUserIdentity (string appId, string aliasLabel, string aliasId) - + +# **GetApps** +> List<App> GetApps () +View apps -Lists all Aliases for the User identified by (:alias_label, :alias_id). +View the details of all of your current OneSignal apps ### Example ```csharp @@ -1476,168 +1401,13 @@ using OneSignalApi.Model; namespace Example { - public class FetchUserIdentityExample + public class GetAppsExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | - var aliasLabel = "aliasLabel_example"; // string | - var aliasId = "aliasId_example"; // string | - - try - { - InlineResponse200 result = apiInstance.FetchUserIdentity(appId, aliasLabel, aliasId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.FetchUserIdentity: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| | - **aliasLabel** | **string**| | - **aliasId** | **string**| | - -### Return type - -[**InlineResponse200**](InlineResponse200.md) - -### Authorization - -[app_key](../README.md#app_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetApp** -> App GetApp (string appId) - -View an app - -View the details of a single OneSignal app - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class GetAppExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: user_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | An app id - - try - { - // View an app - App result = apiInstance.GetApp(appId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.GetApp: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| An app id | - -### Return type - -[**App**](App.md) - -### Authorization - -[user_key](../README.md#user_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetApps** -> List<App> GetApps () - -View apps - -View the details of all of your current OneSignal apps - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class GetAppsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: user_key + // Configure Bearer token for authorization: user_auth_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -1668,84 +1438,7 @@ This endpoint does not need any parameter. ### Authorization -[user_key](../README.md#user_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetEligibleIams** -> InlineResponse2003 GetEligibleIams (string appId, string subscriptionId) - - - -Manifest of In-App Messages the Subscription is eligible to display by the SDK. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class GetEligibleIamsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | - var subscriptionId = "subscriptionId_example"; // string | - - try - { - InlineResponse2003 result = apiInstance.GetEligibleIams(appId, subscriptionId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.GetEligibleIams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| | - **subscriptionId** | **string**| | - -### Return type - -[**InlineResponse2003**](InlineResponse2003.md) - -### Authorization - -[app_key](../README.md#app_key) +[user_auth_key](../README.md#user_auth_key) ### HTTP request headers @@ -1786,7 +1479,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -1823,7 +1516,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -1836,13 +1529,14 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GetNotificationHistory** -> NotificationHistorySuccessResponse GetNotificationHistory (string notificationId, GetNotificationRequestBody getNotificationRequestBody) +> NotificationHistorySuccessResponse GetNotificationHistory (string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody) Notification History @@ -1864,17 +1558,17 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); var notificationId = "notificationId_example"; // string | The \"id\" of the message found in the Notification object - var getNotificationRequestBody = new GetNotificationRequestBody(); // GetNotificationRequestBody | + var getNotificationHistoryRequestBody = new GetNotificationHistoryRequestBody(); // GetNotificationHistoryRequestBody | try { // Notification History - NotificationHistorySuccessResponse result = apiInstance.GetNotificationHistory(notificationId, getNotificationRequestBody); + NotificationHistorySuccessResponse result = apiInstance.GetNotificationHistory(notificationId, getNotificationHistoryRequestBody); Debug.WriteLine(result); } catch (ApiException e) @@ -1893,7 +1587,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **notificationId** | **string**| The \"id\" of the message found in the Notification object | - **getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md)| | + **getNotificationHistoryRequestBody** | [**GetNotificationHistoryRequestBody**](GetNotificationHistoryRequestBody.md)| | ### Return type @@ -1901,7 +1595,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -1914,6 +1608,7 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -1942,7 +1637,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -1983,7 +1678,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -2024,7 +1719,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -2069,87 +1764,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetPlayer** -> Player GetPlayer (string appId, string playerId, string emailAuthHash = null) - -View device - -View the details of an existing device in one of your OneSignal apps - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class GetPlayerExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | Your app_id for this device - var playerId = "playerId_example"; // string | Player's OneSignal ID - var emailAuthHash = "emailAuthHash_example"; // string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) - - try - { - // View device - Player result = apiInstance.GetPlayer(appId, playerId, emailAuthHash); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.GetPlayer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| Your app_id for this device | - **playerId** | **string**| Player's OneSignal ID | - **emailAuthHash** | **string**| Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] - -### Return type - -[**Player**](Player.md) - -### Authorization - -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -2166,13 +1781,13 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **GetPlayers** -> PlayerSlice GetPlayers (string appId, int? limit = null, int? offset = null) + +# **GetSegments** +> GetSegmentsSuccessResponse GetSegments (string appId, int? offset = null, int? limit = null) -View devices +Get Segments -View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. +Returns an array of segments from an app. ### Example ```csharp @@ -2184,29 +1799,29 @@ using OneSignalApi.Model; namespace Example { - public class GetPlayersExample + public class GetSegmentsExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The app ID that you want to view players from - var limit = 56; // int? | How many devices to return. Max is 300. Default is 300 (optional) - var offset = 56; // int? | Result offset. Default is 0. Results are sorted by id; (optional) + var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. + var offset = 56; // int? | Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + var limit = 56; // int? | The amount of Segments in the response. Maximum 300. (optional) try { - // View devices - PlayerSlice result = apiInstance.GetPlayers(appId, limit, offset); + // Get Segments + GetSegmentsSuccessResponse result = apiInstance.GetSegments(appId, offset, limit); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.GetPlayers: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetSegments: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -2219,17 +1834,17 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| The app ID that you want to view players from | - **limit** | **int?**| How many devices to return. Max is 300. Default is 300 | [optional] - **offset** | **int?**| Result offset. Default is 0. Results are sorted by id; | [optional] + **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | + **offset** | **int?**| Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. | [optional] + **limit** | **int?**| The amount of Segments in the response. Maximum 300. | [optional] ### Return type -[**PlayerSlice**](PlayerSlice.md) +[**GetSegmentsSuccessResponse**](GetSegmentsSuccessResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -2240,19 +1855,19 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | OK | - | +| **201** | OK | - | | **400** | Bad Request | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **IdentifyUserByAlias** -> InlineResponse200 IdentifyUserByAlias (string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody) + +# **GetUser** +> User GetUser (string appId, string aliasLabel, string aliasId) -Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). +Returns the User’s properties, Aliases, and Subscriptions. ### Example ```csharp @@ -2264,29 +1879,28 @@ using OneSignalApi.Model; namespace Example { - public class IdentifyUserByAliasExample + public class GetUserExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); var appId = "appId_example"; // string | var aliasLabel = "aliasLabel_example"; // string | var aliasId = "aliasId_example"; // string | - var userIdentityRequestBody = new UserIdentityRequestBody(); // UserIdentityRequestBody | try { - InlineResponse200 result = apiInstance.IdentifyUserByAlias(appId, aliasLabel, aliasId, userIdentityRequestBody); + User result = apiInstance.GetUser(appId, aliasLabel, aliasId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.IdentifyUserByAlias: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.GetUser: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -2302,19 +1916,18 @@ Name | Type | Description | Notes **appId** | **string**| | **aliasLabel** | **string**| | **aliasId** | **string**| | - **userIdentityRequestBody** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md)| | ### Return type -[**InlineResponse200**](InlineResponse200.md) +[**User**](User.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -2323,18 +1936,18 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | -| **409** | Conflict | - | +| **404** | Not Found | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **IdentifyUserBySubscriptionId** -> UserIdentityResponse IdentifyUserBySubscriptionId (string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody) + +# **TransferSubscription** +> UserIdentityBody TransferSubscription (string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody) -Upserts one or more Aliases for the User identified by :subscription_id. +Transfers this Subscription to the User identified by the identity in the payload. ### Example ```csharp @@ -2346,28 +1959,28 @@ using OneSignalApi.Model; namespace Example { - public class IdentifyUserBySubscriptionIdExample + public class TransferSubscriptionExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); var appId = "appId_example"; // string | var subscriptionId = "subscriptionId_example"; // string | - var userIdentityRequestBody = new UserIdentityRequestBody(); // UserIdentityRequestBody | + var transferSubscriptionRequestBody = new TransferSubscriptionRequestBody(); // TransferSubscriptionRequestBody | try { - UserIdentityResponse result = apiInstance.IdentifyUserBySubscriptionId(appId, subscriptionId, userIdentityRequestBody); + UserIdentityBody result = apiInstance.TransferSubscription(appId, subscriptionId, transferSubscriptionRequestBody); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.IdentifyUserBySubscriptionId: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.TransferSubscription: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -2382,15 +1995,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **appId** | **string**| | **subscriptionId** | **string**| | - **userIdentityRequestBody** | [**UserIdentityRequestBody**](UserIdentityRequestBody.md)| | + **transferSubscriptionRequestBody** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md)| | ### Return type -[**UserIdentityResponse**](UserIdentityResponse.md) +[**UserIdentityBody**](UserIdentityBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -2403,18 +2016,19 @@ Name | Type | Description | Notes |-------------|-------------|------------------| | **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **TransferSubscription** -> UserIdentityResponse TransferSubscription (string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody) - + +# **UnsubscribeEmailWithToken** +> GenericSuccessBoolResponse UnsubscribeEmailWithToken (string appId, string notificationId, string token) +Unsubscribe with token -Transfers this Subscription to the User identified by the identity in the payload. +Unsubscribe an email with a token when using your own custom email unsubscribe landing page ### Example ```csharp @@ -2426,28 +2040,29 @@ using OneSignalApi.Model; namespace Example { - public class TransferSubscriptionExample + public class UnsubscribeEmailWithTokenExample { public static void Main() { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | - var subscriptionId = "subscriptionId_example"; // string | - var transferSubscriptionRequestBody = new TransferSubscriptionRequestBody(); // TransferSubscriptionRequestBody | + var appId = "appId_example"; // string | The OneSignal App ID for your app. Available in Keys & IDs. + var notificationId = "notificationId_example"; // string | The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + var token = "token_example"; // string | The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. try { - UserIdentityResponse result = apiInstance.TransferSubscription(appId, subscriptionId, transferSubscriptionRequestBody); + // Unsubscribe with token + GenericSuccessBoolResponse result = apiInstance.UnsubscribeEmailWithToken(appId, notificationId, token); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling DefaultApi.TransferSubscription: " + e.Message ); + Debug.Print("Exception when calling DefaultApi.UnsubscribeEmailWithToken: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -2460,30 +2075,29 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **appId** | **string**| | - **subscriptionId** | **string**| | - **transferSubscriptionRequestBody** | [**TransferSubscriptionRequestBody**](TransferSubscriptionRequestBody.md)| | + **appId** | **string**| The OneSignal App ID for your app. Available in Keys & IDs. | + **notificationId** | **string**| The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. | + **token** | **string**| The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. | ### Return type -[**UserIdentityResponse**](UserIdentityResponse.md) +[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | OK | - | +| **202** | OK | - | | **400** | Bad Request | - | -| **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -2512,7 +2126,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: user_key + // Configure Bearer token for authorization: user_auth_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -2549,7 +2163,7 @@ Name | Type | Description | Notes ### Authorization -[user_key](../README.md#user_key) +[user_auth_key](../README.md#user_auth_key) ### HTTP request headers @@ -2590,7 +2204,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -2629,7 +2243,7 @@ Name | Type | Description | Notes ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -2646,169 +2260,9 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **UpdatePlayer** -> UpdatePlayerSuccessResponse UpdatePlayer (string playerId, Player player) - -Edit device - -Update an existing device in one of your OneSignal apps - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class UpdatePlayerExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var playerId = "playerId_example"; // string | Player's OneSignal ID - var player = new Player(); // Player | - - try - { - // Edit device - UpdatePlayerSuccessResponse result = apiInstance.UpdatePlayer(playerId, player); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.UpdatePlayer: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **playerId** | **string**| Player's OneSignal ID | - **player** | [**Player**](Player.md)| | - -### Return type - -[**UpdatePlayerSuccessResponse**](UpdatePlayerSuccessResponse.md) - -### Authorization - -[app_key](../README.md#app_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **409** | Conflict | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UpdatePlayerTags** -> UpdatePlayerTagsSuccessResponse UpdatePlayerTags (string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = null) - -Edit tags with external user id - -Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. 📘 Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using OneSignalApi.Api; -using OneSignalApi.Client; -using OneSignalApi.Model; - -namespace Example -{ - public class UpdatePlayerTagsExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key - config.AccessToken = "YOUR_BEARER_TOKEN"; - - var apiInstance = new DefaultApi(config); - var appId = "appId_example"; // string | The OneSignal App ID the user record is found under. - var externalUserId = "externalUserId_example"; // string | The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - var updatePlayerTagsRequestBody = new UpdatePlayerTagsRequestBody(); // UpdatePlayerTagsRequestBody | (optional) - - try - { - // Edit tags with external user id - UpdatePlayerTagsSuccessResponse result = apiInstance.UpdatePlayerTags(appId, externalUserId, updatePlayerTagsRequestBody); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.UpdatePlayerTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string**| The OneSignal App ID the user record is found under. | - **externalUserId** | **string**| The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. | - **updatePlayerTagsRequestBody** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md)| | [optional] - -### Return type - -[**UpdatePlayerTagsSuccessResponse**](UpdatePlayerTagsSuccessResponse.md) - -### Authorization - -[app_key](../README.md#app_key) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | -| **400** | Bad Request | - | -| **409** | Conflict | - | -| **429** | Rate Limit Exceeded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **UpdateSubscription** -> void UpdateSubscription (string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody) +> void UpdateSubscription (string appId, string subscriptionId, SubscriptionBody subscriptionBody) @@ -2830,17 +2284,17 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); var appId = "appId_example"; // string | var subscriptionId = "subscriptionId_example"; // string | - var updateSubscriptionRequestBody = new UpdateSubscriptionRequestBody(); // UpdateSubscriptionRequestBody | + var subscriptionBody = new SubscriptionBody(); // SubscriptionBody | try { - apiInstance.UpdateSubscription(appId, subscriptionId, updateSubscriptionRequestBody); + apiInstance.UpdateSubscription(appId, subscriptionId, subscriptionBody); } catch (ApiException e) { @@ -2859,7 +2313,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **appId** | **string**| | **subscriptionId** | **string**| | - **updateSubscriptionRequestBody** | [**UpdateSubscriptionRequestBody**](UpdateSubscriptionRequestBody.md)| | + **subscriptionBody** | [**SubscriptionBody**](SubscriptionBody.md)| | ### Return type @@ -2867,7 +2321,7 @@ void (empty response body) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers @@ -2878,8 +2332,9 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **202** | ACCEPTED | - | +| **200** | OK | - | | **400** | Bad Request | - | +| **404** | Not Found | - | | **409** | Conflict | - | | **429** | Rate Limit Exceeded | - | @@ -2887,7 +2342,7 @@ void (empty response body) # **UpdateUser** -> InlineResponse202 UpdateUser (string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest) +> PropertiesBody UpdateUser (string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest) @@ -2909,7 +2364,7 @@ namespace Example { Configuration config = new Configuration(); config.BasePath = "https://api.onesignal.com"; - // Configure Bearer token for authorization: app_key + // Configure Bearer token for authorization: rest_api_key config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new DefaultApi(config); @@ -2920,7 +2375,7 @@ namespace Example try { - InlineResponse202 result = apiInstance.UpdateUser(appId, aliasLabel, aliasId, updateUserRequest); + PropertiesBody result = apiInstance.UpdateUser(appId, aliasLabel, aliasId, updateUserRequest); Debug.WriteLine(result); } catch (ApiException e) @@ -2945,11 +2400,11 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse202**](InlineResponse202.md) +[**PropertiesBody**](PropertiesBody.md) ### Authorization -[app_key](../README.md#app_key) +[rest_api_key](../README.md#rest_api_key) ### HTTP request headers diff --git a/docs/DeletePlayerNotFoundResponse.md b/docs/DeletePlayerNotFoundResponse.md deleted file mode 100644 index 3a2efb6..0000000 --- a/docs/DeletePlayerNotFoundResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.DeletePlayerNotFoundResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/DeleteSegmentSuccessResponse.md b/docs/DeleteSegmentSuccessResponse.md deleted file mode 100644 index a9073c4..0000000 --- a/docs/DeleteSegmentSuccessResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.DeleteSegmentSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ExportPlayersRequestBody.md b/docs/ExportSubscriptionsRequestBody.md similarity index 93% rename from docs/ExportPlayersRequestBody.md rename to docs/ExportSubscriptionsRequestBody.md index a560d64..c65378e 100644 --- a/docs/ExportPlayersRequestBody.md +++ b/docs/ExportSubscriptionsRequestBody.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.ExportPlayersRequestBody +# OneSignalApi.Model.ExportSubscriptionsRequestBody ## Properties diff --git a/docs/ExportPlayersSuccessResponse.md b/docs/ExportSubscriptionsSuccessResponse.md similarity index 85% rename from docs/ExportPlayersSuccessResponse.md rename to docs/ExportSubscriptionsSuccessResponse.md index c12ffb6..f7acfc7 100644 --- a/docs/ExportPlayersSuccessResponse.md +++ b/docs/ExportSubscriptionsSuccessResponse.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.ExportPlayersSuccessResponse +# OneSignalApi.Model.ExportSubscriptionsSuccessResponse ## Properties diff --git a/docs/Filter.md b/docs/Filter.md index 298f9a4..1f7c090 100644 --- a/docs/Filter.md +++ b/docs/Filter.md @@ -4,10 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Field** | **string** | Name of the field to use as the first operand in the filter expression. | +**Field** | **string** | Required. Name of the field to use as the first operand in the filter expression. | [optional] **Key** | **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] **Value** | **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] -**Relation** | **string** | Operator of a filter expression. | +**HoursAgo** | **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] +**Radius** | **decimal** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] +**Lat** | **decimal** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] +**Long** | **decimal** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] +**Relation** | **string** | Required. Operator of a filter expression. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FilterExpression.md b/docs/FilterExpression.md new file mode 100644 index 0000000..feb9cd6 --- /dev/null +++ b/docs/FilterExpression.md @@ -0,0 +1,18 @@ +# OneSignalApi.Model.FilterExpression + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Required. Name of the field to use as the first operand in the filter expression. | [optional] +**Key** | **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] +**Value** | **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] +**HoursAgo** | **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] +**Radius** | **decimal** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] +**Lat** | **decimal** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] +**Long** | **decimal** | If `field` is `location`, this is *required* to specify the user's longitude. | [optional] +**Relation** | **string** | Required. Operator of a filter expression. | [optional] +**Operator** | **string** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/FilterExpressions.md b/docs/FilterExpressions.md deleted file mode 100644 index 840e535..0000000 --- a/docs/FilterExpressions.md +++ /dev/null @@ -1,14 +0,0 @@ -# OneSignalApi.Model.FilterExpressions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | Name of the field to use as the first operand in the filter expression. | -**Key** | **string** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] -**Value** | **string** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] -**Relation** | **string** | Operator of a filter expression. | -**Operator** | **string** | Strictly, this must be either `\"OR\"`, or `\"AND\"`. It can be used to compose Filters as part of a Filters object. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GenericError.md b/docs/GenericError.md index 017d46f..81e5592 100644 --- a/docs/GenericError.md +++ b/docs/GenericError.md @@ -4,7 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Errors** | [**List<GenericErrorErrorsInner>**](GenericErrorErrorsInner.md) | | [optional] +**Errors** | **Object** | | [optional] +**Success** | **bool** | | [optional] +**Reference** | **Object** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeletePlayerSuccessResponse.md b/docs/GenericSuccessBoolResponse.md similarity index 86% rename from docs/DeletePlayerSuccessResponse.md rename to docs/GenericSuccessBoolResponse.md index 4cd5cc4..57f9e8e 100644 --- a/docs/DeletePlayerSuccessResponse.md +++ b/docs/GenericSuccessBoolResponse.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.DeletePlayerSuccessResponse +# OneSignalApi.Model.GenericSuccessBoolResponse ## Properties diff --git a/docs/GetNotificationRequestBody.md b/docs/GetNotificationHistoryRequestBody.md similarity index 93% rename from docs/GetNotificationRequestBody.md rename to docs/GetNotificationHistoryRequestBody.md index 876ac59..f38f8c9 100644 --- a/docs/GetNotificationRequestBody.md +++ b/docs/GetNotificationHistoryRequestBody.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.GetNotificationRequestBody +# OneSignalApi.Model.GetNotificationHistoryRequestBody ## Properties diff --git a/docs/GetSegmentsSuccessResponse.md b/docs/GetSegmentsSuccessResponse.md new file mode 100644 index 0000000..17a9491 --- /dev/null +++ b/docs/GetSegmentsSuccessResponse.md @@ -0,0 +1,13 @@ +# OneSignalApi.Model.GetSegmentsSuccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TotalCount** | **int** | The number of Segments in the response. | [optional] +**Offset** | **int** | Set with the offset query parameter. Default 0. | [optional] +**Limit** | **int** | Maximum number of Segments returned. Default 300. | [optional] +**Segments** | [**List<SegmentData>**](SegmentData.md) | An array containing the Segment information. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/InlineResponse2003.md b/docs/InlineResponse2003.md deleted file mode 100644 index 27919ec..0000000 --- a/docs/InlineResponse2003.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.InlineResponse2003 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**InAppMessages** | **List<Object>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/InlineResponse201.md b/docs/InlineResponse201.md deleted file mode 100644 index 03b96ff..0000000 --- a/docs/InlineResponse201.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.InlineResponse201 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/InvalidIdentifierError.md b/docs/InvalidIdentifierError.md deleted file mode 100644 index f8c907a..0000000 --- a/docs/InvalidIdentifierError.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalApi.Model.InvalidIdentifierError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**InvalidExternalUserIds** | **List<string>** | Returned if using include_external_user_ids | [optional] -**InvalidPlayerIds** | **List<string>** | Returned if using include_player_ids and some were valid and others were not. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/StringMap.md b/docs/LanguageStringMap.md similarity index 98% rename from docs/StringMap.md rename to docs/LanguageStringMap.md index 00a3f43..3375489 100644 --- a/docs/StringMap.md +++ b/docs/LanguageStringMap.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.StringMap +# OneSignalApi.Model.LanguageStringMap ## Properties diff --git a/docs/Notification.md b/docs/Notification.md index e38b924..cd1223a 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | **List<string>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | **List<string>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | **List<string>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**IncludeExternalUserIds** | **List<string>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] +**IncludeSubscriptionIds** | **List<string>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] **IncludeEmailTokens** | **List<string>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] **IncludePhoneNumbers** | **List<string>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] -**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] -**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] +**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] +**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | **Dictionary<string, List<string>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] **TargetChannel** | **string** | | [optional] **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] @@ -32,13 +31,12 @@ Name | Type | Description | Notes **IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | **string** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | [**StringMap**](StringMap.md) | | [optional] -**Headings** | [**StringMap**](StringMap.md) | | [optional] -**Subtitle** | [**StringMap**](StringMap.md) | | [optional] +**Contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] **HuaweiMsgType** | **string** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | **string** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -55,7 +53,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | **string** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | **string** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] +**WebButtons** | [**List<WebButton>**](WebButton.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] **IosCategory** | **string** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] **AndroidChannelId** | **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | **string** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -101,6 +99,8 @@ Name | Type | Description | Notes **ThreadId** | **string** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | **decimal?** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] +**IosInterruptionLevel** | **string** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] **EmailSubject** | **string** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | **string** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -109,7 +109,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | **List<string>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | [**List<Filter>**](Filter.md) | | [optional] +**Filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] **CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] **SendAfter** | **DateTime?** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional] diff --git a/docs/Notification200Errors.md b/docs/Notification200Errors.md deleted file mode 100644 index 9af8114..0000000 --- a/docs/Notification200Errors.md +++ /dev/null @@ -1,11 +0,0 @@ -# OneSignalApi.Model.Notification200Errors - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**InvalidExternalUserIds** | **List<string>** | Returned if using include_external_user_ids | [optional] -**InvalidPlayerIds** | **List<string>** | Returned if using include_player_ids and some were valid and others were not. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/NotificationTarget.md b/docs/NotificationTarget.md index 2ee6451..237d863 100644 --- a/docs/NotificationTarget.md +++ b/docs/NotificationTarget.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | **List<string>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | **List<string>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | **List<string>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**IncludeExternalUserIds** | **List<string>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] +**IncludeSubscriptionIds** | **List<string>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] **IncludeEmailTokens** | **List<string>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] **IncludePhoneNumbers** | **List<string>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] -**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] -**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] +**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] +**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | **Dictionary<string, List<string>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] **TargetChannel** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 04f44d6..67c5585 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -6,17 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IncludedSegments** | **List<string>** | The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] **ExcludedSegments** | **List<string>** | Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] | [optional] -**IncludePlayerIds** | **List<string>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**IncludeExternalUserIds** | **List<string>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] +**IncludeSubscriptionIds** | **List<string>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] **IncludeEmailTokens** | **List<string>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] **IncludePhoneNumbers** | **List<string>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] -**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] -**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] +**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] +**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] +**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | **Dictionary<string, List<string>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] **TargetChannel** | **string** | | [optional] **Id** | **string** | | [optional] **Value** | **int** | | [optional] [readonly] @@ -32,13 +31,12 @@ Name | Type | Description | Notes **IsWPWNS** | **bool?** | Indicates whether to send to all devices registered under your app's Windows platform. | [optional] **IsAdm** | **bool?** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional] **IsChrome** | **bool?** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional] -**ChannelForExternalUserIds** | **string** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional] **AppId** | **string** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | **ExternalId** | **string** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **IdempotencyKey** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] -**Contents** | [**StringMap**](StringMap.md) | | [optional] -**Headings** | [**StringMap**](StringMap.md) | | [optional] -**Subtitle** | [**StringMap**](StringMap.md) | | [optional] +**Contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Subtitle** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] **Data** | **Object** | Channel: Push Notifications Platform: Huawei A custom map of data that is passed back to your app. Same as using Additional Data within the dashboard. Can use up to 2048 bytes of data. Example: {\"abc\": 123, \"foo\": \"bar\", \"event_performed\": true, \"amount\": 12.1} | [optional] **HuaweiMsgType** | **string** | Channel: Push Notifications Platform: Huawei Use \"data\" or \"message\" depending on the type of notification you are sending. More details in Data & Background Notifications. | [optional] **Url** | **string** | Channel: Push Notifications Platform: All The URL to open in the browser when a user clicks on the notification. Note: iOS needs https or updated NSAppTransportSecurity in plist This field supports inline substitutions. Omit if including web_url or app_url Example: https://onesignal.com | [optional] @@ -55,7 +53,7 @@ Name | Type | Description | Notes **ChromeBigPicture** | **string** | Channel: Push Notifications Platform: ChromeApp Large picture to display below the notification text. Must be a local URL. | [optional] **ChromeWebImage** | **string** | Channel: Push Notifications Platform: Chrome 56+ Sets the web push notification's large image to be shown below the notification's title and text. Please see Web Push Notification Icons. | [optional] **Buttons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: iOS 8.0+, Android 4.1+, and derivatives like Amazon Buttons to add to the notification. Icon only works for Android. Buttons show in reverse order of array position i.e. Last item in array shows as first button on device. Example: [{\"id\": \"id2\", \"text\": \"second button\", \"icon\": \"ic_menu_share\"}, {\"id\": \"id1\", \"text\": \"first button\", \"icon\": \"ic_menu_send\"}] | [optional] -**WebButtons** | [**List<Button>**](Button.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] +**WebButtons** | [**List<WebButton>**](WebButton.md) | Channel: Push Notifications Platform: Chrome 48+ Add action buttons to the notification. The id field is required. Example: [{\"id\": \"like-button\", \"text\": \"Like\", \"icon\": \"http://i.imgur.com/N8SN8ZS.png\", \"url\": \"https://yoursite.com\"}, {\"id\": \"read-more-button\", \"text\": \"Read more\", \"icon\": \"http://i.imgur.com/MIxJp1L.png\", \"url\": \"https://yoursite.com\"}] | [optional] **IosCategory** | **string** | Channel: Push Notifications Platform: iOS Category APS payload, use with registerUserNotificationSettings:categories in your Objective-C / Swift code. Example: calendar category which contains actions like accept and decline iOS 10+ This will trigger your UNNotificationContentExtension whose ID matches this category. | [optional] **AndroidChannelId** | **string** | Channel: Push Notifications Platform: Android The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] **HuaweiChannelId** | **string** | Channel: Push Notifications Platform: Huawei The Android Oreo Notification Category to send the notification under. See the Category documentation on creating one and getting it's id. | [optional] @@ -101,6 +99,8 @@ Name | Type | Description | Notes **ThreadId** | **string** | Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. | [optional] **SummaryArg** | **string** | Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" | [optional] **SummaryArgCount** | **int** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" | [optional] +**IosRelevanceScore** | **decimal?** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] +**IosInterruptionLevel** | **string** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. | [optional] **EmailSubject** | **string** | Channel: Email Required. The subject of the email. | [optional] **EmailBody** | **string** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **EmailFromName** | **string** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional] @@ -109,7 +109,7 @@ Name | Type | Description | Notes **IncludeUnsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional] **SmsFrom** | **string** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] **SmsMediaUrls** | **List<string>** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] -**Filters** | [**List<Filter>**](Filter.md) | | [optional] +**Filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] **CustomData** | **Object** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional] **Successful** | **int** | Number of notifications that were successfully delivered. | [optional] **Failed** | **int** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] diff --git a/docs/Player.md b/docs/Player.md deleted file mode 100644 index 86fd3e9..0000000 --- a/docs/Player.md +++ /dev/null @@ -1,36 +0,0 @@ -# OneSignalApi.Model.Player - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The device's OneSignal ID | [optional] [readonly] -**InvalidIdentifier** | **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] -**AppId** | **string** | | [optional] -**DeviceType** | **int** | Required The device's platform: 0 = iOS 1 = Android 2 = Amazon 3 = WindowsPhone (MPNS) 4 = Chrome Apps / Extensions 5 = Chrome Web Push 6 = Windows (WNS) 7 = Safari 8 = Firefox 9 = MacOS 10 = Alexa 11 = Email 13 = For Huawei App Gallery Builds SDK Setup. Not for Huawei Devices using FCM 14 = SMS | -**ExternalUserId** | **string** | a custom user ID | [optional] -**ExternalUserIdAuthHash** | **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] -**EmailAuthHash** | **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] -**Identifier** | **string** | Recommended: For Push Notifications, this is the Push Token Identifier from Google or Apple. For Apple Push identifiers, you must strip all non alphanumeric characters. Examples: iOS: 7abcd558f29d0b1f048083e2834ad8ea4b3d87d8ad9c088b33c132706ff445f0 Android: APA91bHbYHk7aq-Uam_2pyJ2qbZvqllyyh2wjfPRaw5gLEX2SUlQBRvOc6sck1sa7H7nGeLNlDco8lXj83HWWwzV... For Email Addresses, set the full email address email@email.com and make sure to set device_type to 11. | [optional] -**Language** | **string** | Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en | [optional] -**Timezone** | **int?** | Number of seconds away from UTC. Example: -28800 | [optional] -**GameVersion** | **string** | Version of your app. Example: 1.1 | [optional] -**DeviceModel** | **string** | Device make and model. Example: iPhone5,1 | [optional] -**DeviceOs** | **string** | Device operating system version. Example: 7.0.4 | [optional] -**AdId** | **string** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] -**Sdk** | **string** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] -**SessionCount** | **int** | Number of times the user has played the game, defaults to 1 | [optional] -**Tags** | **Object** | Custom tags for the player. Only support string and integer key value pairs. Does not support arrays or other nested objects. Setting a tag value to null or an empty string will remove the tag. Example: {\"foo\":\"bar\",\"this\":\"that\"} Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of data Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM | [optional] -**AmountSpent** | **decimal** | Amount the user has spent in USD, up to two decimal places | [optional] -**CreatedAt** | **long** | Unixtime when the player joined the game | [optional] -**Playtime** | **long** | Seconds player was running your app. | [optional] -**BadgeCount** | **int** | Current iOS badge count displayed on the app icon NOTE: Not supported for apps created after June 2018, since badge count for apps created after this date are handled on the client. | [optional] -**LastActive** | **int** | Unixtime when the player was last active | [optional] -**NotificationTypes** | **int** | 1 = subscribed -2 = unsubscribed iOS - These values are set each time the user opens the app from the SDK. Use the SDK function set Subscription instead. Android - You may set this but you can no longer use the SDK method setSubscription later in your app as it will create synchronization issues. | [optional] -**TestType** | **int?** | This is used in deciding whether to use your iOS Sandbox or Production push certificate when sending a push when both have been uploaded. Set to the iOS provisioning profile that was used to build your app. 1 = Development 2 = Ad-Hoc Omit this field for App Store builds. | [optional] -**Long** | **decimal** | Longitude of the device, used for geotagging to segment on. | [optional] -**Lat** | **decimal** | Latitude of the device, used for geotagging to segment on. | [optional] -**Country** | **string** | Country code in the ISO 3166-1 Alpha 2 format | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PlayerNotificationTarget.md b/docs/PlayerNotificationTarget.md deleted file mode 100644 index a8725fb..0000000 --- a/docs/PlayerNotificationTarget.md +++ /dev/null @@ -1,21 +0,0 @@ -# OneSignalApi.Model.PlayerNotificationTarget - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IncludePlayerIds** | **List<string>** | Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] -**IncludeExternalUserIds** | **List<string>** | Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. | [optional] -**IncludeEmailTokens** | **List<string>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] -**IncludePhoneNumbers** | **List<string>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] -**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] -**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] -**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] -**IncludeAliases** | [**PlayerNotificationTargetIncludeAliases**](PlayerNotificationTargetIncludeAliases.md) | | [optional] -**TargetChannel** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PlayerNotificationTargetIncludeAliases.md b/docs/PlayerNotificationTargetIncludeAliases.md deleted file mode 100644 index 4dc5562..0000000 --- a/docs/PlayerNotificationTargetIncludeAliases.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.PlayerNotificationTargetIncludeAliases - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AliasLabel** | **List<string>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PlayerSlice.md b/docs/PlayerSlice.md deleted file mode 100644 index 4d7cc6e..0000000 --- a/docs/PlayerSlice.md +++ /dev/null @@ -1,13 +0,0 @@ -# OneSignalApi.Model.PlayerSlice - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TotalCount** | **int** | | [optional] -**Offset** | **int** | | [optional] -**Limit** | **int** | | [optional] -**Players** | [**List<Player>**](Player.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/InlineResponse202.md b/docs/PropertiesBody.md similarity index 90% rename from docs/InlineResponse202.md rename to docs/PropertiesBody.md index d571f53..aa9881c 100644 --- a/docs/InlineResponse202.md +++ b/docs/PropertiesBody.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.InlineResponse202 +# OneSignalApi.Model.PropertiesBody ## Properties diff --git a/docs/PropertiesDeltas.md b/docs/PropertiesDeltas.md index 4787e45..d0203ed 100644 --- a/docs/PropertiesDeltas.md +++ b/docs/PropertiesDeltas.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SessionTime** | **decimal** | | [optional] -**SessionCount** | **decimal** | | [optional] +**SessionTime** | **int** | | [optional] +**SessionCount** | **int** | | [optional] **Purchases** | [**List<Purchase>**](Purchase.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PropertiesObject.md b/docs/PropertiesObject.md index 3270b93..2f53e95 100644 --- a/docs/PropertiesObject.md +++ b/docs/PropertiesObject.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes **Lat** | **decimal** | | [optional] **Long** | **decimal** | | [optional] **Country** | **string** | | [optional] -**FirstActive** | **decimal** | | [optional] -**LastActive** | **decimal** | | [optional] +**FirstActive** | **int** | | [optional] +**LastActive** | **int** | | [optional] **AmountSpent** | **decimal** | | [optional] **Purchases** | [**List<Purchase>**](Purchase.md) | | [optional] **Ip** | **string** | | [optional] diff --git a/docs/Purchase.md b/docs/Purchase.md index d378a5b..1e4c90a 100644 --- a/docs/Purchase.md +++ b/docs/Purchase.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Sku** | **string** | The unique identifier of the purchased item. | **Amount** | **string** | The amount, in USD, spent purchasing the item. | **Iso** | **string** | The 3-letter ISO 4217 currency code. Required for correct storage and conversion of amount. | -**Count** | **decimal** | | [optional] +**Count** | **int** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BeginLiveActivityRequest.md b/docs/RateLimitError.md similarity index 68% rename from docs/BeginLiveActivityRequest.md rename to docs/RateLimitError.md index b587d7e..f8877a2 100644 --- a/docs/BeginLiveActivityRequest.md +++ b/docs/RateLimitError.md @@ -1,11 +1,11 @@ -# OneSignalApi.Model.BeginLiveActivityRequest +# OneSignalApi.Model.RateLimitError ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PushToken** | **string** | | -**SubscriptionId** | **string** | | +**Errors** | **List<string>** | | [optional] +**Limit** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Segment.md b/docs/Segment.md index 68c91d5..f88cfeb 100644 --- a/docs/Segment.md +++ b/docs/Segment.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | UUID of the segment. If left empty, it will be assigned automaticaly. | [optional] **Name** | **string** | Name of the segment. You'll see this name on the Web UI. | -**Filters** | [**List<FilterExpressions>**](FilterExpressions.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | +**Filters** | [**List<FilterExpression>**](FilterExpression.md) | Filter or operators the segment will have. For a list of available filters with details, please see Send to Users Based on Filters. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SegmentData.md b/docs/SegmentData.md new file mode 100644 index 0000000..5405fb5 --- /dev/null +++ b/docs/SegmentData.md @@ -0,0 +1,16 @@ +# OneSignalApi.Model.SegmentData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The segment ID | [optional] +**Name** | **string** | The segment name | [optional] +**CreatedAt** | **string** | Date segment created | [optional] +**UpdatedAt** | **string** | Date segment last updated | [optional] +**AppId** | **string** | The app id | [optional] +**ReadOnly** | **bool** | Is the segment read only? | [optional] +**IsActive** | **bool** | Is the segment active? | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/SubscriptionObject.md b/docs/Subscription.md similarity index 73% rename from docs/SubscriptionObject.md rename to docs/Subscription.md index 96ff478..6269786 100644 --- a/docs/SubscriptionObject.md +++ b/docs/Subscription.md @@ -1,4 +1,4 @@ -# OneSignalApi.Model.SubscriptionObject +# OneSignalApi.Model.Subscription ## Properties @@ -8,16 +8,16 @@ Name | Type | Description | Notes **Type** | **string** | | [optional] **Token** | **string** | | [optional] **Enabled** | **bool** | | [optional] -**NotificationTypes** | **decimal** | | [optional] -**SessionTime** | **decimal** | | [optional] -**SessionCount** | **decimal** | | [optional] +**NotificationTypes** | **int** | | [optional] +**SessionTime** | **int** | | [optional] +**SessionCount** | **int** | | [optional] **Sdk** | **string** | | [optional] **DeviceModel** | **string** | | [optional] **DeviceOs** | **string** | | [optional] **Rooted** | **bool** | | [optional] -**TestType** | **decimal** | | [optional] +**TestType** | **int** | | [optional] **AppVersion** | **string** | | [optional] -**NetType** | **decimal** | | [optional] +**NetType** | **int** | | [optional] **Carrier** | **string** | | [optional] **WebAuth** | **string** | | [optional] **WebP256** | **string** | | [optional] diff --git a/docs/DeleteSegmentNotFoundResponse.md b/docs/SubscriptionBody.md similarity index 71% rename from docs/DeleteSegmentNotFoundResponse.md rename to docs/SubscriptionBody.md index 0d403f2..69e8041 100644 --- a/docs/DeleteSegmentNotFoundResponse.md +++ b/docs/SubscriptionBody.md @@ -1,10 +1,10 @@ -# OneSignalApi.Model.DeleteSegmentNotFoundResponse +# OneSignalApi.Model.SubscriptionBody ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] +**Subscription** | [**Subscription**](Subscription.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionNotificationTarget.md b/docs/SubscriptionNotificationTarget.md new file mode 100644 index 0000000..336ca63 --- /dev/null +++ b/docs/SubscriptionNotificationTarget.md @@ -0,0 +1,20 @@ +# OneSignalApi.Model.SubscriptionNotificationTarget + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IncludeSubscriptionIds** | **List<string>** | Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call | [optional] +**IncludeEmailTokens** | **List<string>** | Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call | [optional] +**IncludePhoneNumbers** | **List<string>** | Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call | [optional] +**IncludeIosTokens** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call | [optional] +**IncludeWpWnsUris** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call | [optional] +**IncludeAmazonRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeChromeWebRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAndroidRegIds** | **List<string>** | Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call | [optional] +**IncludeAliases** | **Dictionary<string, List<string>>** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] +**TargetChannel** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/TransferSubscriptionRequestBody.md b/docs/TransferSubscriptionRequestBody.md index 0f225bb..56b008a 100644 --- a/docs/TransferSubscriptionRequestBody.md +++ b/docs/TransferSubscriptionRequestBody.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Identity** | **Dictionary<string, Object>** | | [optional] +**Identity** | **Dictionary<string, string>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateLiveActivityRequest.md b/docs/UpdateLiveActivityRequest.md index 46fdb75..b141c23 100644 --- a/docs/UpdateLiveActivityRequest.md +++ b/docs/UpdateLiveActivityRequest.md @@ -4,10 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Type of live activity | +**Name** | **string** | An internal name to assist with your campaign organization. This does not get displayed in the message itself. | **Event** | **string** | | -**EventUpdates** | **Object** | | -**DismissAt** | **decimal** | Timestamp; only allowed if event is \"end\" | [optional] +**EventUpdates** | **Object** | This must match the ContentState interface you have defined within your Live Activity in your app. | +**Contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Headings** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] +**Sound** | **string** | Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. | [optional] +**StaleDate** | **int** | Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale. | [optional] +**DismissalDate** | **int** | Accepts Unix timestamp in seconds; only allowed if event is \"end\" | [optional] +**Priority** | **int** | Delivery priority through the the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateLiveActivitySuccessResponse.md b/docs/UpdateLiveActivitySuccessResponse.md index 097810d..06dcd9d 100644 --- a/docs/UpdateLiveActivitySuccessResponse.md +++ b/docs/UpdateLiveActivitySuccessResponse.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**NotificationId** | **string** | | [optional] -**Errors** | [**Notification200Errors**](Notification200Errors.md) | | [optional] +**Id** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdatePlayerSuccessResponse.md b/docs/UpdatePlayerSuccessResponse.md deleted file mode 100644 index 30a7e95..0000000 --- a/docs/UpdatePlayerSuccessResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UpdatePlayerSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UpdatePlayerTagsRequestBody.md b/docs/UpdatePlayerTagsRequestBody.md deleted file mode 100644 index df75800..0000000 --- a/docs/UpdatePlayerTagsRequestBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UpdatePlayerTagsRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Tags** | **Object** | Custom tags for the device record. Only support string key value pairs. Does not support arrays or other nested objects. Example `{\"foo\":\"bar\",\"this\":\"that\"}`. Limitations: - 100 tags per call - Android SDK users: tags cannot be removed or changed via API if set through SDK sendTag methods. Recommended to only tag devices with 1 kilobyte of ata Please consider using your own Database to save more than 1 kilobyte of data. See: Internal Database & CRM | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UpdatePlayerTagsSuccessResponse.md b/docs/UpdatePlayerTagsSuccessResponse.md deleted file mode 100644 index 461f611..0000000 --- a/docs/UpdatePlayerTagsSuccessResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UpdatePlayerTagsSuccessResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UpdateSubscriptionRequestBody.md b/docs/UpdateSubscriptionRequestBody.md deleted file mode 100644 index dd8cb9b..0000000 --- a/docs/UpdateSubscriptionRequestBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UpdateSubscriptionRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subscription** | [**SubscriptionObject**](SubscriptionObject.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/User.md b/docs/User.md index 926913f..4bd280c 100644 --- a/docs/User.md +++ b/docs/User.md @@ -5,9 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Properties** | [**PropertiesObject**](PropertiesObject.md) | | [optional] -**Identity** | **Dictionary<string, Object>** | | [optional] -**Subscriptions** | [**List<SubscriptionObject>**](SubscriptionObject.md) | | [optional] -**SubscriptionOptions** | [**UserSubscriptionOptions**](UserSubscriptionOptions.md) | | [optional] +**Identity** | **Dictionary<string, string>** | | [optional] +**Subscriptions** | [**List<Subscription>**](Subscription.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse200.md b/docs/UserIdentityBody.md similarity index 73% rename from docs/InlineResponse200.md rename to docs/UserIdentityBody.md index 4182276..ed7b3c8 100644 --- a/docs/InlineResponse200.md +++ b/docs/UserIdentityBody.md @@ -1,10 +1,10 @@ -# OneSignalApi.Model.InlineResponse200 +# OneSignalApi.Model.UserIdentityBody ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Identity** | **Dictionary<string, Object>** | | [optional] +**Identity** | **Dictionary<string, string>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserIdentityRequestBody.md b/docs/UserIdentityRequestBody.md deleted file mode 100644 index c43ae81..0000000 --- a/docs/UserIdentityRequestBody.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UserIdentityRequestBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Identity** | **Dictionary<string, Object>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UserIdentityResponse.md b/docs/UserIdentityResponse.md deleted file mode 100644 index 05a665d..0000000 --- a/docs/UserIdentityResponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UserIdentityResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Identity** | **Dictionary<string, Object>** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UserSubscriptionOptions.md b/docs/UserSubscriptionOptions.md deleted file mode 100644 index cdefd17..0000000 --- a/docs/UserSubscriptionOptions.md +++ /dev/null @@ -1,10 +0,0 @@ -# OneSignalApi.Model.UserSubscriptionOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RetainPreviousOwner** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CancelNotificationSuccessResponse.md b/docs/WebButton.md similarity index 61% rename from docs/CancelNotificationSuccessResponse.md rename to docs/WebButton.md index 5f973c9..6829cb5 100644 --- a/docs/CancelNotificationSuccessResponse.md +++ b/docs/WebButton.md @@ -1,10 +1,13 @@ -# OneSignalApi.Model.CancelNotificationSuccessResponse +# OneSignalApi.Model.WebButton ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Success** | **bool** | | [optional] +**Id** | **string** | | +**Text** | **string** | | [optional] +**Icon** | **string** | | [optional] +**Url** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/OneSignalApi/Api/DefaultApi.cs b/src/OneSignalApi/Api/DefaultApi.cs index ca9a7be..06adebe 100644 --- a/src/OneSignalApi/Api/DefaultApi.cs +++ b/src/OneSignalApi/Api/DefaultApi.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -28,57 +28,86 @@ public interface IDefaultApiSync : IApiAccessor { #region Synchronous Operations /// - /// Start Live Activity + /// Stop a scheduled or currently outgoing notification /// /// - /// Starts a Live Activity + /// Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. - /// - void BeginLiveActivity(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0); + /// GenericSuccessBoolResponse + GenericSuccessBoolResponse CancelNotification(string appId, string notificationId, int operationIndex = 0); /// - /// Start Live Activity + /// Stop a scheduled or currently outgoing notification /// /// - /// Starts a Live Activity + /// Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse BeginLiveActivityWithHttpInfo(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0); + /// ApiResponse of GenericSuccessBoolResponse + ApiResponse CancelNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0); /// - /// Stop a scheduled or currently outgoing notification + /// /// /// - /// Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. - /// CancelNotificationSuccessResponse - CancelNotificationSuccessResponse CancelNotification(string appId, string notificationId, int operationIndex = 0); + /// UserIdentityBody + UserIdentityBody CreateAlias(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0); /// - /// Stop a scheduled or currently outgoing notification + /// /// /// - /// Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// + /// Index associated with the operation. + /// ApiResponse of UserIdentityBody + ApiResponse CreateAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0); + /// + /// + /// + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// + /// Index associated with the operation. + /// UserIdentityBody + UserIdentityBody CreateAliasBySubscription(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0); + + /// + /// + /// + /// + /// Upserts one or more Aliases for the User identified by :subscription_id. + /// + /// Thrown when fails to make API call + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of CancelNotificationSuccessResponse - ApiResponse CancelNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0); + /// ApiResponse of UserIdentityBody + ApiResponse CreateAliasBySubscriptionWithHttpInfo(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0); /// /// Create an app /// @@ -126,53 +155,30 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of CreateNotificationSuccessResponse ApiResponse CreateNotificationWithHttpInfo(Notification notification, int operationIndex = 0); /// - /// Add a device - /// - /// - /// Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// CreatePlayerSuccessResponse - CreatePlayerSuccessResponse CreatePlayer(Player player, int operationIndex = 0); - - /// - /// Add a device + /// Create Segment /// /// - /// Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of CreatePlayerSuccessResponse - ApiResponse CreatePlayerWithHttpInfo(Player player, int operationIndex = 0); - /// - /// Create Segments - /// - /// - /// Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// (optional) /// Index associated with the operation. /// CreateSegmentSuccessResponse - CreateSegmentSuccessResponse CreateSegments(string appId, Segment segment = default(Segment), int operationIndex = 0); + CreateSegmentSuccessResponse CreateSegment(string appId, Segment segment = default(Segment), int operationIndex = 0); /// - /// Create Segments + /// Create Segment /// /// - /// Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// (optional) /// Index associated with the operation. /// ApiResponse of CreateSegmentSuccessResponse - ApiResponse CreateSegmentsWithHttpInfo(string appId, Segment segment = default(Segment), int operationIndex = 0); + ApiResponse CreateSegmentWithHttpInfo(string appId, Segment segment = default(Segment), int operationIndex = 0); /// /// /// @@ -183,10 +189,10 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// - /// + /// /// Index associated with the operation. - /// InlineResponse201 - InlineResponse201 CreateSubscription(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0); + /// SubscriptionBody + SubscriptionBody CreateSubscription(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0); /// /// @@ -198,10 +204,10 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// - /// + /// /// Index associated with the operation. - /// ApiResponse of InlineResponse201 - ApiResponse CreateSubscriptionWithHttpInfo(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0); + /// ApiResponse of SubscriptionBody + ApiResponse CreateSubscriptionWithHttpInfo(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0); /// /// /// @@ -239,8 +245,8 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Index associated with the operation. - /// InlineResponse200 - InlineResponse200 DeleteAlias(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0); + /// UserIdentityBody + UserIdentityBody DeleteAlias(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0); /// /// @@ -254,58 +260,33 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Index associated with the operation. - /// ApiResponse of InlineResponse200 - ApiResponse DeleteAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0); - /// - /// Delete a user record - /// - /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id - /// Index associated with the operation. - /// DeletePlayerSuccessResponse - DeletePlayerSuccessResponse DeletePlayer(string appId, string playerId, int operationIndex = 0); - - /// - /// Delete a user record - /// - /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id - /// Index associated with the operation. - /// ApiResponse of DeletePlayerSuccessResponse - ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0); + /// ApiResponse of UserIdentityBody + ApiResponse DeleteAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0); /// - /// Delete Segments + /// Delete Segment /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. - /// DeleteSegmentSuccessResponse - DeleteSegmentSuccessResponse DeleteSegments(string appId, string segmentId, int operationIndex = 0); + /// GenericSuccessBoolResponse + GenericSuccessBoolResponse DeleteSegment(string appId, string segmentId, int operationIndex = 0); /// - /// Delete Segments + /// Delete Segment /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. - /// ApiResponse of DeleteSegmentSuccessResponse - ApiResponse DeleteSegmentsWithHttpInfo(string appId, string segmentId, int operationIndex = 0); + /// ApiResponse of GenericSuccessBoolResponse + ApiResponse DeleteSegmentWithHttpInfo(string appId, string segmentId, int operationIndex = 0); /// /// /// @@ -359,33 +340,6 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of Object(void) ApiResponse DeleteUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); /// - /// Stop Live Activity - /// - /// - /// Stops a Live Activity - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID - /// Index associated with the operation. - /// - void EndLiveActivity(string appId, string activityId, string subscriptionId, int operationIndex = 0); - - /// - /// Stop Live Activity - /// - /// - /// Stops a Live Activity - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse EndLiveActivityWithHttpInfo(string appId, string activityId, string subscriptionId, int operationIndex = 0); - /// /// Export CSV of Events /// /// @@ -411,109 +365,82 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of ExportEventsSuccessResponse ApiResponse ExportEventsWithHttpInfo(string notificationId, string appId, int operationIndex = 0); /// - /// Export CSV of Players + /// Export CSV of Subscriptions /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from - /// (optional) + /// (optional) /// Index associated with the operation. - /// ExportPlayersSuccessResponse - ExportPlayersSuccessResponse ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); + /// ExportSubscriptionsSuccessResponse + ExportSubscriptionsSuccessResponse ExportSubscriptions(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0); /// - /// Export CSV of Players + /// Export CSV of Subscriptions /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from - /// (optional) + /// (optional) /// Index associated with the operation. - /// ApiResponse of ExportPlayersSuccessResponse - ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0); + /// ApiResponse of ExportSubscriptionsSuccessResponse + ApiResponse ExportSubscriptionsWithHttpInfo(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0); /// /// /// /// - /// Lists all Aliases for the User identified by :subscription_id. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// UserIdentityResponse - UserIdentityResponse FetchAliases(string appId, string subscriptionId, int operationIndex = 0); - - /// - /// - /// - /// - /// Lists all Aliases for the User identified by :subscription_id. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of UserIdentityResponse - ApiResponse FetchAliasesWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0); - /// - /// - /// - /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// /// /// /// Index associated with the operation. - /// User - User FetchUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// UserIdentityBody + UserIdentityBody GetAliases(string appId, string aliasLabel, string aliasId, int operationIndex = 0); /// /// /// /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// /// /// /// Index associated with the operation. - /// ApiResponse of User - ApiResponse FetchUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// ApiResponse of UserIdentityBody + ApiResponse GetAliasesWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); /// /// /// /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call /// - /// - /// + /// /// Index associated with the operation. - /// InlineResponse200 - InlineResponse200 FetchUserIdentity(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// UserIdentityBody + UserIdentityBody GetAliasesBySubscription(string appId, string subscriptionId, int operationIndex = 0); /// /// /// /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call /// - /// - /// + /// /// Index associated with the operation. - /// ApiResponse of InlineResponse200 - ApiResponse FetchUserIdentityWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); + /// ApiResponse of UserIdentityBody + ApiResponse GetAliasesBySubscriptionWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0); /// /// View an app /// @@ -559,31 +486,6 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of List<App> ApiResponse> GetAppsWithHttpInfo(int operationIndex = 0); /// - /// - /// - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// InlineResponse2003 - InlineResponse2003 GetEligibleIams(string appId, string subscriptionId, int operationIndex = 0); - - /// - /// - /// - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of InlineResponse2003 - ApiResponse GetEligibleIamsWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0); - /// /// View notification /// /// @@ -616,10 +518,10 @@ public interface IDefaultApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The \"id\" of the message found in the Notification object - /// + /// /// Index associated with the operation. /// NotificationHistorySuccessResponse - NotificationHistorySuccessResponse GetNotificationHistory(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0); + NotificationHistorySuccessResponse GetNotificationHistory(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0); /// /// Notification History @@ -629,10 +531,10 @@ public interface IDefaultApiSync : IApiAccessor /// /// Thrown when fails to make API call /// The \"id\" of the message found in the Notification object - /// + /// /// Index associated with the operation. /// ApiResponse of NotificationHistorySuccessResponse - ApiResponse GetNotificationHistoryWithHttpInfo(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0); + ApiResponse GetNotificationHistoryWithHttpInfo(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0); /// /// View notifications /// @@ -696,142 +598,113 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of OutcomesData ApiResponse GetOutcomesWithHttpInfo(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0); /// - /// View device - /// - /// - /// View the details of an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) - /// Index associated with the operation. - /// Player - Player GetPlayer(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0); - - /// - /// View device - /// - /// - /// View the details of an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) - /// Index associated with the operation. - /// ApiResponse of Player - ApiResponse GetPlayerWithHttpInfo(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0); - /// - /// View devices + /// Get Segments /// /// - /// View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. - /// PlayerSlice - PlayerSlice GetPlayers(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0); + /// GetSegmentsSuccessResponse + GetSegmentsSuccessResponse GetSegments(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0); /// - /// View devices + /// Get Segments /// /// - /// View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. - /// ApiResponse of PlayerSlice - ApiResponse GetPlayersWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0); + /// ApiResponse of GetSegmentsSuccessResponse + ApiResponse GetSegmentsWithHttpInfo(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0); /// /// /// /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// /// /// - /// /// Index associated with the operation. - /// InlineResponse200 - InlineResponse200 IdentifyUserByAlias(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + /// User + User GetUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0); /// /// /// /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// /// /// - /// /// Index associated with the operation. - /// ApiResponse of InlineResponse200 - ApiResponse IdentifyUserByAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + /// ApiResponse of User + ApiResponse GetUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0); /// /// /// /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. - /// UserIdentityResponse - UserIdentityResponse IdentifyUserBySubscriptionId(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + /// UserIdentityBody + UserIdentityBody TransferSubscription(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0); /// /// /// /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. - /// ApiResponse of UserIdentityResponse - ApiResponse IdentifyUserBySubscriptionIdWithHttpInfo(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0); + /// ApiResponse of UserIdentityBody + ApiResponse TransferSubscriptionWithHttpInfo(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0); /// - /// + /// Unsubscribe with token /// /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. - /// UserIdentityResponse - UserIdentityResponse TransferSubscription(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0); + /// GenericSuccessBoolResponse + GenericSuccessBoolResponse UnsubscribeEmailWithToken(string appId, string notificationId, string token, int operationIndex = 0); /// - /// + /// Unsubscribe with token /// /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. - /// ApiResponse of UserIdentityResponse - ApiResponse TransferSubscriptionWithHttpInfo(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0); + /// ApiResponse of GenericSuccessBoolResponse + ApiResponse UnsubscribeEmailWithTokenWithHttpInfo(string appId, string notificationId, string token, int operationIndex = 0); /// /// Update an app /// @@ -885,58 +758,6 @@ public interface IDefaultApiSync : IApiAccessor /// ApiResponse of UpdateLiveActivitySuccessResponse ApiResponse UpdateLiveActivityWithHttpInfo(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0); /// - /// Edit device - /// - /// - /// Update an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Player's OneSignal ID - /// - /// Index associated with the operation. - /// UpdatePlayerSuccessResponse - UpdatePlayerSuccessResponse UpdatePlayer(string playerId, Player player, int operationIndex = 0); - - /// - /// Edit device - /// - /// - /// Update an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Player's OneSignal ID - /// - /// Index associated with the operation. - /// ApiResponse of UpdatePlayerSuccessResponse - ApiResponse UpdatePlayerWithHttpInfo(string playerId, Player player, int operationIndex = 0); - /// - /// Edit tags with external user id - /// - /// - /// Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } - /// - /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) - /// Index associated with the operation. - /// UpdatePlayerTagsSuccessResponse - UpdatePlayerTagsSuccessResponse UpdatePlayerTags(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0); - - /// - /// Edit tags with external user id - /// - /// - /// Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } - /// - /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) - /// Index associated with the operation. - /// ApiResponse of UpdatePlayerTagsSuccessResponse - ApiResponse UpdatePlayerTagsWithHttpInfo(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0); - /// /// /// /// @@ -945,10 +766,10 @@ public interface IDefaultApiSync : IApiAccessor /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// - void UpdateSubscription(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0); + void UpdateSubscription(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0); /// /// @@ -959,10 +780,10 @@ public interface IDefaultApiSync : IApiAccessor /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdateSubscriptionWithHttpInfo(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0); + ApiResponse UpdateSubscriptionWithHttpInfo(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0); /// /// /// @@ -975,8 +796,8 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Index associated with the operation. - /// InlineResponse202 - InlineResponse202 UpdateUser(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0); + /// PropertiesBody + PropertiesBody UpdateUser(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0); /// /// @@ -990,8 +811,8 @@ public interface IDefaultApiSync : IApiAccessor /// /// /// Index associated with the operation. - /// ApiResponse of InlineResponse202 - ApiResponse UpdateUserWithHttpInfo(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0); + /// ApiResponse of PropertiesBody + ApiResponse UpdateUserWithHttpInfo(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0); #endregion Synchronous Operations } @@ -1002,141 +823,147 @@ public interface IDefaultApiAsync : IApiAccessor { #region Asynchronous Operations /// - /// Start Live Activity + /// Stop a scheduled or currently outgoing notification /// /// - /// Starts a Live Activity + /// Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task BeginLiveActivityAsync(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of GenericSuccessBoolResponse + System.Threading.Tasks.Task CancelNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Start Live Activity + /// Stop a scheduled or currently outgoing notification /// /// - /// Starts a Live Activity + /// Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> BeginLiveActivityWithHttpInfoAsync(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (GenericSuccessBoolResponse) + System.Threading.Tasks.Task> CancelNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Stop a scheduled or currently outgoing notification + /// /// /// - /// Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of CancelNotificationSuccessResponse - System.Threading.Tasks.Task CancelNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of UserIdentityBody + System.Threading.Tasks.Task CreateAliasAsync(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Stop a scheduled or currently outgoing notification + /// /// /// - /// Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CancelNotificationSuccessResponse) - System.Threading.Tasks.Task> CancelNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (UserIdentityBody) + System.Threading.Tasks.Task> CreateAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create an app + /// /// /// - /// Creates a new OneSignal app + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of App - System.Threading.Tasks.Task CreateAppAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of UserIdentityBody + System.Threading.Tasks.Task CreateAliasBySubscriptionAsync(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create an app + /// /// /// - /// Creates a new OneSignal app + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (App) - System.Threading.Tasks.Task> CreateAppWithHttpInfoAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (UserIdentityBody) + System.Threading.Tasks.Task> CreateAliasBySubscriptionWithHttpInfoAsync(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create notification + /// Create an app /// /// - /// Sends notifications to your users + /// Creates a new OneSignal app /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of CreateNotificationSuccessResponse - System.Threading.Tasks.Task CreateNotificationAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of App + System.Threading.Tasks.Task CreateAppAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create notification + /// Create an app /// /// - /// Sends notifications to your users + /// Creates a new OneSignal app /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CreateNotificationSuccessResponse) - System.Threading.Tasks.Task> CreateNotificationWithHttpInfoAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (App) + System.Threading.Tasks.Task> CreateAppWithHttpInfoAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Add a device + /// Create notification /// /// - /// Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. + /// Sends notifications to your users /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of CreatePlayerSuccessResponse - System.Threading.Tasks.Task CreatePlayerAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of CreateNotificationSuccessResponse + System.Threading.Tasks.Task CreateNotificationAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Add a device + /// Create notification /// /// - /// Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. + /// Sends notifications to your users /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CreatePlayerSuccessResponse) - System.Threading.Tasks.Task> CreatePlayerWithHttpInfoAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (CreateNotificationSuccessResponse) + System.Threading.Tasks.Task> CreateNotificationWithHttpInfoAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create Segments + /// Create Segment /// /// - /// Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. @@ -1144,13 +971,13 @@ public interface IDefaultApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of CreateSegmentSuccessResponse - System.Threading.Tasks.Task CreateSegmentsAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CreateSegmentAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Create Segments + /// Create Segment /// /// - /// Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. @@ -1158,7 +985,7 @@ public interface IDefaultApiAsync : IApiAccessor /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CreateSegmentSuccessResponse) - System.Threading.Tasks.Task> CreateSegmentsWithHttpInfoAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateSegmentWithHttpInfoAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -1169,11 +996,11 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse201 - System.Threading.Tasks.Task CreateSubscriptionAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of SubscriptionBody + System.Threading.Tasks.Task CreateSubscriptionAsync(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1185,11 +1012,11 @@ public interface IDefaultApiAsync : IApiAccessor /// /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse201) - System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (SubscriptionBody) + System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -1230,8 +1057,8 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse200 - System.Threading.Tasks.Task DeleteAliasAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of UserIdentityBody + System.Threading.Tasks.Task DeleteAliasAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -1246,62 +1073,35 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse200) - System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Delete a user record - /// - /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of DeletePlayerSuccessResponse - System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Delete a user record - /// - /// - /// Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeletePlayerSuccessResponse) - System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (UserIdentityBody) + System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete Segments + /// Delete Segment /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of DeleteSegmentSuccessResponse - System.Threading.Tasks.Task DeleteSegmentsAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of GenericSuccessBoolResponse + System.Threading.Tasks.Task DeleteSegmentAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Delete Segments + /// Delete Segment /// /// - /// Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeleteSegmentSuccessResponse) - System.Threading.Tasks.Task> DeleteSegmentsWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (GenericSuccessBoolResponse) + System.Threading.Tasks.Task> DeleteSegmentWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -1359,35 +1159,6 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Stop Live Activity - /// - /// - /// Stops a Live Activity - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task EndLiveActivityAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Stop Live Activity - /// - /// - /// Stops a Live Activity - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> EndLiveActivityWithHttpInfoAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// /// Export CSV of Events /// /// @@ -1415,64 +1186,37 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (ExportEventsSuccessResponse) System.Threading.Tasks.Task> ExportEventsWithHttpInfoAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Export CSV of Players + /// Export CSV of Subscriptions /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from - /// (optional) + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ExportPlayersSuccessResponse - System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ExportSubscriptionsSuccessResponse + System.Threading.Tasks.Task ExportSubscriptionsAsync(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Export CSV of Players + /// Export CSV of Subscriptions /// /// /// Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call /// The app ID that you want to export devices from - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ExportPlayersSuccessResponse) - System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// - /// - /// - /// Lists all Aliases for the User identified by :subscription_id. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of UserIdentityResponse - System.Threading.Tasks.Task FetchAliasesAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// - /// - /// - /// Lists all Aliases for the User identified by :subscription_id. - /// - /// Thrown when fails to make API call - /// - /// + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserIdentityResponse) - System.Threading.Tasks.Task> FetchAliasesWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (ExportSubscriptionsSuccessResponse) + System.Threading.Tasks.Task> ExportSubscriptionsWithHttpInfoAsync(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// @@ -1480,14 +1224,14 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of User - System.Threading.Tasks.Task FetchUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of UserIdentityBody + System.Threading.Tasks.Task GetAliasesAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// @@ -1495,37 +1239,35 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (User) - System.Threading.Tasks.Task> FetchUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (UserIdentityBody) + System.Threading.Tasks.Task> GetAliasesWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call /// - /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse200 - System.Threading.Tasks.Task FetchUserIdentityAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of UserIdentityBody + System.Threading.Tasks.Task GetAliasesBySubscriptionAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// Lists all Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call /// - /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse200) - System.Threading.Tasks.Task> FetchUserIdentityWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (UserIdentityBody) + System.Threading.Tasks.Task> GetAliasesBySubscriptionWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// View an app /// @@ -1575,33 +1317,6 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (List<App>) System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// - /// - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of InlineResponse2003 - System.Threading.Tasks.Task GetEligibleIamsAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// - /// - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2003) - System.Threading.Tasks.Task> GetEligibleIamsWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// /// View notification /// /// @@ -1636,11 +1351,11 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The \"id\" of the message found in the Notification object - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of NotificationHistorySuccessResponse - System.Threading.Tasks.Task GetNotificationHistoryAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task GetNotificationHistoryAsync(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Notification History @@ -1650,11 +1365,11 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Thrown when fails to make API call /// The \"id\" of the message found in the Notification object - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (NotificationHistorySuccessResponse) - System.Threading.Tasks.Task> GetNotificationHistoryWithHttpInfoAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetNotificationHistoryWithHttpInfoAsync(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// View notifications /// @@ -1722,152 +1437,121 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (OutcomesData) System.Threading.Tasks.Task> GetOutcomesWithHttpInfoAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// View device - /// - /// - /// View the details of an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Player - System.Threading.Tasks.Task GetPlayerAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// View device - /// - /// - /// View the details of an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Player) - System.Threading.Tasks.Task> GetPlayerWithHttpInfoAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// View devices + /// Get Segments /// /// - /// View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of PlayerSlice - System.Threading.Tasks.Task GetPlayersAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of GetSegmentsSuccessResponse + System.Threading.Tasks.Task GetSegmentsAsync(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// View devices + /// Get Segments /// /// - /// View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (PlayerSlice) - System.Threading.Tasks.Task> GetPlayersWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (GetSegmentsSuccessResponse) + System.Threading.Tasks.Task> GetSegmentsWithHttpInfoAsync(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// /// /// - /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse200 - System.Threading.Tasks.Task IdentifyUserByAliasAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of User + System.Threading.Tasks.Task GetUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// /// /// - /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse200) - System.Threading.Tasks.Task> IdentifyUserByAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (User) + System.Threading.Tasks.Task> GetUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UserIdentityResponse - System.Threading.Tasks.Task IdentifyUserBySubscriptionIdAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of UserIdentityBody + System.Threading.Tasks.Task TransferSubscriptionAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserIdentityResponse) - System.Threading.Tasks.Task> IdentifyUserBySubscriptionIdWithHttpInfoAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (UserIdentityBody) + System.Threading.Tasks.Task> TransferSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// + /// Unsubscribe with token /// /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UserIdentityResponse - System.Threading.Tasks.Task TransferSubscriptionAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of GenericSuccessBoolResponse + System.Threading.Tasks.Task UnsubscribeEmailWithTokenAsync(string appId, string notificationId, string token, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// + /// Unsubscribe with token /// /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserIdentityResponse) - System.Threading.Tasks.Task> TransferSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (GenericSuccessBoolResponse) + System.Threading.Tasks.Task> UnsubscribeEmailWithTokenWithHttpInfoAsync(string appId, string notificationId, string token, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Update an app /// @@ -1925,62 +1609,6 @@ public interface IDefaultApiAsync : IApiAccessor /// Task of ApiResponse (UpdateLiveActivitySuccessResponse) System.Threading.Tasks.Task> UpdateLiveActivityWithHttpInfoAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Edit device - /// - /// - /// Update an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Player's OneSignal ID - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of UpdatePlayerSuccessResponse - System.Threading.Tasks.Task UpdatePlayerAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Edit device - /// - /// - /// Update an existing device in one of your OneSignal apps - /// - /// Thrown when fails to make API call - /// Player's OneSignal ID - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdatePlayerSuccessResponse) - System.Threading.Tasks.Task> UpdatePlayerWithHttpInfoAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// - /// Edit tags with external user id - /// - /// - /// Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } - /// - /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of UpdatePlayerTagsSuccessResponse - System.Threading.Tasks.Task UpdatePlayerTagsAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - - /// - /// Edit tags with external user id - /// - /// - /// Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } - /// - /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdatePlayerTagsSuccessResponse) - System.Threading.Tasks.Task> UpdatePlayerTagsWithHttpInfoAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - /// /// /// /// @@ -1989,11 +1617,11 @@ public interface IDefaultApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdateSubscriptionAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdateSubscriptionAsync(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -2004,11 +1632,11 @@ public interface IDefaultApiAsync : IApiAccessor /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -2022,8 +1650,8 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse202 - System.Threading.Tasks.Task UpdateUserAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of PropertiesBody + System.Threading.Tasks.Task UpdateUserAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -2038,8 +1666,8 @@ public interface IDefaultApiAsync : IApiAccessor /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse202) - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// Task of ApiResponse (PropertiesBody) + System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -2161,52 +1789,44 @@ public OneSignalApi.Client.ExceptionFactory ExceptionFactory } /// - /// Start Live Activity Starts a Live Activity + /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. - /// - public void BeginLiveActivity(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0) + /// GenericSuccessBoolResponse + public GenericSuccessBoolResponse CancelNotification(string appId, string notificationId, int operationIndex = 0) { - BeginLiveActivityWithHttpInfo(appId, activityId, beginLiveActivityRequest); + OneSignalApi.Client.ApiResponse localVarResponse = CancelNotificationWithHttpInfo(appId, notificationId); + return localVarResponse.Data; } /// - /// Start Live Activity Starts a Live Activity + /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. - /// ApiResponse of Object(void) - public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0) + /// ApiResponse of GenericSuccessBoolResponse + public OneSignalApi.Client.ApiResponse CancelNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->BeginLiveActivity"); - } - - // verify the required parameter 'activityId' is set - if (activityId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->BeginLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CancelNotification"); } - // verify the required parameter 'beginLiveActivityRequest' is set - if (beginLiveActivityRequest == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'beginLiveActivityRequest' when calling DefaultApi->BeginLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->CancelNotification"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -2226,14 +1846,13 @@ public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.Data = beginLiveActivityRequest; + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.BeginLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.CancelNotification"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2241,10 +1860,10 @@ public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(str } // make the HTTP request - var localVarResponse = this.Client.Post("/apps/{app_id}/live_activities/{activity_id}/token", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/notifications/{notification_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("BeginLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("CancelNotification", localVarResponse); if (_exception != null) { throw _exception; @@ -2255,55 +1874,47 @@ public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(str } /// - /// Start Live Activity Starts a Live Activity + /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task BeginLiveActivityAsync(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of GenericSuccessBoolResponse + public async System.Threading.Tasks.Task CancelNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await BeginLiveActivityWithHttpInfoAsync(appId, activityId, beginLiveActivityRequest, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CancelNotificationWithHttpInfoAsync(appId, notificationId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// - /// Start Live Activity Starts a Live Activity + /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> BeginLiveActivityWithHttpInfoAsync(string appId, string activityId, BeginLiveActivityRequest beginLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (GenericSuccessBoolResponse) + public async System.Threading.Tasks.Task> CancelNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->BeginLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CancelNotification"); } - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->BeginLiveActivity"); - } - - // verify the required parameter 'beginLiveActivityRequest' is set - if (beginLiveActivityRequest == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'beginLiveActivityRequest' when calling DefaultApi->BeginLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->CancelNotification"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -2323,14 +1934,13 @@ public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(str localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.Data = beginLiveActivityRequest; + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.BeginLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.CancelNotification"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2338,11 +1948,11 @@ public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(str } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/live_activities/{activity_id}/token", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/notifications/{notification_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("BeginLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("CancelNotification", localVarResponse); if (_exception != null) { throw _exception; @@ -2353,44 +1963,61 @@ public OneSignalApi.Client.ApiResponse BeginLiveActivityWithHttpInfo(str } /// - /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. - /// CancelNotificationSuccessResponse - public CancelNotificationSuccessResponse CancelNotification(string appId, string notificationId, int operationIndex = 0) + /// UserIdentityBody + public UserIdentityBody CreateAlias(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = CancelNotificationWithHttpInfo(appId, notificationId); + OneSignalApi.Client.ApiResponse localVarResponse = CreateAliasWithHttpInfo(appId, aliasLabel, aliasId, userIdentityBody); return localVarResponse.Data; } /// - /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of CancelNotificationSuccessResponse - public OneSignalApi.Client.ApiResponse CancelNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0) + /// ApiResponse of UserIdentityBody + public OneSignalApi.Client.ApiResponse CreateAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CancelNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateAlias"); } - // verify the required parameter 'notificationId' is set - if (notificationId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->CancelNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->CreateAlias"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->CreateAlias"); + } + + // verify the required parameter 'userIdentityBody' is set + if (userIdentityBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityBody' when calling DefaultApi->CreateAlias"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -2410,13 +2037,15 @@ public OneSignalApi.Client.ApiResponse Cancel localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = userIdentityBody; - localVarRequestOptions.Operation = "DefaultApi.CancelNotification"; + localVarRequestOptions.Operation = "DefaultApi.CreateAlias"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2424,10 +2053,10 @@ public OneSignalApi.Client.ApiResponse Cancel } // make the HTTP request - var localVarResponse = this.Client.Delete("/notifications/{notification_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Patch("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CancelNotification", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateAlias", localVarResponse); if (_exception != null) { throw _exception; @@ -2438,47 +2067,64 @@ public OneSignalApi.Client.ApiResponse Cancel } /// - /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of CancelNotificationSuccessResponse - public async System.Threading.Tasks.Task CancelNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityBody + public async System.Threading.Tasks.Task CreateAliasAsync(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await CancelNotificationWithHttpInfoAsync(appId, notificationId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateAliasWithHttpInfoAsync(appId, aliasLabel, aliasId, userIdentityBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Stop a scheduled or currently outgoing notification Used to stop a scheduled or currently outgoing notification + /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call /// - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CancelNotificationSuccessResponse) - public async System.Threading.Tasks.Task> CancelNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityBody) + public async System.Threading.Tasks.Task> CreateAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CancelNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateAlias"); } - // verify the required parameter 'notificationId' is set - if (notificationId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->CancelNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->CreateAlias"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->CreateAlias"); + } + + // verify the required parameter 'userIdentityBody' is set + if (userIdentityBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityBody' when calling DefaultApi->CreateAlias"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -2498,13 +2144,15 @@ public OneSignalApi.Client.ApiResponse Cancel localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter + localVarRequestOptions.Data = userIdentityBody; - localVarRequestOptions.Operation = "DefaultApi.CancelNotification"; + localVarRequestOptions.Operation = "DefaultApi.CreateAlias"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2512,11 +2160,11 @@ public OneSignalApi.Client.ApiResponse Cancel } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/notifications/{notification_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CancelNotification", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateAlias", localVarResponse); if (_exception != null) { throw _exception; @@ -2527,31 +2175,47 @@ public OneSignalApi.Client.ApiResponse Cancel } /// - /// Create an app Creates a new OneSignal app + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// + /// + /// + /// /// Index associated with the operation. - /// App - public App CreateApp(App app, int operationIndex = 0) + /// UserIdentityBody + public UserIdentityBody CreateAliasBySubscription(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = CreateAppWithHttpInfo(app); + OneSignalApi.Client.ApiResponse localVarResponse = CreateAliasBySubscriptionWithHttpInfo(appId, subscriptionId, userIdentityBody); return localVarResponse.Data; } /// - /// Create an app Creates a new OneSignal app + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of App - public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int operationIndex = 0) + /// ApiResponse of UserIdentityBody + public OneSignalApi.Client.ApiResponse CreateAliasBySubscriptionWithHttpInfo(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0) { - // verify the required parameter 'app' is set - if (app == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->CreateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateAliasBySubscription"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->CreateAliasBySubscription"); + } + + // verify the required parameter 'userIdentityBody' is set + if (userIdentityBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityBody' when calling DefaultApi->CreateAliasBySubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -2577,12 +2241,14 @@ public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int o localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = app; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = userIdentityBody; - localVarRequestOptions.Operation = "DefaultApi.CreateApp"; + localVarRequestOptions.Operation = "DefaultApi.CreateAliasBySubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2590,10 +2256,10 @@ public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int o } // make the HTTP request - var localVarResponse = this.Client.Post("/apps", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateApp", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateAliasBySubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -2604,33 +2270,49 @@ public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int o } /// - /// Create an app Creates a new OneSignal app + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of App - public async System.Threading.Tasks.Task CreateAppAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityBody + public async System.Threading.Tasks.Task CreateAliasBySubscriptionAsync(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await CreateAppWithHttpInfoAsync(app, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateAliasBySubscriptionWithHttpInfoAsync(appId, subscriptionId, userIdentityBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Create an app Creates a new OneSignal app + /// Upserts one or more Aliases for the User identified by :subscription_id. /// /// Thrown when fails to make API call - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (App) - public async System.Threading.Tasks.Task> CreateAppWithHttpInfoAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityBody) + public async System.Threading.Tasks.Task> CreateAliasBySubscriptionWithHttpInfoAsync(string appId, string subscriptionId, UserIdentityBody userIdentityBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'app' is set - if (app == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->CreateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateAliasBySubscription"); + } + + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->CreateAliasBySubscription"); + } + + // verify the required parameter 'userIdentityBody' is set + if (userIdentityBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityBody' when calling DefaultApi->CreateAliasBySubscription"); } @@ -2657,12 +2339,14 @@ public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int o localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = app; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = userIdentityBody; - localVarRequestOptions.Operation = "DefaultApi.CreateApp"; + localVarRequestOptions.Operation = "DefaultApi.CreateAliasBySubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2670,11 +2354,11 @@ public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int o } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/apps", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateApp", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateAliasBySubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -2685,31 +2369,31 @@ public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int o } /// - /// Create notification Sends notifications to your users + /// Create an app Creates a new OneSignal app /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. - /// CreateNotificationSuccessResponse - public CreateNotificationSuccessResponse CreateNotification(Notification notification, int operationIndex = 0) + /// App + public App CreateApp(App app, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = CreateNotificationWithHttpInfo(notification); + OneSignalApi.Client.ApiResponse localVarResponse = CreateAppWithHttpInfo(app); return localVarResponse.Data; } /// - /// Create notification Sends notifications to your users + /// Create an app Creates a new OneSignal app /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. - /// ApiResponse of CreateNotificationSuccessResponse - public OneSignalApi.Client.ApiResponse CreateNotificationWithHttpInfo(Notification notification, int operationIndex = 0) + /// ApiResponse of App + public OneSignalApi.Client.ApiResponse CreateAppWithHttpInfo(App app, int operationIndex = 0) { - // verify the required parameter 'notification' is set - if (notification == null) + // verify the required parameter 'app' is set + if (app == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notification' when calling DefaultApi->CreateNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->CreateApp"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -2735,12 +2419,12 @@ public OneSignalApi.Client.ApiResponse Create localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = notification; + localVarRequestOptions.Data = app; - localVarRequestOptions.Operation = "DefaultApi.CreateNotification"; + localVarRequestOptions.Operation = "DefaultApi.CreateApp"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2748,10 +2432,10 @@ public OneSignalApi.Client.ApiResponse Create } // make the HTTP request - var localVarResponse = this.Client.Post("/notifications", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/apps", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateNotification", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateApp", localVarResponse); if (_exception != null) { throw _exception; @@ -2762,33 +2446,33 @@ public OneSignalApi.Client.ApiResponse Create } /// - /// Create notification Sends notifications to your users + /// Create an app Creates a new OneSignal app /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of CreateNotificationSuccessResponse - public async System.Threading.Tasks.Task CreateNotificationAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of App + public async System.Threading.Tasks.Task CreateAppAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await CreateNotificationWithHttpInfoAsync(notification, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateAppWithHttpInfoAsync(app, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Create notification Sends notifications to your users + /// Create an app Creates a new OneSignal app /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CreateNotificationSuccessResponse) - public async System.Threading.Tasks.Task> CreateNotificationWithHttpInfoAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (App) + public async System.Threading.Tasks.Task> CreateAppWithHttpInfoAsync(App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'notification' is set - if (notification == null) + // verify the required parameter 'app' is set + if (app == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notification' when calling DefaultApi->CreateNotification"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->CreateApp"); } @@ -2815,12 +2499,12 @@ public OneSignalApi.Client.ApiResponse Create localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = notification; + localVarRequestOptions.Data = app; - localVarRequestOptions.Operation = "DefaultApi.CreateNotification"; + localVarRequestOptions.Operation = "DefaultApi.CreateApp"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2828,11 +2512,11 @@ public OneSignalApi.Client.ApiResponse Create } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateNotification", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateApp", localVarResponse); if (_exception != null) { throw _exception; @@ -2843,31 +2527,31 @@ public OneSignalApi.Client.ApiResponse Create } /// - /// Add a device Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. + /// Create notification Sends notifications to your users /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. - /// CreatePlayerSuccessResponse - public CreatePlayerSuccessResponse CreatePlayer(Player player, int operationIndex = 0) + /// CreateNotificationSuccessResponse + public CreateNotificationSuccessResponse CreateNotification(Notification notification, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = CreatePlayerWithHttpInfo(player); + OneSignalApi.Client.ApiResponse localVarResponse = CreateNotificationWithHttpInfo(notification); return localVarResponse.Data; } /// - /// Add a device Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. + /// Create notification Sends notifications to your users /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. - /// ApiResponse of CreatePlayerSuccessResponse - public OneSignalApi.Client.ApiResponse CreatePlayerWithHttpInfo(Player player, int operationIndex = 0) + /// ApiResponse of CreateNotificationSuccessResponse + public OneSignalApi.Client.ApiResponse CreateNotificationWithHttpInfo(Notification notification, int operationIndex = 0) { - // verify the required parameter 'player' is set - if (player == null) + // verify the required parameter 'notification' is set + if (notification == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->CreatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notification' when calling DefaultApi->CreateNotification"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -2893,12 +2577,12 @@ public OneSignalApi.Client.ApiResponse CreatePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = player; + localVarRequestOptions.Data = notification; - localVarRequestOptions.Operation = "DefaultApi.CreatePlayer"; + localVarRequestOptions.Operation = "DefaultApi.CreateNotification"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2906,10 +2590,10 @@ public OneSignalApi.Client.ApiResponse CreatePlayer } // make the HTTP request - var localVarResponse = this.Client.Post("/players", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/notifications", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreatePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateNotification", localVarResponse); if (_exception != null) { throw _exception; @@ -2920,33 +2604,33 @@ public OneSignalApi.Client.ApiResponse CreatePlayer } /// - /// Add a device Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. + /// Create notification Sends notifications to your users /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of CreatePlayerSuccessResponse - public async System.Threading.Tasks.Task CreatePlayerAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of CreateNotificationSuccessResponse + public async System.Threading.Tasks.Task CreateNotificationAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await CreatePlayerWithHttpInfoAsync(player, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateNotificationWithHttpInfoAsync(notification, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Add a device Register a new device to one of your OneSignal apps &#x1F6A7; Don't use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won't work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds. + /// Create notification Sends notifications to your users /// /// Thrown when fails to make API call - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CreatePlayerSuccessResponse) - public async System.Threading.Tasks.Task> CreatePlayerWithHttpInfoAsync(Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (CreateNotificationSuccessResponse) + public async System.Threading.Tasks.Task> CreateNotificationWithHttpInfoAsync(Notification notification, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'player' is set - if (player == null) + // verify the required parameter 'notification' is set + if (notification == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->CreatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notification' when calling DefaultApi->CreateNotification"); } @@ -2973,12 +2657,12 @@ public OneSignalApi.Client.ApiResponse CreatePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.Data = player; + localVarRequestOptions.Data = notification; - localVarRequestOptions.Operation = "DefaultApi.CreatePlayer"; + localVarRequestOptions.Operation = "DefaultApi.CreateNotification"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -2986,11 +2670,11 @@ public OneSignalApi.Client.ApiResponse CreatePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/players", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreatePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateNotification", localVarResponse); if (_exception != null) { throw _exception; @@ -3001,33 +2685,33 @@ public OneSignalApi.Client.ApiResponse CreatePlayer } /// - /// Create Segments Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create Segment Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// (optional) /// Index associated with the operation. /// CreateSegmentSuccessResponse - public CreateSegmentSuccessResponse CreateSegments(string appId, Segment segment = default(Segment), int operationIndex = 0) + public CreateSegmentSuccessResponse CreateSegment(string appId, Segment segment = default(Segment), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = CreateSegmentsWithHttpInfo(appId, segment); + OneSignalApi.Client.ApiResponse localVarResponse = CreateSegmentWithHttpInfo(appId, segment); return localVarResponse.Data; } /// - /// Create Segments Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create Segment Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. /// (optional) /// Index associated with the operation. /// ApiResponse of CreateSegmentSuccessResponse - public OneSignalApi.Client.ApiResponse CreateSegmentsWithHttpInfo(string appId, Segment segment = default(Segment), int operationIndex = 0) + public OneSignalApi.Client.ApiResponse CreateSegmentWithHttpInfo(string appId, Segment segment = default(Segment), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateSegments"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateSegment"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3056,10 +2740,10 @@ public OneSignalApi.Client.ApiResponse CreatePlayer localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.Data = segment; - localVarRequestOptions.Operation = "DefaultApi.CreateSegments"; + localVarRequestOptions.Operation = "DefaultApi.CreateSegment"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3070,7 +2754,7 @@ public OneSignalApi.Client.ApiResponse CreatePlayer var localVarResponse = this.Client.Post("/apps/{app_id}/segments", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateSegments", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateSegment", localVarResponse); if (_exception != null) { throw _exception; @@ -3081,7 +2765,7 @@ public OneSignalApi.Client.ApiResponse CreatePlayer } /// - /// Create Segments Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create Segment Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. @@ -3089,14 +2773,14 @@ public OneSignalApi.Client.ApiResponse CreatePlayer /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of CreateSegmentSuccessResponse - public async System.Threading.Tasks.Task CreateSegmentsAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task CreateSegmentAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await CreateSegmentsWithHttpInfoAsync(appId, segment, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateSegmentWithHttpInfoAsync(appId, segment, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Create Segments Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit. + /// Create Segment Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator's. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. @@ -3104,12 +2788,12 @@ public OneSignalApi.Client.ApiResponse CreatePlayer /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (CreateSegmentSuccessResponse) - public async System.Threading.Tasks.Task> CreateSegmentsWithHttpInfoAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> CreateSegmentWithHttpInfoAsync(string appId, Segment segment = default(Segment), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateSegments"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->CreateSegment"); } @@ -3139,10 +2823,10 @@ public OneSignalApi.Client.ApiResponse CreatePlayer localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.Data = segment; - localVarRequestOptions.Operation = "DefaultApi.CreateSegments"; + localVarRequestOptions.Operation = "DefaultApi.CreateSegment"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3154,7 +2838,7 @@ public OneSignalApi.Client.ApiResponse CreatePlayer if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("CreateSegments", localVarResponse); + Exception _exception = this.ExceptionFactory("CreateSegment", localVarResponse); if (_exception != null) { throw _exception; @@ -3171,12 +2855,12 @@ public OneSignalApi.Client.ApiResponse CreatePlayer /// /// /// - /// + /// /// Index associated with the operation. - /// InlineResponse201 - public InlineResponse201 CreateSubscription(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0) + /// SubscriptionBody + public SubscriptionBody CreateSubscription(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = CreateSubscriptionWithHttpInfo(appId, aliasLabel, aliasId, createSubscriptionRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = CreateSubscriptionWithHttpInfo(appId, aliasLabel, aliasId, subscriptionBody); return localVarResponse.Data; } @@ -3187,10 +2871,10 @@ public InlineResponse201 CreateSubscription(string appId, string aliasLabel, str /// /// /// - /// + /// /// Index associated with the operation. - /// ApiResponse of InlineResponse201 - public OneSignalApi.Client.ApiResponse CreateSubscriptionWithHttpInfo(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0) + /// ApiResponse of SubscriptionBody + public OneSignalApi.Client.ApiResponse CreateSubscriptionWithHttpInfo(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) @@ -3210,10 +2894,10 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->CreateSubscription"); } - // verify the required parameter 'createSubscriptionRequestBody' is set - if (createSubscriptionRequestBody == null) + // verify the required parameter 'subscriptionBody' is set + if (subscriptionBody == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'createSubscriptionRequestBody' when calling DefaultApi->CreateSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionBody' when calling DefaultApi->CreateSubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3242,12 +2926,12 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Data = createSubscriptionRequestBody; + localVarRequestOptions.Data = subscriptionBody; localVarRequestOptions.Operation = "DefaultApi.CreateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3255,7 +2939,7 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith } // make the HTTP request - var localVarResponse = this.Client.Post("/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("CreateSubscription", localVarResponse); @@ -3275,13 +2959,13 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith /// /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse201 - public async System.Threading.Tasks.Task CreateSubscriptionAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of SubscriptionBody + public async System.Threading.Tasks.Task CreateSubscriptionAsync(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await CreateSubscriptionWithHttpInfoAsync(appId, aliasLabel, aliasId, createSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await CreateSubscriptionWithHttpInfoAsync(appId, aliasLabel, aliasId, subscriptionBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3292,11 +2976,11 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith /// /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse201) - public async System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, CreateSubscriptionRequestBody createSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (SubscriptionBody) + public async System.Threading.Tasks.Task> CreateSubscriptionWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -3316,10 +3000,10 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->CreateSubscription"); } - // verify the required parameter 'createSubscriptionRequestBody' is set - if (createSubscriptionRequestBody == null) + // verify the required parameter 'subscriptionBody' is set + if (subscriptionBody == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'createSubscriptionRequestBody' when calling DefaultApi->CreateSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionBody' when calling DefaultApi->CreateSubscription"); } @@ -3349,12 +3033,12 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Data = createSubscriptionRequestBody; + localVarRequestOptions.Data = subscriptionBody; localVarRequestOptions.Operation = "DefaultApi.CreateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3362,7 +3046,7 @@ public OneSignalApi.Client.ApiResponse CreateSubscriptionWith } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -3441,7 +3125,7 @@ public OneSignalApi.Client.ApiResponse CreateUserWithHttpInfo(string appId localVarRequestOptions.Operation = "DefaultApi.CreateUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3530,7 +3214,7 @@ public OneSignalApi.Client.ApiResponse CreateUserWithHttpInfo(string appId localVarRequestOptions.Operation = "DefaultApi.CreateUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3561,10 +3245,10 @@ public OneSignalApi.Client.ApiResponse CreateUserWithHttpInfo(string appId /// /// /// Index associated with the operation. - /// InlineResponse200 - public InlineResponse200 DeleteAlias(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0) + /// UserIdentityBody + public UserIdentityBody DeleteAlias(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = DeleteAliasWithHttpInfo(appId, aliasLabel, aliasId, aliasLabelToDelete); + OneSignalApi.Client.ApiResponse localVarResponse = DeleteAliasWithHttpInfo(appId, aliasLabel, aliasId, aliasLabelToDelete); return localVarResponse.Data; } @@ -3577,8 +3261,8 @@ public InlineResponse200 DeleteAlias(string appId, string aliasLabel, string ali /// /// /// Index associated with the operation. - /// ApiResponse of InlineResponse200 - public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0) + /// ApiResponse of UserIdentityBody + public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) @@ -3634,7 +3318,7 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf localVarRequestOptions.Operation = "DefaultApi.DeleteAlias"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3642,7 +3326,7 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf } // make the HTTP request - var localVarResponse = this.Client.Delete("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("DeleteAlias", localVarResponse); @@ -3665,10 +3349,10 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse200 - public async System.Threading.Tasks.Task DeleteAliasAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityBody + public async System.Threading.Tasks.Task DeleteAliasAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await DeleteAliasWithHttpInfoAsync(appId, aliasLabel, aliasId, aliasLabelToDelete, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await DeleteAliasWithHttpInfoAsync(appId, aliasLabel, aliasId, aliasLabelToDelete, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -3682,8 +3366,8 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse200) - public async System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityBody) + public async System.Threading.Tasks.Task> DeleteAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, string aliasLabelToDelete, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -3740,7 +3424,7 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf localVarRequestOptions.Operation = "DefaultApi.DeleteAlias"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3748,7 +3432,7 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { @@ -3763,39 +3447,39 @@ public OneSignalApi.Client.ApiResponse DeleteAliasWithHttpInf } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Delete Segment Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. - /// DeletePlayerSuccessResponse - public DeletePlayerSuccessResponse DeletePlayer(string appId, string playerId, int operationIndex = 0) + /// GenericSuccessBoolResponse + public GenericSuccessBoolResponse DeleteSegment(string appId, string segmentId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = DeletePlayerWithHttpInfo(appId, playerId); + OneSignalApi.Client.ApiResponse localVarResponse = DeleteSegmentWithHttpInfo(appId, segmentId); return localVarResponse.Data; } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Delete Segment Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. - /// ApiResponse of DeletePlayerSuccessResponse - public OneSignalApi.Client.ApiResponse DeletePlayerWithHttpInfo(string appId, string playerId, int operationIndex = 0) + /// ApiResponse of GenericSuccessBoolResponse + public OneSignalApi.Client.ApiResponse DeleteSegmentWithHttpInfo(string appId, string segmentId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegment"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'segmentId' is set + if (segmentId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegment"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -3820,13 +3504,13 @@ public OneSignalApi.Client.ApiResponse DeletePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.DeletePlayer"; + localVarRequestOptions.Operation = "DefaultApi.DeleteSegment"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3834,10 +3518,10 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } // make the HTTP request - var localVarResponse = this.Client.Delete("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Delete("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteSegment", localVarResponse); if (_exception != null) { throw _exception; @@ -3848,41 +3532,41 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Delete Segment Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of DeletePlayerSuccessResponse - public async System.Threading.Tasks.Task DeletePlayerAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of GenericSuccessBoolResponse + public async System.Threading.Tasks.Task DeleteSegmentAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await DeletePlayerWithHttpInfoAsync(appId, playerId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await DeleteSegmentWithHttpInfoAsync(appId, segmentId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Delete a user record Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app. + /// Delete Segment Delete a segment (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The OneSignal player_id + /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeletePlayerSuccessResponse) - public async System.Threading.Tasks.Task> DeletePlayerWithHttpInfoAsync(string appId, string playerId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (GenericSuccessBoolResponse) + public async System.Threading.Tasks.Task> DeleteSegmentWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegment"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'segmentId' is set + if (segmentId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->DeletePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegment"); } @@ -3908,13 +3592,13 @@ public OneSignalApi.Client.ApiResponse DeletePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.DeletePlayer"; + localVarRequestOptions.Operation = "DefaultApi.DeleteSegment"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -3922,11 +3606,11 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("DeletePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("DeleteSegment", localVarResponse); if (_exception != null) { throw _exception; @@ -3937,185 +3621,11 @@ public OneSignalApi.Client.ApiResponse DeletePlayer } /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. + /// Deletes the Subscription. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// Index associated with the operation. - /// DeleteSegmentSuccessResponse - public DeleteSegmentSuccessResponse DeleteSegments(string appId, string segmentId, int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse localVarResponse = DeleteSegmentsWithHttpInfo(appId, segmentId); - return localVarResponse.Data; - } - - /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// Index associated with the operation. - /// ApiResponse of DeleteSegmentSuccessResponse - public OneSignalApi.Client.ApiResponse DeleteSegmentsWithHttpInfo(string appId, string segmentId, int operationIndex = 0) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegments"); - } - - // verify the required parameter 'segmentId' is set - if (segmentId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegments"); - } - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter - - localVarRequestOptions.Operation = "DefaultApi.DeleteSegments"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Delete("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteSegments", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of DeleteSegmentSuccessResponse - public async System.Threading.Tasks.Task DeleteSegmentsAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse localVarResponse = await DeleteSegmentsWithHttpInfoAsync(appId, segmentId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Delete Segments Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// The segment_id can be found in the URL of the segment when viewing it in the dashboard. - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (DeleteSegmentSuccessResponse) - public async System.Threading.Tasks.Task> DeleteSegmentsWithHttpInfoAsync(string appId, string segmentId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->DeleteSegments"); - } - - // verify the required parameter 'segmentId' is set - if (segmentId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'segmentId' when calling DefaultApi->DeleteSegments"); - } - - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("segment_id", OneSignalApi.Client.ClientUtils.ParameterToString(segmentId)); // path parameter - - localVarRequestOptions.Operation = "DefaultApi.DeleteSegments"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/segments/{segment_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteSegments", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Deletes the Subscription. - /// - /// Thrown when fails to make API call - /// - /// + /// + /// /// Index associated with the operation. /// public void DeleteSubscription(string appId, string subscriptionId, int operationIndex = 0) @@ -4173,7 +3683,7 @@ public OneSignalApi.Client.ApiResponse DeleteSubscriptionWithHttpInfo(st localVarRequestOptions.Operation = "DefaultApi.DeleteSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4260,7 +3770,7 @@ public OneSignalApi.Client.ApiResponse DeleteSubscriptionWithHttpInfo(st localVarRequestOptions.Operation = "DefaultApi.DeleteSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4354,7 +3864,7 @@ public OneSignalApi.Client.ApiResponse DeleteUserWithHttpInfo(string app localVarRequestOptions.Operation = "DefaultApi.DeleteUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4450,7 +3960,7 @@ public OneSignalApi.Client.ApiResponse DeleteUserWithHttpInfo(string app localVarRequestOptions.Operation = "DefaultApi.DeleteUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4473,46 +3983,39 @@ public OneSignalApi.Client.ApiResponse DeleteUserWithHttpInfo(string app } /// - /// Stop Live Activity Stops a Live Activity + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. /// Index associated with the operation. - /// - public void EndLiveActivity(string appId, string activityId, string subscriptionId, int operationIndex = 0) + /// ExportEventsSuccessResponse + public ExportEventsSuccessResponse ExportEvents(string notificationId, string appId, int operationIndex = 0) { - EndLiveActivityWithHttpInfo(appId, activityId, subscriptionId); + OneSignalApi.Client.ApiResponse localVarResponse = ExportEventsWithHttpInfo(notificationId, appId); + return localVarResponse.Data; } /// - /// Stop Live Activity Stops a Live Activity + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. /// Index associated with the operation. - /// ApiResponse of Object(void) - public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(string appId, string activityId, string subscriptionId, int operationIndex = 0) + /// ApiResponse of ExportEventsSuccessResponse + public OneSignalApi.Client.ApiResponse ExportEventsWithHttpInfo(string notificationId, string appId, int operationIndex = 0) { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->EndLiveActivity"); - } - - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->ExportEvents"); } - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportEvents"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -4537,14 +4040,13 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.EndLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.ExportEvents"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4552,10 +4054,10 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } // make the HTTP request - var localVarResponse = this.Client.Delete("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/notifications/{notification_id}/export_events?app_id={app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("EndLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("ExportEvents", localVarResponse); if (_exception != null) { throw _exception; @@ -4566,48 +4068,41 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// Stop Live Activity Stops a Live Activity + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task EndLiveActivityAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ExportEventsSuccessResponse + public async System.Threading.Tasks.Task ExportEventsAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await EndLiveActivityWithHttpInfoAsync(appId, activityId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await ExportEventsWithHttpInfoAsync(notificationId, appId, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// - /// Stop Live Activity Stops a Live Activity + /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// Subscription ID + /// The ID of the notification to export events from. + /// The ID of the app that the notification belongs to. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> EndLiveActivityWithHttpInfoAsync(string appId, string activityId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (ExportEventsSuccessResponse) + public async System.Threading.Tasks.Task> ExportEventsWithHttpInfoAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->EndLiveActivity"); - } - - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->ExportEvents"); } - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->EndLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportEvents"); } @@ -4633,14 +4128,13 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.EndLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.ExportEvents"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4648,11 +4142,11 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/apps/{app_id}/live_activities/{activity_id}/token/{subscription_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/export_events?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("EndLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("ExportEvents", localVarResponse); if (_exception != null) { throw _exception; @@ -4663,44 +4157,39 @@ public OneSignalApi.Client.ApiResponse EndLiveActivityWithHttpInfo(strin } /// - /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// Export CSV of Subscriptions Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The ID of the notification to export events from. - /// The ID of the app that the notification belongs to. + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. - /// ExportEventsSuccessResponse - public ExportEventsSuccessResponse ExportEvents(string notificationId, string appId, int operationIndex = 0) + /// ExportSubscriptionsSuccessResponse + public ExportSubscriptionsSuccessResponse ExportSubscriptions(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = ExportEventsWithHttpInfo(notificationId, appId); + OneSignalApi.Client.ApiResponse localVarResponse = ExportSubscriptionsWithHttpInfo(appId, exportSubscriptionsRequestBody); return localVarResponse.Data; } /// - /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// Export CSV of Subscriptions Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The ID of the notification to export events from. - /// The ID of the app that the notification belongs to. + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. - /// ApiResponse of ExportEventsSuccessResponse - public OneSignalApi.Client.ApiResponse ExportEventsWithHttpInfo(string notificationId, string appId, int operationIndex = 0) + /// ApiResponse of ExportSubscriptionsSuccessResponse + public OneSignalApi.Client.ApiResponse ExportSubscriptionsWithHttpInfo(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0) { - // verify the required parameter 'notificationId' is set - if (notificationId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->ExportEvents"); - } - // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportEvents"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportSubscriptions"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -4720,13 +4209,13 @@ public OneSignalApi.Client.ApiResponse ExportEvents localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = exportSubscriptionsRequestBody; - localVarRequestOptions.Operation = "DefaultApi.ExportEvents"; + localVarRequestOptions.Operation = "DefaultApi.ExportSubscriptions"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4734,10 +4223,10 @@ public OneSignalApi.Client.ApiResponse ExportEvents } // make the HTTP request - var localVarResponse = this.Client.Post("/notifications/{notification_id}/export_events?app_id={app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ExportEvents", localVarResponse); + Exception _exception = this.ExceptionFactory("ExportSubscriptions", localVarResponse); if (_exception != null) { throw _exception; @@ -4748,47 +4237,42 @@ public OneSignalApi.Client.ApiResponse ExportEvents } /// - /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// Export CSV of Subscriptions Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The ID of the notification to export events from. - /// The ID of the app that the notification belongs to. + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ExportEventsSuccessResponse - public async System.Threading.Tasks.Task ExportEventsAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ExportSubscriptionsSuccessResponse + public async System.Threading.Tasks.Task ExportSubscriptionsAsync(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await ExportEventsWithHttpInfoAsync(notificationId, appId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await ExportSubscriptionsWithHttpInfoAsync(appId, exportSubscriptionsRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Export CSV of Events Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time. + /// Export CSV of Subscriptions Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | /// /// Thrown when fails to make API call - /// The ID of the notification to export events from. - /// The ID of the app that the notification belongs to. + /// The app ID that you want to export devices from + /// (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ExportEventsSuccessResponse) - public async System.Threading.Tasks.Task> ExportEventsWithHttpInfoAsync(string notificationId, string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (ExportSubscriptionsSuccessResponse) + public async System.Threading.Tasks.Task> ExportSubscriptionsWithHttpInfoAsync(string appId, ExportSubscriptionsRequestBody exportSubscriptionsRequestBody = default(ExportSubscriptionsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'notificationId' is set - if (notificationId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->ExportEvents"); - } - // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportEvents"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportSubscriptions"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -4808,13 +4292,13 @@ public OneSignalApi.Client.ApiResponse ExportEvents localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = exportSubscriptionsRequestBody; - localVarRequestOptions.Operation = "DefaultApi.ExportEvents"; + localVarRequestOptions.Operation = "DefaultApi.ExportSubscriptions"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4822,11 +4306,11 @@ public OneSignalApi.Client.ApiResponse ExportEvents } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/export_events?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ExportEvents", localVarResponse); + Exception _exception = this.ExceptionFactory("ExportSubscriptions", localVarResponse); if (_exception != null) { throw _exception; @@ -4837,39 +4321,52 @@ public OneSignalApi.Client.ApiResponse ExportEvents } /// - /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// + /// + /// /// Index associated with the operation. - /// ExportPlayersSuccessResponse - public ExportPlayersSuccessResponse ExportPlayers(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) + /// UserIdentityBody + public UserIdentityBody GetAliases(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = ExportPlayersWithHttpInfo(appId, exportPlayersRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = GetAliasesWithHttpInfo(appId, aliasLabel, aliasId); return localVarResponse.Data; } /// - /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of ExportPlayersSuccessResponse - public OneSignalApi.Client.ApiResponse ExportPlayersWithHttpInfo(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0) + /// ApiResponse of UserIdentityBody + public OneSignalApi.Client.ApiResponse GetAliasesWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetAliases"); + } + + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->GetAliases"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->GetAliases"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -4890,12 +4387,13 @@ public OneSignalApi.Client.ApiResponse ExportEvents } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = exportPlayersRequestBody; + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.ExportPlayers"; + localVarRequestOptions.Operation = "DefaultApi.GetAliases"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4903,10 +4401,10 @@ public OneSignalApi.Client.ApiResponse ExportEvents } // make the HTTP request - var localVarResponse = this.Client.Post("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAliases", localVarResponse); if (_exception != null) { throw _exception; @@ -4917,42 +4415,55 @@ public OneSignalApi.Client.ApiResponse ExportEvents } /// - /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ExportPlayersSuccessResponse - public async System.Threading.Tasks.Task ExportPlayersAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityBody + public async System.Threading.Tasks.Task GetAliasesAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await ExportPlayersWithHttpInfoAsync(appId, exportPlayersRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetAliasesWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Export CSV of Players Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | - -- | - -- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | - -- | - -- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. | + /// Lists all Aliases for the User identified by (:alias_label, :alias_id). /// /// Thrown when fails to make API call - /// The app ID that you want to export devices from - /// (optional) + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ExportPlayersSuccessResponse) - public async System.Threading.Tasks.Task> ExportPlayersWithHttpInfoAsync(string appId, ExportPlayersRequestBody exportPlayersRequestBody = default(ExportPlayersRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityBody) + public async System.Threading.Tasks.Task> GetAliasesWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->ExportPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetAliases"); + } + + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->GetAliases"); + } + + // verify the required parameter 'aliasId' is set + if (aliasId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->GetAliases"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -4973,12 +4484,13 @@ public OneSignalApi.Client.ApiResponse ExportEvents } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = exportPlayersRequestBody; + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.ExportPlayers"; + localVarRequestOptions.Operation = "DefaultApi.GetAliases"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -4986,11 +4498,11 @@ public OneSignalApi.Client.ApiResponse ExportEvents } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/players/csv_export?app_id={app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ExportPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAliases", localVarResponse); if (_exception != null) { throw _exception; @@ -5007,10 +4519,10 @@ public OneSignalApi.Client.ApiResponse ExportEvents /// /// /// Index associated with the operation. - /// UserIdentityResponse - public UserIdentityResponse FetchAliases(string appId, string subscriptionId, int operationIndex = 0) + /// UserIdentityBody + public UserIdentityBody GetAliasesBySubscription(string appId, string subscriptionId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = FetchAliasesWithHttpInfo(appId, subscriptionId); + OneSignalApi.Client.ApiResponse localVarResponse = GetAliasesBySubscriptionWithHttpInfo(appId, subscriptionId); return localVarResponse.Data; } @@ -5021,19 +4533,19 @@ public UserIdentityResponse FetchAliases(string appId, string subscriptionId, in /// /// /// Index associated with the operation. - /// ApiResponse of UserIdentityResponse - public OneSignalApi.Client.ApiResponse FetchAliasesWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0) + /// ApiResponse of UserIdentityBody + public OneSignalApi.Client.ApiResponse GetAliasesBySubscriptionWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchAliases"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetAliasesBySubscription"); } // verify the required parameter 'subscriptionId' is set if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->FetchAliases"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->GetAliasesBySubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -5061,10 +4573,10 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.FetchAliases"; + localVarRequestOptions.Operation = "DefaultApi.GetAliasesBySubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5072,10 +4584,10 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt } // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("FetchAliases", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAliasesBySubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -5093,10 +4605,10 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UserIdentityResponse - public async System.Threading.Tasks.Task FetchAliasesAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityBody + public async System.Threading.Tasks.Task GetAliasesBySubscriptionAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await FetchAliasesWithHttpInfoAsync(appId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetAliasesBySubscriptionWithHttpInfoAsync(appId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -5108,19 +4620,19 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserIdentityResponse) - public async System.Threading.Tasks.Task> FetchAliasesWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityBody) + public async System.Threading.Tasks.Task> GetAliasesBySubscriptionWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchAliases"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetAliasesBySubscription"); } // verify the required parameter 'subscriptionId' is set if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->FetchAliases"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->GetAliasesBySubscription"); } @@ -5149,10 +4661,10 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.FetchAliases"; + localVarRequestOptions.Operation = "DefaultApi.GetAliasesBySubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5160,11 +4672,11 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("FetchAliases", localVarResponse); + Exception _exception = this.ExceptionFactory("GetAliasesBySubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -5175,47 +4687,31 @@ public OneSignalApi.Client.ApiResponse FetchAliasesWithHtt } /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call - /// - /// - /// + /// An app id /// Index associated with the operation. - /// User - public User FetchUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0) + /// App + public App GetApp(string appId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = FetchUserWithHttpInfo(appId, aliasLabel, aliasId); + OneSignalApi.Client.ApiResponse localVarResponse = GetAppWithHttpInfo(appId); return localVarResponse.Data; } /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call - /// - /// - /// + /// An app id /// Index associated with the operation. - /// ApiResponse of User - public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) + /// ApiResponse of App + public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUser"); - } - - // verify the required parameter 'aliasLabel' is set - if (aliasLabel == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUser"); - } - - // verify the required parameter 'aliasId' is set - if (aliasId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUser"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -5241,13 +4737,11 @@ public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.FetchUser"; + localVarRequestOptions.Operation = "DefaultApi.GetApp"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5255,10 +4749,10 @@ public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, } // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("FetchUser", localVarResponse); + Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); if (_exception != null) { throw _exception; @@ -5269,49 +4763,33 @@ public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, } /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call - /// - /// - /// + /// An app id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of User - public async System.Threading.Tasks.Task FetchUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of App + public async System.Threading.Tasks.Task GetAppAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await FetchUserWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetAppWithHttpInfoAsync(appId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Returns the User’s properties, Aliases, and Subscriptions. + /// View an app View the details of a single OneSignal app /// /// Thrown when fails to make API call - /// - /// - /// + /// An app id /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> FetchUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (App) + public async System.Threading.Tasks.Task> GetAppWithHttpInfoAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUser"); - } - - // verify the required parameter 'aliasLabel' is set - if (aliasLabel == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUser"); - } - - // verify the required parameter 'aliasId' is set - if (aliasId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUser"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); } @@ -5338,13 +4816,11 @@ public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.FetchUser"; + localVarRequestOptions.Operation = "DefaultApi.GetApp"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5352,11 +4828,11 @@ public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("FetchUser", localVarResponse); + Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); if (_exception != null) { throw _exception; @@ -5367,49 +4843,25 @@ public OneSignalApi.Client.ApiResponse FetchUserWithHttpInfo(string appId, } /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// View apps View the details of all of your current OneSignal apps /// /// Thrown when fails to make API call - /// - /// - /// /// Index associated with the operation. - /// InlineResponse200 - public InlineResponse200 FetchUserIdentity(string appId, string aliasLabel, string aliasId, int operationIndex = 0) + /// List<App> + public List GetApps(int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = FetchUserIdentityWithHttpInfo(appId, aliasLabel, aliasId); + OneSignalApi.Client.ApiResponse> localVarResponse = GetAppsWithHttpInfo(); return localVarResponse.Data; } /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// View apps View the details of all of your current OneSignal apps /// /// Thrown when fails to make API call - /// - /// - /// /// Index associated with the operation. - /// ApiResponse of InlineResponse200 - public OneSignalApi.Client.ApiResponse FetchUserIdentityWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) + /// ApiResponse of List<App> + public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operationIndex = 0) { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUserIdentity"); - } - - // verify the required parameter 'aliasLabel' is set - if (aliasLabel == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUserIdentity"); - } - - // verify the required parameter 'aliasId' is set - if (aliasId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUserIdentity"); - } - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { @@ -5432,14 +4884,11 @@ public OneSignalApi.Client.ApiResponse FetchUserIdentityWithH localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.FetchUserIdentity"; + localVarRequestOptions.Operation = "DefaultApi.GetApps"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5447,10 +4896,10 @@ public OneSignalApi.Client.ApiResponse FetchUserIdentityWithH } // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get>("/apps", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("FetchUserIdentity", localVarResponse); + Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); if (_exception != null) { throw _exception; @@ -5461,51 +4910,27 @@ public OneSignalApi.Client.ApiResponse FetchUserIdentityWithH } /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// View apps View the details of all of your current OneSignal apps /// /// Thrown when fails to make API call - /// - /// - /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse200 - public async System.Threading.Tasks.Task FetchUserIdentityAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of List<App> + public async System.Threading.Tasks.Task> GetAppsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await FetchUserIdentityWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse> localVarResponse = await GetAppsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Lists all Aliases for the User identified by (:alias_label, :alias_id). + /// View apps View the details of all of your current OneSignal apps /// /// Thrown when fails to make API call - /// - /// - /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse200) - public async System.Threading.Tasks.Task> FetchUserIdentityWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (List<App>) + public async System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->FetchUserIdentity"); - } - - // verify the required parameter 'aliasLabel' is set - if (aliasLabel == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->FetchUserIdentity"); - } - - // verify the required parameter 'aliasId' is set - if (aliasId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->FetchUserIdentity"); - } - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -5529,14 +4954,11 @@ public OneSignalApi.Client.ApiResponse FetchUserIdentityWithH localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.FetchUserIdentity"; + localVarRequestOptions.Operation = "DefaultApi.GetApps"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5544,11 +4966,11 @@ public OneSignalApi.Client.ApiResponse FetchUserIdentityWithH } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync>("/apps", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("FetchUserIdentity", localVarResponse); + Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); if (_exception != null) { throw _exception; @@ -5559,31 +4981,39 @@ public OneSignalApi.Client.ApiResponse FetchUserIdentityWithH } /// - /// View an app View the details of a single OneSignal app + /// View notification View the details of a single notification and outcomes associated with it /// /// Thrown when fails to make API call - /// An app id + /// + /// /// Index associated with the operation. - /// App - public App GetApp(string appId, int operationIndex = 0) + /// NotificationWithMeta + public NotificationWithMeta GetNotification(string appId, string notificationId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetAppWithHttpInfo(appId); + OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationWithHttpInfo(appId, notificationId); return localVarResponse.Data; } /// - /// View an app View the details of a single OneSignal app + /// View notification View the details of a single notification and outcomes associated with it /// /// Thrown when fails to make API call - /// An app id + /// + /// /// Index associated with the operation. - /// ApiResponse of App - public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int operationIndex = 0) + /// ApiResponse of NotificationWithMeta + public OneSignalApi.Client.ApiResponse GetNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); + } + + // verify the required parameter 'notificationId' is set + if (notificationId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -5608,12 +5038,13 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.GetApp"; + localVarRequestOptions.Operation = "DefaultApi.GetNotification"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -5621,10 +5052,10 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/notifications/{notification_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); if (_exception != null) { throw _exception; @@ -5635,1092 +5066,41 @@ public OneSignalApi.Client.ApiResponse GetAppWithHttpInfo(string appId, int } /// - /// View an app View the details of a single OneSignal app - /// - /// Thrown when fails to make API call - /// An app id - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of App - public async System.Threading.Tasks.Task GetAppAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse localVarResponse = await GetAppWithHttpInfoAsync(appId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// View an app View the details of a single OneSignal app - /// - /// Thrown when fails to make API call - /// An app id - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (App) - public async System.Threading.Tasks.Task> GetAppWithHttpInfoAsync(string appId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetApp"); - } - - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - - localVarRequestOptions.Operation = "DefaultApi.GetApp"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (user_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetApp", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View apps View the details of all of your current OneSignal apps - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// List<App> - public List GetApps(int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse> localVarResponse = GetAppsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// View apps View the details of all of your current OneSignal apps - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of List<App> - public OneSignalApi.Client.ApiResponse> GetAppsWithHttpInfo(int operationIndex = 0) - { - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "DefaultApi.GetApps"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (user_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Get>("/apps", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View apps View the details of all of your current OneSignal apps - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<App> - public async System.Threading.Tasks.Task> GetAppsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse> localVarResponse = await GetAppsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// View apps View the details of all of your current OneSignal apps - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<App>) - public async System.Threading.Tasks.Task>> GetAppsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "DefaultApi.GetApps"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (user_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/apps", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetApps", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// InlineResponse2003 - public InlineResponse2003 GetEligibleIams(string appId, string subscriptionId, int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse localVarResponse = GetEligibleIamsWithHttpInfo(appId, subscriptionId); - return localVarResponse.Data; - } - - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of InlineResponse2003 - public OneSignalApi.Client.ApiResponse GetEligibleIamsWithHttpInfo(string appId, string subscriptionId, int operationIndex = 0) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetEligibleIams"); - } - - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->GetEligibleIams"); - } - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - - localVarRequestOptions.Operation = "DefaultApi.GetEligibleIams"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}/subscriptions/{subscription_id}/iams", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetEligibleIams", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of InlineResponse2003 - public async System.Threading.Tasks.Task GetEligibleIamsAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse localVarResponse = await GetEligibleIamsWithHttpInfoAsync(appId, subscriptionId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Manifest of In-App Messages the Subscription is eligible to display by the SDK. - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse2003) - public async System.Threading.Tasks.Task> GetEligibleIamsWithHttpInfoAsync(string appId, string subscriptionId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetEligibleIams"); - } - - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->GetEligibleIams"); - } - - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - - localVarRequestOptions.Operation = "DefaultApi.GetEligibleIams"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/subscriptions/{subscription_id}/iams", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetEligibleIams", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View notification View the details of a single notification and outcomes associated with it - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// NotificationWithMeta - public NotificationWithMeta GetNotification(string appId, string notificationId, int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationWithHttpInfo(appId, notificationId); - return localVarResponse.Data; - } - - /// - /// View notification View the details of a single notification and outcomes associated with it - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of NotificationWithMeta - public OneSignalApi.Client.ApiResponse GetNotificationWithHttpInfo(string appId, string notificationId, int operationIndex = 0) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); - } - - // verify the required parameter 'notificationId' is set - if (notificationId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); - } - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - - localVarRequestOptions.Operation = "DefaultApi.GetNotification"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/notifications/{notification_id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View notification View the details of a single notification and outcomes associated with it - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of NotificationWithMeta - public async System.Threading.Tasks.Task GetNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationWithHttpInfoAsync(appId, notificationId, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// View notification View the details of a single notification and outcomes associated with it - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (NotificationWithMeta) - public async System.Threading.Tasks.Task> GetNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); - } - - // verify the required parameter 'notificationId' is set - if (notificationId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); - } - - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - - localVarRequestOptions.Operation = "DefaultApi.GetNotification"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications/{notification_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. - /// - /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// - /// Index associated with the operation. - /// NotificationHistorySuccessResponse - public NotificationHistorySuccessResponse GetNotificationHistory(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationHistoryWithHttpInfo(notificationId, getNotificationRequestBody); - return localVarResponse.Data; - } - - /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. - /// - /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// - /// Index associated with the operation. - /// ApiResponse of NotificationHistorySuccessResponse - public OneSignalApi.Client.ApiResponse GetNotificationHistoryWithHttpInfo(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0) - { - // verify the required parameter 'notificationId' is set - if (notificationId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); - } - - // verify the required parameter 'getNotificationRequestBody' is set - if (getNotificationRequestBody == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->GetNotificationHistory"); - } - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Data = getNotificationRequestBody; - - localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Post("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. - /// - /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of NotificationHistorySuccessResponse - public async System.Threading.Tasks.Task GetNotificationHistoryAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationHistoryWithHttpInfoAsync(notificationId, getNotificationRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. - /// - /// Thrown when fails to make API call - /// The \"id\" of the message found in the Notification object - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (NotificationHistorySuccessResponse) - public async System.Threading.Tasks.Task> GetNotificationHistoryWithHttpInfoAsync(string notificationId, GetNotificationRequestBody getNotificationRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'notificationId' is set - if (notificationId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); - } - - // verify the required parameter 'getNotificationRequestBody' is set - if (getNotificationRequestBody == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationRequestBody' when calling DefaultApi->GetNotificationHistory"); - } - - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter - localVarRequestOptions.Data = getNotificationRequestBody; - - localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View notifications View the details of multiple notifications - /// - /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) - /// Index associated with the operation. - /// NotificationSlice - public NotificationSlice GetNotifications(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationsWithHttpInfo(appId, limit, offset, kind); - return localVarResponse.Data; - } - - /// - /// View notifications View the details of multiple notifications - /// - /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) - /// Index associated with the operation. - /// ApiResponse of NotificationSlice - public OneSignalApi.Client.ApiResponse GetNotificationsWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); - } - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - if (kind != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); - } - - localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/notifications", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View notifications View the details of multiple notifications - /// - /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of NotificationSlice - public async System.Threading.Tasks.Task GetNotificationsAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationsWithHttpInfoAsync(appId, limit, offset, kind, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// View notifications View the details of multiple notifications - /// - /// Thrown when fails to make API call - /// The app ID that you want to view notifications from - /// How many notifications to return. Max is 50. Default is 50. (optional) - /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (NotificationSlice) - public async System.Threading.Tasks.Task> GetNotificationsWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); - } - - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - if (offset != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); - } - if (kind != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); - } - - localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) - /// Index associated with the operation. - /// OutcomesData - public OutcomesData GetOutcomes(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) - { - OneSignalApi.Client.ApiResponse localVarResponse = GetOutcomesWithHttpInfo(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution); - return localVarResponse.Data; - } - - /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. - /// - /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) - /// Index associated with the operation. - /// ApiResponse of OutcomesData - public OneSignalApi.Client.ApiResponse GetOutcomesWithHttpInfo(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) - { - // verify the required parameter 'appId' is set - if (appId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); - } - - // verify the required parameter 'outcomeNames' is set - if (outcomeNames == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); - } - - OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = OneSignalApi.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = OneSignalApi.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); - if (outcomeNames2 != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); - } - if (outcomeTimeRange != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); - } - if (outcomePlatforms != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); - } - if (outcomeAttribution != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); - } - - localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; - localVarRequestOptions.OperationIndex = operationIndex; - - // authentication (app_key) required - // bearer authentication required - if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", "Key " + this.Configuration.AccessToken); - } - - // make the HTTP request - var localVarResponse = this.Client.Get("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// View notification View the details of a single notification and outcomes associated with it /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of OutcomesData - public async System.Threading.Tasks.Task GetOutcomesAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of NotificationWithMeta + public async System.Threading.Tasks.Task GetNotificationAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetOutcomesWithHttpInfoAsync(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationWithHttpInfoAsync(appId, notificationId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. + /// View notification View the details of a single notification and outcomes associated with it /// /// Thrown when fails to make API call - /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum - /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) - /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) - /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) - /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (OutcomesData) - public async System.Threading.Tasks.Task> GetOutcomesWithHttpInfoAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (NotificationWithMeta) + public async System.Threading.Tasks.Task> GetNotificationWithHttpInfoAsync(string appId, string notificationId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotification"); } - // verify the required parameter 'outcomeNames' is set - if (outcomeNames == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotification"); } @@ -6746,29 +5126,13 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); - if (outcomeNames2 != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); - } - if (outcomeTimeRange != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); - } - if (outcomePlatforms != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); - } - if (outcomeAttribution != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); - } + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; + localVarRequestOptions.Operation = "DefaultApi.GetNotification"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -6776,11 +5140,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications/{notification_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNotification", localVarResponse); if (_exception != null) { throw _exception; @@ -6791,46 +5155,45 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// The \"id\" of the message found in the Notification object + /// /// Index associated with the operation. - /// Player - public Player GetPlayer(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0) + /// NotificationHistorySuccessResponse + public NotificationHistorySuccessResponse GetNotificationHistory(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetPlayerWithHttpInfo(appId, playerId, emailAuthHash); + OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationHistoryWithHttpInfo(notificationId, getNotificationHistoryRequestBody); return localVarResponse.Data; } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// The \"id\" of the message found in the Notification object + /// /// Index associated with the operation. - /// ApiResponse of Player - public OneSignalApi.Client.ApiResponse GetPlayerWithHttpInfo(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0) + /// ApiResponse of NotificationHistorySuccessResponse + public OneSignalApi.Client.ApiResponse GetNotificationHistoryWithHttpInfo(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0) { - // verify the required parameter 'appId' is set - if (appId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'getNotificationHistoryRequestBody' is set + if (getNotificationHistoryRequestBody == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationHistoryRequestBody' when calling DefaultApi->GetNotificationHistory"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -6850,17 +5213,13 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (emailAuthHash != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "email_auth_hash", emailAuthHash)); - } + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.Data = getNotificationHistoryRequestBody; - localVarRequestOptions.Operation = "DefaultApi.GetPlayer"; + localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -6868,10 +5227,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Get("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); if (_exception != null) { throw _exception; @@ -6882,49 +5241,48 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// The \"id\" of the message found in the Notification object + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of Player - public async System.Threading.Tasks.Task GetPlayerAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of NotificationHistorySuccessResponse + public async System.Threading.Tasks.Task GetNotificationHistoryAsync(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetPlayerWithHttpInfoAsync(appId, playerId, emailAuthHash, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationHistoryWithHttpInfoAsync(notificationId, getNotificationHistoryRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View device View the details of an existing device in one of your OneSignal apps + /// Notification History -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App's REST API Key, available in Keys & IDs. /// /// Thrown when fails to make API call - /// Your app_id for this device - /// Player's OneSignal ID - /// Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional) + /// The \"id\" of the message found in the Notification object + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Player) - public async System.Threading.Tasks.Task> GetPlayerWithHttpInfoAsync(string appId, string playerId, string emailAuthHash = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (NotificationHistorySuccessResponse) + public async System.Threading.Tasks.Task> GetNotificationHistoryWithHttpInfoAsync(string notificationId, GetNotificationHistoryRequestBody getNotificationHistoryRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'appId' is set - if (appId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->GetNotificationHistory"); } - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'getNotificationHistoryRequestBody' is set + if (getNotificationHistoryRequestBody == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->GetPlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'getNotificationHistoryRequestBody' when calling DefaultApi->GetNotificationHistory"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { + "application/json" }; // to determine the Accept header @@ -6944,17 +5302,13 @@ public OneSignalApi.Client.ApiResponse GetNo localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "app_id", appId)); - if (emailAuthHash != null) - { - localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "email_auth_hash", emailAuthHash)); - } + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.Data = getNotificationHistoryRequestBody; - localVarRequestOptions.Operation = "DefaultApi.GetPlayer"; + localVarRequestOptions.Operation = "DefaultApi.GetNotificationHistory"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -6962,11 +5316,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/notifications/{notification_id}/history", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNotificationHistory", localVarResponse); if (_exception != null) { throw _exception; @@ -6977,35 +5331,37 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// View notifications View the details of multiple notifications /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) /// Index associated with the operation. - /// PlayerSlice - public PlayerSlice GetPlayers(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0) + /// NotificationSlice + public NotificationSlice GetNotifications(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = GetPlayersWithHttpInfo(appId, limit, offset); + OneSignalApi.Client.ApiResponse localVarResponse = GetNotificationsWithHttpInfo(appId, limit, offset, kind); return localVarResponse.Data; } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// View notifications View the details of multiple notifications /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) /// Index associated with the operation. - /// ApiResponse of PlayerSlice - public OneSignalApi.Client.ApiResponse GetPlayersWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0) + /// ApiResponse of NotificationSlice + public OneSignalApi.Client.ApiResponse GetNotificationsWithHttpInfo(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -7039,11 +5395,15 @@ public OneSignalApi.Client.ApiResponse GetNo { localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } + if (kind != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); + } - localVarRequestOptions.Operation = "DefaultApi.GetPlayers"; + localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7051,10 +5411,10 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = this.Client.Get("/players", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/notifications", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); if (_exception != null) { throw _exception; @@ -7065,37 +5425,39 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// View notifications View the details of multiple notifications /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of PlayerSlice - public async System.Threading.Tasks.Task GetPlayersAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of NotificationSlice + public async System.Threading.Tasks.Task GetNotificationsAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await GetPlayersWithHttpInfoAsync(appId, limit, offset, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetNotificationsWithHttpInfoAsync(appId, limit, offset, kind, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// View devices View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant. + /// View notifications View the details of multiple notifications /// /// Thrown when fails to make API call - /// The app ID that you want to view players from - /// How many devices to return. Max is 300. Default is 300 (optional) - /// Result offset. Default is 0. Results are sorted by id; (optional) + /// The app ID that you want to view notifications from + /// How many notifications to return. Max is 50. Default is 50. (optional) + /// 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 of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (PlayerSlice) - public async System.Threading.Tasks.Task> GetPlayersWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (NotificationSlice) + public async System.Threading.Tasks.Task> GetNotificationsWithHttpInfoAsync(string appId, int? limit = default(int?), int? offset = default(int?), int? kind = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetPlayers"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetNotifications"); } @@ -7130,11 +5492,15 @@ public OneSignalApi.Client.ApiResponse GetNo { localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); } + if (kind != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "kind", kind)); + } - localVarRequestOptions.Operation = "DefaultApi.GetPlayers"; + localVarRequestOptions.Operation = "DefaultApi.GetNotifications"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7142,11 +5508,11 @@ public OneSignalApi.Client.ApiResponse GetNo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/players", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetPlayers", localVarResponse); + Exception _exception = this.ExceptionFactory("GetNotifications", localVarResponse); if (_exception != null) { throw _exception; @@ -7157,61 +5523,52 @@ public OneSignalApi.Client.ApiResponse GetNo } /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. /// /// Thrown when fails to make API call - /// - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) /// Index associated with the operation. - /// InlineResponse200 - public InlineResponse200 IdentifyUserByAlias(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + /// OutcomesData + public OutcomesData GetOutcomes(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = IdentifyUserByAliasWithHttpInfo(appId, aliasLabel, aliasId, userIdentityRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = GetOutcomesWithHttpInfo(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution); return localVarResponse.Data; } /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. /// /// Thrown when fails to make API call - /// - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) /// Index associated with the operation. - /// ApiResponse of InlineResponse200 - public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWithHttpInfo(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + /// ApiResponse of OutcomesData + public OneSignalApi.Client.ApiResponse GetOutcomesWithHttpInfo(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserByAlias"); - } - - // verify the required parameter 'aliasLabel' is set - if (aliasLabel == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->IdentifyUserByAlias"); - } - - // verify the required parameter 'aliasId' is set - if (aliasId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->IdentifyUserByAlias"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); } - // verify the required parameter 'userIdentityRequestBody' is set - if (userIdentityRequestBody == null) + // verify the required parameter 'outcomeNames' is set + if (outcomeNames == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserByAlias"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -7232,14 +5589,28 @@ public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWit } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Data = userIdentityRequestBody; + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); + if (outcomeNames2 != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); + } + if (outcomeTimeRange != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); + } + if (outcomePlatforms != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); + } + if (outcomeAttribution != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); + } - localVarRequestOptions.Operation = "DefaultApi.IdentifyUserByAlias"; + localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7247,10 +5618,10 @@ public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWit } // make the HTTP request - var localVarResponse = this.Client.Patch("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("IdentifyUserByAlias", localVarResponse); + Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); if (_exception != null) { throw _exception; @@ -7261,64 +5632,55 @@ public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWit } /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. /// /// Thrown when fails to make API call - /// - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse200 - public async System.Threading.Tasks.Task IdentifyUserByAliasAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of OutcomesData + public async System.Threading.Tasks.Task GetOutcomesAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await IdentifyUserByAliasWithHttpInfoAsync(appId, aliasLabel, aliasId, userIdentityRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetOutcomesWithHttpInfoAsync(appId, outcomeNames, outcomeNames2, outcomeTimeRange, outcomePlatforms, outcomeAttribution, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id). + /// View Outcomes View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App's REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it. /// /// Thrown when fails to make API call - /// - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum + /// Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional) + /// Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional) + /// Optional Platform id. Refer device's platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional) + /// Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse200) - public async System.Threading.Tasks.Task> IdentifyUserByAliasWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (OutcomesData) + public async System.Threading.Tasks.Task> GetOutcomesWithHttpInfoAsync(string appId, string outcomeNames, string outcomeNames2 = default(string), string outcomeTimeRange = default(string), string outcomePlatforms = default(string), string outcomeAttribution = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserByAlias"); - } - - // verify the required parameter 'aliasLabel' is set - if (aliasLabel == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->IdentifyUserByAlias"); - } - - // verify the required parameter 'aliasId' is set - if (aliasId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->IdentifyUserByAlias"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetOutcomes"); } - // verify the required parameter 'userIdentityRequestBody' is set - if (userIdentityRequestBody == null) + // verify the required parameter 'outcomeNames' is set + if (outcomeNames == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserByAlias"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'outcomeNames' when calling DefaultApi->GetOutcomes"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -7339,14 +5701,28 @@ public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWit } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter - localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Data = userIdentityRequestBody; + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names", outcomeNames)); + if (outcomeNames2 != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_names[]", outcomeNames2)); + } + if (outcomeTimeRange != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_time_range", outcomeTimeRange)); + } + if (outcomePlatforms != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_platforms", outcomePlatforms)); + } + if (outcomeAttribution != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "outcome_attribution", outcomeAttribution)); + } - localVarRequestOptions.Operation = "DefaultApi.IdentifyUserByAlias"; + localVarRequestOptions.Operation = "DefaultApi.GetOutcomes"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7354,11 +5730,11 @@ public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWit } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/outcomes", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("IdentifyUserByAlias", localVarResponse); + Exception _exception = this.ExceptionFactory("GetOutcomes", localVarResponse); if (_exception != null) { throw _exception; @@ -7369,53 +5745,40 @@ public OneSignalApi.Client.ApiResponse IdentifyUserByAliasWit } /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Get Segments Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. - /// UserIdentityResponse - public UserIdentityResponse IdentifyUserBySubscriptionId(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + /// GetSegmentsSuccessResponse + public GetSegmentsSuccessResponse GetSegments(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = IdentifyUserBySubscriptionIdWithHttpInfo(appId, subscriptionId, userIdentityRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = GetSegmentsWithHttpInfo(appId, offset, limit); return localVarResponse.Data; } /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Get Segments Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. - /// ApiResponse of UserIdentityResponse - public OneSignalApi.Client.ApiResponse IdentifyUserBySubscriptionIdWithHttpInfo(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0) + /// ApiResponse of GetSegmentsSuccessResponse + public OneSignalApi.Client.ApiResponse GetSegmentsWithHttpInfo(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserBySubscriptionId"); - } - - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->IdentifyUserBySubscriptionId"); - } - - // verify the required parameter 'userIdentityRequestBody' is set - if (userIdentityRequestBody == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserBySubscriptionId"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetSegments"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -7436,13 +5799,19 @@ public OneSignalApi.Client.ApiResponse IdentifyUserBySubsc } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Data = userIdentityRequestBody; + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } - localVarRequestOptions.Operation = "DefaultApi.IdentifyUserBySubscriptionId"; + localVarRequestOptions.Operation = "DefaultApi.GetSegments"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7450,10 +5819,10 @@ public OneSignalApi.Client.ApiResponse IdentifyUserBySubsc } // make the HTTP request - var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/segments", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("IdentifyUserBySubscriptionId", localVarResponse); + Exception _exception = this.ExceptionFactory("GetSegments", localVarResponse); if (_exception != null) { throw _exception; @@ -7464,56 +5833,43 @@ public OneSignalApi.Client.ApiResponse IdentifyUserBySubsc } /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Get Segments Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UserIdentityResponse - public async System.Threading.Tasks.Task IdentifyUserBySubscriptionIdAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of GetSegmentsSuccessResponse + public async System.Threading.Tasks.Task GetSegmentsAsync(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await IdentifyUserBySubscriptionIdWithHttpInfoAsync(appId, subscriptionId, userIdentityRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetSegmentsWithHttpInfoAsync(appId, offset, limit, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Upserts one or more Aliases for the User identified by :subscription_id. + /// Get Segments Returns an array of segments from an app. /// /// Thrown when fails to make API call - /// - /// - /// + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments. (optional) + /// The amount of Segments in the response. Maximum 300. (optional) /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserIdentityResponse) - public async System.Threading.Tasks.Task> IdentifyUserBySubscriptionIdWithHttpInfoAsync(string appId, string subscriptionId, UserIdentityRequestBody userIdentityRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (GetSegmentsSuccessResponse) + public async System.Threading.Tasks.Task> GetSegmentsWithHttpInfoAsync(string appId, int? offset = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->IdentifyUserBySubscriptionId"); - } - - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->IdentifyUserBySubscriptionId"); - } - - // verify the required parameter 'userIdentityRequestBody' is set - if (userIdentityRequestBody == null) - { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'userIdentityRequestBody' when calling DefaultApi->IdentifyUserBySubscriptionId"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetSegments"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -7534,13 +5890,19 @@ public OneSignalApi.Client.ApiResponse IdentifyUserBySubsc } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Data = userIdentityRequestBody; + if (offset != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "offset", offset)); + } + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } - localVarRequestOptions.Operation = "DefaultApi.IdentifyUserBySubscriptionId"; + localVarRequestOptions.Operation = "DefaultApi.GetSegments"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7548,11 +5910,11 @@ public OneSignalApi.Client.ApiResponse IdentifyUserBySubsc } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}/user/identity", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/segments", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("IdentifyUserBySubscriptionId", localVarResponse); + Exception _exception = this.ExceptionFactory("GetSegments", localVarResponse); if (_exception != null) { throw _exception; @@ -7563,53 +5925,52 @@ public OneSignalApi.Client.ApiResponse IdentifyUserBySubsc } /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// - /// - /// + /// + /// /// Index associated with the operation. - /// UserIdentityResponse - public UserIdentityResponse TransferSubscription(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0) + /// User + public User GetUser(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = TransferSubscriptionWithHttpInfo(appId, subscriptionId, transferSubscriptionRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = GetUserWithHttpInfo(appId, aliasLabel, aliasId); return localVarResponse.Data; } /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// - /// - /// + /// + /// /// Index associated with the operation. - /// ApiResponse of UserIdentityResponse - public OneSignalApi.Client.ApiResponse TransferSubscriptionWithHttpInfo(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0) + /// ApiResponse of User + public OneSignalApi.Client.ApiResponse GetUserWithHttpInfo(string appId, string aliasLabel, string aliasId, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->TransferSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetUser"); } - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->TransferSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->GetUser"); } - // verify the required parameter 'transferSubscriptionRequestBody' is set - if (transferSubscriptionRequestBody == null) + // verify the required parameter 'aliasId' is set + if (aliasId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'transferSubscriptionRequestBody' when calling DefaultApi->TransferSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->GetUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -7630,13 +5991,13 @@ public OneSignalApi.Client.ApiResponse TransferSubscriptio } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Data = transferSubscriptionRequestBody; + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.TransferSubscription"; + localVarRequestOptions.Operation = "DefaultApi.GetUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7644,10 +6005,10 @@ public OneSignalApi.Client.ApiResponse TransferSubscriptio } // make the HTTP request - var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}/owner", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("TransferSubscription", localVarResponse); + Exception _exception = this.ExceptionFactory("GetUser", localVarResponse); if (_exception != null) { throw _exception; @@ -7658,56 +6019,55 @@ public OneSignalApi.Client.ApiResponse TransferSubscriptio } /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// - /// - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UserIdentityResponse - public async System.Threading.Tasks.Task TransferSubscriptionAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of User + public async System.Threading.Tasks.Task GetUserAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await TransferSubscriptionWithHttpInfoAsync(appId, subscriptionId, transferSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await GetUserWithHttpInfoAsync(appId, aliasLabel, aliasId, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Transfers this Subscription to the User identified by the identity in the payload. + /// Returns the User’s properties, Aliases, and Subscriptions. /// /// Thrown when fails to make API call /// - /// - /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserIdentityResponse) - public async System.Threading.Tasks.Task> TransferSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (User) + public async System.Threading.Tasks.Task> GetUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->TransferSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->GetUser"); } - // verify the required parameter 'subscriptionId' is set - if (subscriptionId == null) + // verify the required parameter 'aliasLabel' is set + if (aliasLabel == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->TransferSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasLabel' when calling DefaultApi->GetUser"); } - // verify the required parameter 'transferSubscriptionRequestBody' is set - if (transferSubscriptionRequestBody == null) + // verify the required parameter 'aliasId' is set + if (aliasId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'transferSubscriptionRequestBody' when calling DefaultApi->TransferSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'aliasId' when calling DefaultApi->GetUser"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -7728,13 +6088,13 @@ public OneSignalApi.Client.ApiResponse TransferSubscriptio } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Data = transferSubscriptionRequestBody; + localVarRequestOptions.PathParameters.Add("alias_label", OneSignalApi.Client.ClientUtils.ParameterToString(aliasLabel)); // path parameter + localVarRequestOptions.PathParameters.Add("alias_id", OneSignalApi.Client.ClientUtils.ParameterToString(aliasId)); // path parameter - localVarRequestOptions.Operation = "DefaultApi.TransferSubscription"; + localVarRequestOptions.Operation = "DefaultApi.GetUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7742,11 +6102,11 @@ public OneSignalApi.Client.ApiResponse TransferSubscriptio } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}/owner", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.GetAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("TransferSubscription", localVarResponse); + Exception _exception = this.ExceptionFactory("GetUser", localVarResponse); if (_exception != null) { throw _exception; @@ -7757,39 +6117,47 @@ public OneSignalApi.Client.ApiResponse TransferSubscriptio } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call - /// An app id - /// + /// + /// + /// /// Index associated with the operation. - /// App - public App UpdateApp(string appId, App app, int operationIndex = 0) + /// UserIdentityBody + public UserIdentityBody TransferSubscription(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdateAppWithHttpInfo(appId, app); + OneSignalApi.Client.ApiResponse localVarResponse = TransferSubscriptionWithHttpInfo(appId, subscriptionId, transferSubscriptionRequestBody); return localVarResponse.Data; } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call - /// An app id - /// + /// + /// + /// /// Index associated with the operation. - /// ApiResponse of App - public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, App app, int operationIndex = 0) + /// ApiResponse of UserIdentityBody + public OneSignalApi.Client.ApiResponse TransferSubscriptionWithHttpInfo(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->TransferSubscription"); } - // verify the required parameter 'app' is set - if (app == null) + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->TransferSubscription"); + } + + // verify the required parameter 'transferSubscriptionRequestBody' is set + if (transferSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'transferSubscriptionRequestBody' when calling DefaultApi->TransferSubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -7816,12 +6184,13 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = app; + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = transferSubscriptionRequestBody; - localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; + localVarRequestOptions.Operation = "DefaultApi.TransferSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7829,10 +6198,10 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } // make the HTTP request - var localVarResponse = this.Client.Put("/apps/{app_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Patch("/apps/{app_id}/subscriptions/{subscription_id}/owner", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); + Exception _exception = this.ExceptionFactory("TransferSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -7843,41 +6212,49 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call - /// An app id - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of App - public async System.Threading.Tasks.Task UpdateAppAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UserIdentityBody + public async System.Threading.Tasks.Task TransferSubscriptionAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdateAppWithHttpInfoAsync(appId, app, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await TransferSubscriptionWithHttpInfoAsync(appId, subscriptionId, transferSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Update an app Updates the name or configuration settings of an existing OneSignal app + /// Transfers this Subscription to the User identified by the identity in the payload. /// /// Thrown when fails to make API call - /// An app id - /// + /// + /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (App) - public async System.Threading.Tasks.Task> UpdateAppWithHttpInfoAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UserIdentityBody) + public async System.Threading.Tasks.Task> TransferSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, TransferSubscriptionRequestBody transferSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->TransferSubscription"); } - // verify the required parameter 'app' is set - if (app == null) + // verify the required parameter 'subscriptionId' is set + if (subscriptionId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->TransferSubscription"); + } + + // verify the required parameter 'transferSubscriptionRequestBody' is set + if (transferSubscriptionRequestBody == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'transferSubscriptionRequestBody' when calling DefaultApi->TransferSubscription"); } @@ -7905,12 +6282,13 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.Data = app; + localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter + localVarRequestOptions.Data = transferSubscriptionRequestBody; - localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; + localVarRequestOptions.Operation = "DefaultApi.TransferSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (user_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -7918,11 +6296,11 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/subscriptions/{subscription_id}/owner", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); + Exception _exception = this.ExceptionFactory("TransferSubscription", localVarResponse); if (_exception != null) { throw _exception; @@ -7933,53 +6311,52 @@ public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Unsubscribe with token Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. - /// UpdateLiveActivitySuccessResponse - public UpdateLiveActivitySuccessResponse UpdateLiveActivity(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) + /// GenericSuccessBoolResponse + public GenericSuccessBoolResponse UnsubscribeEmailWithToken(string appId, string notificationId, string token, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdateLiveActivityWithHttpInfo(appId, activityId, updateLiveActivityRequest); + OneSignalApi.Client.ApiResponse localVarResponse = UnsubscribeEmailWithTokenWithHttpInfo(appId, notificationId, token); return localVarResponse.Data; } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Unsubscribe with token Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. - /// ApiResponse of UpdateLiveActivitySuccessResponse - public OneSignalApi.Client.ApiResponse UpdateLiveActivityWithHttpInfo(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) + /// ApiResponse of GenericSuccessBoolResponse + public OneSignalApi.Client.ApiResponse UnsubscribeEmailWithTokenWithHttpInfo(string appId, string notificationId, string token, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UnsubscribeEmailWithToken"); } - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->UnsubscribeEmailWithToken"); } - // verify the required parameter 'updateLiveActivityRequest' is set - if (updateLiveActivityRequest == null) + // verify the required parameter 'token' is set + if (token == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'token' when calling DefaultApi->UnsubscribeEmailWithToken"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -8000,13 +6377,13 @@ public OneSignalApi.Client.ApiResponse Update } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.Data = updateLiveActivityRequest; + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "token", token)); - localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.UnsubscribeEmailWithToken"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8014,10 +6391,10 @@ public OneSignalApi.Client.ApiResponse Update } // make the HTTP request - var localVarResponse = this.Client.Post("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/apps/{app_id}/notifications/{notification_id}/unsubscribe", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("UnsubscribeEmailWithToken", localVarResponse); if (_exception != null) { throw _exception; @@ -8028,56 +6405,55 @@ public OneSignalApi.Client.ApiResponse Update } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Unsubscribe with token Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UpdateLiveActivitySuccessResponse - public async System.Threading.Tasks.Task UpdateLiveActivityAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of GenericSuccessBoolResponse + public async System.Threading.Tasks.Task UnsubscribeEmailWithTokenAsync(string appId, string notificationId, string token, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdateLiveActivityWithHttpInfoAsync(appId, activityId, updateLiveActivityRequest, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await UnsubscribeEmailWithTokenWithHttpInfoAsync(appId, notificationId, token, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Update a Live Activity via Push Updates a specified live activity. + /// Unsubscribe with token Unsubscribe an email with a token when using your own custom email unsubscribe landing page /// /// Thrown when fails to make API call /// The OneSignal App ID for your app. Available in Keys & IDs. - /// Live Activity record ID - /// + /// The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report. + /// The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email. /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdateLiveActivitySuccessResponse) - public async System.Threading.Tasks.Task> UpdateLiveActivityWithHttpInfoAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (GenericSuccessBoolResponse) + public async System.Threading.Tasks.Task> UnsubscribeEmailWithTokenWithHttpInfoAsync(string appId, string notificationId, string token, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UnsubscribeEmailWithToken"); } - // verify the required parameter 'activityId' is set - if (activityId == null) + // verify the required parameter 'notificationId' is set + if (notificationId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'notificationId' when calling DefaultApi->UnsubscribeEmailWithToken"); } - // verify the required parameter 'updateLiveActivityRequest' is set - if (updateLiveActivityRequest == null) + // verify the required parameter 'token' is set + if (token == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'token' when calling DefaultApi->UnsubscribeEmailWithToken"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); string[] _contentTypes = new string[] { - "application/json" }; // to determine the Accept header @@ -8098,13 +6474,13 @@ public OneSignalApi.Client.ApiResponse Update } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter - localVarRequestOptions.Data = updateLiveActivityRequest; + localVarRequestOptions.PathParameters.Add("notification_id", OneSignalApi.Client.ClientUtils.ParameterToString(notificationId)); // path parameter + localVarRequestOptions.QueryParameters.Add(OneSignalApi.Client.ClientUtils.ParameterToMultiMap("", "token", token)); - localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; + localVarRequestOptions.Operation = "DefaultApi.UnsubscribeEmailWithToken"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8112,11 +6488,11 @@ public OneSignalApi.Client.ApiResponse Update } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/notifications/{notification_id}/unsubscribe", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); + Exception _exception = this.ExceptionFactory("UnsubscribeEmailWithToken", localVarResponse); if (_exception != null) { throw _exception; @@ -8127,39 +6503,39 @@ public OneSignalApi.Client.ApiResponse Update } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Update an app Updates the name or configuration settings of an existing OneSignal app /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// An app id + /// /// Index associated with the operation. - /// UpdatePlayerSuccessResponse - public UpdatePlayerSuccessResponse UpdatePlayer(string playerId, Player player, int operationIndex = 0) + /// App + public App UpdateApp(string appId, App app, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdatePlayerWithHttpInfo(playerId, player); + OneSignalApi.Client.ApiResponse localVarResponse = UpdateAppWithHttpInfo(appId, app); return localVarResponse.Data; } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Update an app Updates the name or configuration settings of an existing OneSignal app /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// An app id + /// /// Index associated with the operation. - /// ApiResponse of UpdatePlayerSuccessResponse - public OneSignalApi.Client.ApiResponse UpdatePlayerWithHttpInfo(string playerId, Player player, int operationIndex = 0) + /// ApiResponse of App + public OneSignalApi.Client.ApiResponse UpdateAppWithHttpInfo(string appId, App app, int operationIndex = 0) { - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); } - // verify the required parameter 'player' is set - if (player == null) + // verify the required parameter 'app' is set + if (app == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -8185,13 +6561,13 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.Data = player; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = app; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayer"; + localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8199,10 +6575,10 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = this.Client.Put("/players/{player_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Put("/apps/{app_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); if (_exception != null) { throw _exception; @@ -8213,41 +6589,41 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Update an app Updates the name or configuration settings of an existing OneSignal app /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// An app id + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UpdatePlayerSuccessResponse - public async System.Threading.Tasks.Task UpdatePlayerAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of App + public async System.Threading.Tasks.Task UpdateAppAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdatePlayerWithHttpInfoAsync(playerId, player, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await UpdateAppWithHttpInfoAsync(appId, app, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Edit device Update an existing device in one of your OneSignal apps + /// Update an app Updates the name or configuration settings of an existing OneSignal app /// /// Thrown when fails to make API call - /// Player's OneSignal ID - /// + /// An app id + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdatePlayerSuccessResponse) - public async System.Threading.Tasks.Task> UpdatePlayerWithHttpInfoAsync(string playerId, Player player, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (App) + public async System.Threading.Tasks.Task> UpdateAppWithHttpInfoAsync(string appId, App app, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - // verify the required parameter 'playerId' is set - if (playerId == null) + // verify the required parameter 'appId' is set + if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'playerId' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateApp"); } - // verify the required parameter 'player' is set - if (player == null) + // verify the required parameter 'app' is set + if (app == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'player' when calling DefaultApi->UpdatePlayer"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'app' when calling DefaultApi->UpdateApp"); } @@ -8274,13 +6650,13 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); } - localVarRequestOptions.PathParameters.Add("player_id", OneSignalApi.Client.ClientUtils.ParameterToString(playerId)); // path parameter - localVarRequestOptions.Data = player; + localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter + localVarRequestOptions.Data = app; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayer"; + localVarRequestOptions.Operation = "DefaultApi.UpdateApp"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (user_auth_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8288,11 +6664,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/players/{player_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayer", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateApp", localVarResponse); if (_exception != null) { throw _exception; @@ -8303,41 +6679,47 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Update a Live Activity via Push Updates a specified live activity. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// /// Index associated with the operation. - /// UpdatePlayerTagsSuccessResponse - public UpdatePlayerTagsSuccessResponse UpdatePlayerTags(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0) + /// UpdateLiveActivitySuccessResponse + public UpdateLiveActivitySuccessResponse UpdateLiveActivity(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdatePlayerTagsWithHttpInfo(appId, externalUserId, updatePlayerTagsRequestBody); + OneSignalApi.Client.ApiResponse localVarResponse = UpdateLiveActivityWithHttpInfo(appId, activityId, updateLiveActivityRequest); return localVarResponse.Data; } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Update a Live Activity via Push Updates a specified live activity. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// /// Index associated with the operation. - /// ApiResponse of UpdatePlayerTagsSuccessResponse - public OneSignalApi.Client.ApiResponse UpdatePlayerTagsWithHttpInfo(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0) + /// ApiResponse of UpdateLiveActivitySuccessResponse + public OneSignalApi.Client.ApiResponse UpdateLiveActivityWithHttpInfo(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); + } + + // verify the required parameter 'activityId' is set + if (activityId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); } - // verify the required parameter 'externalUserId' is set - if (externalUserId == null) + // verify the required parameter 'updateLiveActivityRequest' is set + if (updateLiveActivityRequest == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'externalUserId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -8364,13 +6746,13 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("external_user_id", OneSignalApi.Client.ClientUtils.ParameterToString(externalUserId)); // path parameter - localVarRequestOptions.Data = updatePlayerTagsRequestBody; + localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter + localVarRequestOptions.Data = updateLiveActivityRequest; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayerTags"; + localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8378,10 +6760,10 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = this.Client.Put("/apps/{app_id}/users/{external_user_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayerTags", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); if (_exception != null) { throw _exception; @@ -8392,43 +6774,49 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Update a Live Activity via Push Updates a specified live activity. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of UpdatePlayerTagsSuccessResponse - public async System.Threading.Tasks.Task UpdatePlayerTagsAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of UpdateLiveActivitySuccessResponse + public async System.Threading.Tasks.Task UpdateLiveActivityAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdatePlayerTagsWithHttpInfoAsync(appId, externalUserId, updatePlayerTagsRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await UpdateLiveActivityWithHttpInfoAsync(appId, activityId, updateLiveActivityRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } /// - /// Edit tags with external user id Update an existing device's tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device's tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" } + /// Update a Live Activity via Push Updates a specified live activity. /// /// Thrown when fails to make API call - /// The OneSignal App ID the user record is found under. - /// The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated. - /// (optional) + /// The OneSignal App ID for your app. Available in Keys & IDs. + /// Live Activity record ID + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UpdatePlayerTagsSuccessResponse) - public async System.Threading.Tasks.Task> UpdatePlayerTagsWithHttpInfoAsync(string appId, string externalUserId, UpdatePlayerTagsRequestBody updatePlayerTagsRequestBody = default(UpdatePlayerTagsRequestBody), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (UpdateLiveActivitySuccessResponse) + public async System.Threading.Tasks.Task> UpdateLiveActivityWithHttpInfoAsync(string appId, string activityId, UpdateLiveActivityRequest updateLiveActivityRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'appId' when calling DefaultApi->UpdateLiveActivity"); + } + + // verify the required parameter 'activityId' is set + if (activityId == null) + { + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'activityId' when calling DefaultApi->UpdateLiveActivity"); } - // verify the required parameter 'externalUserId' is set - if (externalUserId == null) + // verify the required parameter 'updateLiveActivityRequest' is set + if (updateLiveActivityRequest == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'externalUserId' when calling DefaultApi->UpdatePlayerTags"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateLiveActivityRequest' when calling DefaultApi->UpdateLiveActivity"); } @@ -8456,13 +6844,13 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter - localVarRequestOptions.PathParameters.Add("external_user_id", OneSignalApi.Client.ClientUtils.ParameterToString(externalUserId)); // path parameter - localVarRequestOptions.Data = updatePlayerTagsRequestBody; + localVarRequestOptions.PathParameters.Add("activity_id", OneSignalApi.Client.ClientUtils.ParameterToString(activityId)); // path parameter + localVarRequestOptions.Data = updateLiveActivityRequest; - localVarRequestOptions.Operation = "DefaultApi.UpdatePlayerTags"; + localVarRequestOptions.Operation = "DefaultApi.UpdateLiveActivity"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8470,11 +6858,11 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/apps/{app_id}/users/{external_user_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PostAsync("/apps/{app_id}/live_activities/{activity_id}/notifications", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("UpdatePlayerTags", localVarResponse); + Exception _exception = this.ExceptionFactory("UpdateLiveActivity", localVarResponse); if (_exception != null) { throw _exception; @@ -8490,12 +6878,12 @@ public OneSignalApi.Client.ApiResponse UpdatePlayer /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// - public void UpdateSubscription(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0) + public void UpdateSubscription(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0) { - UpdateSubscriptionWithHttpInfo(appId, subscriptionId, updateSubscriptionRequestBody); + UpdateSubscriptionWithHttpInfo(appId, subscriptionId, subscriptionBody); } /// @@ -8504,10 +6892,10 @@ public void UpdateSubscription(string appId, string subscriptionId, UpdateSubscr /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// ApiResponse of Object(void) - public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0) + public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) @@ -8521,10 +6909,10 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->UpdateSubscription"); } - // verify the required parameter 'updateSubscriptionRequestBody' is set - if (updateSubscriptionRequestBody == null) + // verify the required parameter 'subscriptionBody' is set + if (subscriptionBody == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateSubscriptionRequestBody' when calling DefaultApi->UpdateSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionBody' when calling DefaultApi->UpdateSubscription"); } OneSignalApi.Client.RequestOptions localVarRequestOptions = new OneSignalApi.Client.RequestOptions(); @@ -8552,12 +6940,12 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Data = updateSubscriptionRequestBody; + localVarRequestOptions.Data = subscriptionBody; localVarRequestOptions.Operation = "DefaultApi.UpdateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8584,13 +6972,13 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdateSubscriptionAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdateSubscriptionAsync(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - await UpdateSubscriptionWithHttpInfoAsync(appId, subscriptionId, updateSubscriptionRequestBody, operationIndex, cancellationToken).ConfigureAwait(false); + await UpdateSubscriptionWithHttpInfoAsync(appId, subscriptionId, subscriptionBody, operationIndex, cancellationToken).ConfigureAwait(false); } /// @@ -8599,11 +6987,11 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st /// Thrown when fails to make API call /// /// - /// + /// /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, UpdateSubscriptionRequestBody updateSubscriptionRequestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdateSubscriptionWithHttpInfoAsync(string appId, string subscriptionId, SubscriptionBody subscriptionBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -8617,10 +7005,10 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionId' when calling DefaultApi->UpdateSubscription"); } - // verify the required parameter 'updateSubscriptionRequestBody' is set - if (updateSubscriptionRequestBody == null) + // verify the required parameter 'subscriptionBody' is set + if (subscriptionBody == null) { - throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'updateSubscriptionRequestBody' when calling DefaultApi->UpdateSubscription"); + throw new OneSignalApi.Client.ApiException(400, "Missing required parameter 'subscriptionBody' when calling DefaultApi->UpdateSubscription"); } @@ -8649,12 +7037,12 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st localVarRequestOptions.PathParameters.Add("app_id", OneSignalApi.Client.ClientUtils.ParameterToString(appId)); // path parameter localVarRequestOptions.PathParameters.Add("subscription_id", OneSignalApi.Client.ClientUtils.ParameterToString(subscriptionId)); // path parameter - localVarRequestOptions.Data = updateSubscriptionRequestBody; + localVarRequestOptions.Data = subscriptionBody; localVarRequestOptions.Operation = "DefaultApi.UpdateSubscription"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8685,10 +7073,10 @@ public OneSignalApi.Client.ApiResponse UpdateSubscriptionWithHttpInfo(st /// /// /// Index associated with the operation. - /// InlineResponse202 - public InlineResponse202 UpdateUser(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0) + /// PropertiesBody + public PropertiesBody UpdateUser(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0) { - OneSignalApi.Client.ApiResponse localVarResponse = UpdateUserWithHttpInfo(appId, aliasLabel, aliasId, updateUserRequest); + OneSignalApi.Client.ApiResponse localVarResponse = UpdateUserWithHttpInfo(appId, aliasLabel, aliasId, updateUserRequest); return localVarResponse.Data; } @@ -8701,8 +7089,8 @@ public InlineResponse202 UpdateUser(string appId, string aliasLabel, string alia /// /// /// Index associated with the operation. - /// ApiResponse of InlineResponse202 - public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0) + /// ApiResponse of PropertiesBody + public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0) { // verify the required parameter 'appId' is set if (appId == null) @@ -8759,7 +7147,7 @@ public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo localVarRequestOptions.Operation = "DefaultApi.UpdateUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8767,7 +7155,7 @@ public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo } // make the HTTP request - var localVarResponse = this.Client.Patch("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Patch("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { Exception _exception = this.ExceptionFactory("UpdateUser", localVarResponse); @@ -8790,10 +7178,10 @@ public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of InlineResponse202 - public async System.Threading.Tasks.Task UpdateUserAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of PropertiesBody + public async System.Threading.Tasks.Task UpdateUserAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - OneSignalApi.Client.ApiResponse localVarResponse = await UpdateUserWithHttpInfoAsync(appId, aliasLabel, aliasId, updateUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); + OneSignalApi.Client.ApiResponse localVarResponse = await UpdateUserWithHttpInfoAsync(appId, aliasLabel, aliasId, updateUserRequest, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -8807,8 +7195,8 @@ public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo /// /// Index associated with the operation. /// Cancellation Token to cancel the request. - /// Task of ApiResponse (InlineResponse202) - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + /// Task of ApiResponse (PropertiesBody) + public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync(string appId, string aliasLabel, string aliasId, UpdateUserRequest updateUserRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'appId' is set if (appId == null) @@ -8866,7 +7254,7 @@ public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo localVarRequestOptions.Operation = "DefaultApi.UpdateUser"; localVarRequestOptions.OperationIndex = operationIndex; - // authentication (app_key) required + // authentication (rest_api_key) required // bearer authentication required if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) { @@ -8874,7 +7262,7 @@ public OneSignalApi.Client.ApiResponse UpdateUserWithHttpInfo } // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + var localVarResponse = await this.AsynchronousClient.PatchAsync("/apps/{app_id}/users/by/{alias_label}/{alias_id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); if (this.ExceptionFactory != null) { diff --git a/src/OneSignalApi/Client/ApiClient.cs b/src/OneSignalApi/Client/ApiClient.cs index 0cc8e99..2d53ac1 100644 --- a/src/OneSignalApi/Client/ApiClient.cs +++ b/src/OneSignalApi/Client/ApiClient.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -304,7 +304,7 @@ private RestRequest NewRequest( } // Always add the One Signal telemetry to the request. - request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=2.2.0"); + request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=5.0.0-beta1"); if (configuration.DefaultHeaders != null) { diff --git a/src/OneSignalApi/Client/ApiException.cs b/src/OneSignalApi/Client/ApiException.cs index 82069f7..bb78e84 100644 --- a/src/OneSignalApi/Client/ApiException.cs +++ b/src/OneSignalApi/Client/ApiException.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ApiResponse.cs b/src/OneSignalApi/Client/ApiResponse.cs index 74983b5..99e12f4 100644 --- a/src/OneSignalApi/Client/ApiResponse.cs +++ b/src/OneSignalApi/Client/ApiResponse.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ClientUtils.cs b/src/OneSignalApi/Client/ClientUtils.cs index 9d42440..53b7ac3 100644 --- a/src/OneSignalApi/Client/ClientUtils.cs +++ b/src/OneSignalApi/Client/ClientUtils.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/Configuration.cs b/src/OneSignalApi/Client/Configuration.cs index 8ebab42..b10d203 100644 --- a/src/OneSignalApi/Client/Configuration.cs +++ b/src/OneSignalApi/Client/Configuration.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "2.2.0"; + public const string Version = "5.0.0-beta1"; /// /// Identifier for ISO 8601 DateTime Format @@ -109,7 +109,7 @@ public class Configuration : IReadableConfiguration public Configuration() { Proxy = null; - UserAgent = "OpenAPI-Generator/2.2.0/csharp"; + UserAgent = "OpenAPI-Generator/5.0.0-beta1/csharp"; BasePath = "https://api.onesignal.com"; DefaultHeaders = new ConcurrentDictionary(); ApiKey = new ConcurrentDictionary(); @@ -516,8 +516,8 @@ public static string ToDebugReport() string report = "C# SDK (OneSignalApi) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.4.0\n"; - report += " SDK Package Version: 2.2.0\n"; + report += " Version of the API: 5.0.1\n"; + report += " SDK Package Version: 5.0.0-beta1\n"; return report; } diff --git a/src/OneSignalApi/Client/ExceptionFactory.cs b/src/OneSignalApi/Client/ExceptionFactory.cs index d151e68..17589bf 100644 --- a/src/OneSignalApi/Client/ExceptionFactory.cs +++ b/src/OneSignalApi/Client/ExceptionFactory.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/GlobalConfiguration.cs b/src/OneSignalApi/Client/GlobalConfiguration.cs index 6da353d..5a00c60 100644 --- a/src/OneSignalApi/Client/GlobalConfiguration.cs +++ b/src/OneSignalApi/Client/GlobalConfiguration.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/HttpMethod.cs b/src/OneSignalApi/Client/HttpMethod.cs index 5b69423..ea4f72c 100644 --- a/src/OneSignalApi/Client/HttpMethod.cs +++ b/src/OneSignalApi/Client/HttpMethod.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IApiAccessor.cs b/src/OneSignalApi/Client/IApiAccessor.cs index c3c6ed0..4985899 100644 --- a/src/OneSignalApi/Client/IApiAccessor.cs +++ b/src/OneSignalApi/Client/IApiAccessor.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IAsynchronousClient.cs b/src/OneSignalApi/Client/IAsynchronousClient.cs index bcffa99..d3aee0c 100644 --- a/src/OneSignalApi/Client/IAsynchronousClient.cs +++ b/src/OneSignalApi/Client/IAsynchronousClient.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/IReadableConfiguration.cs b/src/OneSignalApi/Client/IReadableConfiguration.cs index 02918f7..049a75a 100644 --- a/src/OneSignalApi/Client/IReadableConfiguration.cs +++ b/src/OneSignalApi/Client/IReadableConfiguration.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/ISynchronousClient.cs b/src/OneSignalApi/Client/ISynchronousClient.cs index 953bac5..b74decd 100644 --- a/src/OneSignalApi/Client/ISynchronousClient.cs +++ b/src/OneSignalApi/Client/ISynchronousClient.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/Multimap.cs b/src/OneSignalApi/Client/Multimap.cs index bf82208..6369a3f 100644 --- a/src/OneSignalApi/Client/Multimap.cs +++ b/src/OneSignalApi/Client/Multimap.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/OpenAPIDateConverter.cs b/src/OneSignalApi/Client/OpenAPIDateConverter.cs index 378322b..2bb7169 100644 --- a/src/OneSignalApi/Client/OpenAPIDateConverter.cs +++ b/src/OneSignalApi/Client/OpenAPIDateConverter.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/RequestOptions.cs b/src/OneSignalApi/Client/RequestOptions.cs index 6e5d558..24efaf3 100644 --- a/src/OneSignalApi/Client/RequestOptions.cs +++ b/src/OneSignalApi/Client/RequestOptions.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Client/RetryConfiguration.cs b/src/OneSignalApi/Client/RetryConfiguration.cs index 21a8a22..17cf05d 100644 --- a/src/OneSignalApi/Client/RetryConfiguration.cs +++ b/src/OneSignalApi/Client/RetryConfiguration.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/AbstractOpenAPISchema.cs b/src/OneSignalApi/Model/AbstractOpenAPISchema.cs index 898952e..55b30b8 100644 --- a/src/OneSignalApi/Model/AbstractOpenAPISchema.cs +++ b/src/OneSignalApi/Model/AbstractOpenAPISchema.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/App.cs b/src/OneSignalApi/Model/App.cs index eb2e11f..dba65b5 100644 --- a/src/OneSignalApi/Model/App.cs +++ b/src/OneSignalApi/Model/App.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/OneSignalApi/Model/BasicNotification.cs b/src/OneSignalApi/Model/BasicNotification.cs index c4a86ce..407040d 100644 --- a/src/OneSignalApi/Model/BasicNotification.cs +++ b/src/OneSignalApi/Model/BasicNotification.cs @@ -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: 1.4.0 + * The version of the OpenAPI document: 5.0.1 * Contact: devrel@onesignal.com * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -109,17 +109,16 @@ protected BasicNotification() { } /// /// The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"] . /// Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"] . - /// Specific playerids to send your notification to. _Does not require API Auth Key. Do not combine with other targeting parameters. Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call . - /// Target specific devices by custom user IDs assigned via API. Not compatible with any other targeting parameters Example: [\"custom-id-assigned-by-api\"] REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call. Note: If targeting push, email, or sms subscribers with same ids, use with channel_for_external_user_ids to indicate you are sending a push or email or sms. . + /// Specific subscription ids to send your notification to. _Does not require API Auth Key._ Not compatible with any other targeting parameters. Example: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"] Limit of 2,000 entries per REST API call . /// Recommended for Sending Emails - Target specific email addresses. If an email does not correspond to an existing user, a new user will be created. Example: nick@catfac.ts Limit of 2,000 entries per REST API call . /// Recommended for Sending SMS - Target specific phone numbers. The phone number should be in the E.164 format. Phone number should be an existing subscriber on OneSignal. Refer our docs to learn how to add phone numbers to OneSignal. Example phone number: +1999999999 Limit of 2,000 entries per REST API call . - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call . - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call . - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call . - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . - /// Not Recommended: Please consider using include_player_ids or include_external_user_ids instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . - /// includeAliases. + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using iOS device tokens. Warning: Only works with Production tokens. All non-alphanumeric characters must be removed from each token. If a token does not correspond to an existing user, a new user will be created. Example: ce777617da7f548fe7a9ab6febb56cf39fba6d38203... Limit of 2,000 entries per REST API call . + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Windows URIs. If a token does not correspond to an existing user, a new user will be created. Example: http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-... Limit of 2,000 entries per REST API call . + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Amazon ADM registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV... Limit of 2,000 entries per REST API call . + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome App registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Chrome Web Push registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . + /// Not Recommended: Please consider using include_subscription_ids or include_aliases instead. Target using Android device registration IDs. If a token does not correspond to an existing user, a new user will be created. Example: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_... Limit of 2,000 entries per REST API call . + /// Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms.. /// targetChannel. /// id. /// Required for SMS Messages. An identifier for tracking message within the OneSignal dashboard or export analytics. Not shown to end user.. @@ -133,7 +132,6 @@ protected BasicNotification() { } /// Indicates whether to send to all devices registered under your app's Windows platform.. /// Indicates whether to send to all devices registered under your app's Amazon Fire platform.. /// This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. . - /// Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. . /// Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. (required). /// [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true . /// Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true . @@ -202,6 +200,8 @@ protected BasicNotification() { } /// Channel: Push Notifications Platform: iOS 12+ This parameter is supported in iOS 12 and above. It allows you to group related notifications together. If two notifications have the same thread-id, they will both be added to the same group. . /// Channel: Push Notifications Platform: iOS 12+ When using thread_id to create grouped notifications in iOS 12+, you can also control the summary. For example, a grouped notification can say \"12 more notifications from John Doe\". The summary_arg lets you set the name of the person/thing the notifications are coming from, and will show up as \"X more notifications from summary_arg\" . /// Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count = 2, the new total will be 14 and the summary will be \"14 more notifications from summary_arg\" . + /// Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. . + /// Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \"interrupt\" the user. Can choose from options: ['active', 'passive', 'time_sensitive', 'critical']. Default is active. . /// Channel: Email Required. The subject of the email. . /// Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . /// Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. . @@ -212,7 +212,7 @@ protected BasicNotification() { } /// Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. . /// filters. /// Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} . - public BasicNotification(List includedSegments = default(List), List excludedSegments = default(List), List includePlayerIds = default(List), List includeExternalUserIds = default(List), List includeEmailTokens = default(List), List includePhoneNumbers = default(List), List includeIosTokens = default(List), List includeWpWnsUris = default(List), List includeAmazonRegIds = default(List), List includeChromeRegIds = default(List), List includeChromeWebRegIds = default(List), List includeAndroidRegIds = default(List), PlayerNotificationTargetIncludeAliases includeAliases = default(PlayerNotificationTargetIncludeAliases), TargetChannelEnum? targetChannel = default(TargetChannelEnum?), string id = default(string), string name = default(string), bool? isIos = default(bool?), bool? isAndroid = default(bool?), bool? isHuawei = default(bool?), bool? isAnyWeb = default(bool?), bool? isChromeWeb = default(bool?), bool? isFirefox = default(bool?), bool? isSafari = default(bool?), bool? isWPWNS = default(bool?), bool? isAdm = default(bool?), bool? isChrome = default(bool?), string channelForExternalUserIds = default(string), string appId = default(string), string externalId = default(string), string idempotencyKey = default(string), StringMap contents = default(StringMap), StringMap headings = default(StringMap), StringMap subtitle = default(StringMap), Object data = default(Object), string huaweiMsgType = default(string), string url = default(string), string webUrl = default(string), string appUrl = default(string), Object iosAttachments = default(Object), string templateId = default(string), bool? contentAvailable = default(bool?), bool mutableContent = default(bool), string targetContentIdentifier = default(string), string bigPicture = default(string), string huaweiBigPicture = default(string), string admBigPicture = default(string), string chromeBigPicture = default(string), string chromeWebImage = default(string), List