From 88bd143141281b2f2bee1373e46fbf59fe7b3e76 Mon Sep 17 00:00:00 2001 From: mochizuki-pg Date: Sun, 12 Feb 2023 17:37:59 +0900 Subject: [PATCH 1/4] fix: NewPlayer func --- docs/DefaultApi.md | 488 +++++++++++++++++---------------------------- docs/Player.md | 104 ++++++---- model_player.go | 28 ++- 3 files changed, 254 insertions(+), 366 deletions(-) diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 0060911..3c1f33d 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -2,32 +2,30 @@ All URIs are relative to *https://onesignal.com/api/v1* -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 -[**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 -[**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 -[**EndLiveActivity**](DefaultApi.md#EndLiveActivity) | **Delete** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity -[**ExportPlayers**](DefaultApi.md#ExportPlayers) | **Post** /players/csv_export?app_id={app_id} | CSV export -[**GetApp**](DefaultApi.md#GetApp) | **Get** /apps/{app_id} | View an app -[**GetApps**](DefaultApi.md#GetApps) | **Get** /apps | View apps -[**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 -[**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 - - +| 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 | +| [**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 | +| [**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 | +| [**EndLiveActivity**](DefaultApi.md#EndLiveActivity) | **Delete** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity | +| [**ExportPlayers**](DefaultApi.md#ExportPlayers) | **Post** /players/csv_export?app_id={app_id} | CSV export | +| [**GetApp**](DefaultApi.md#GetApp) | **Get** /apps/{app_id} | View an app | +| [**GetApps**](DefaultApi.md#GetApps) | **Get** /apps | View apps | +| [**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 | +| [**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 | ## BeginLiveActivity @@ -35,8 +33,6 @@ Method | HTTP request | Description Start Live Activity - - ### Authorization [app_key](../README.md#app_key) @@ -57,7 +53,7 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. activityId := "activityId_example" // string | Live Activity record ID - beginLiveActivityRequest := *onesignal.NewBeginLiveActivityRequest("PushToken_example", "SubscriptionId_example") // BeginLiveActivityRequest | + beginLiveActivityRequest := *onesignal.NewBeginLiveActivityRequest("PushToken_example", "SubscriptionId_example") // BeginLiveActivityRequest | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -75,27 +71,24 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**activityId** | **string** | Live Activity record ID | +| Name | Type | Description | Notes | +| -------------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +| **activityId** | **string** | Live Activity record ID | ### Other Parameters Other parameters are passed through a pointer to a apiBeginLiveActivityRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **beginLiveActivityRequest** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md) | | +**beginLiveActivityRequest** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md) | | ### Return type - (empty response body) +(empty response body) ### HTTP request headers @@ -106,15 +99,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## CancelNotification > CancelNotificationSuccessResponse CancelNotification(ctx, notificationId).AppId(appId).Execute() Stop a scheduled or currently outgoing notification - - ### Authorization [app_key](../README.md#app_key) @@ -133,8 +123,8 @@ import ( ) func main() { - appId := "appId_example" // string | - notificationId := "notificationId_example" // string | + appId := "appId_example" // string | + notificationId := "notificationId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -154,21 +144,18 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**notificationId** | **string** | | +| Name | Type | Description | Notes | +| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **notificationId** | **string** | | ### Other Parameters Other parameters are passed through a pointer to a apiCancelNotificationRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | | - +| Name | Type | Description | Notes | +| --------- | ---------- | ----------- | ----- | +| **appId** | **string** | | ### Return type @@ -183,15 +170,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## CreateApp > App CreateApp(ctx).App(app).Execute() Create an app - - ### Authorization [user_key](../README.md#user_key) @@ -210,7 +194,7 @@ import ( ) func main() { - app := *onesignal.NewApp() // App | + app := *onesignal.NewApp() // App | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -230,16 +214,13 @@ func main() { ### Path Parameters - - ### Other Parameters Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app** | [**App**](App.md) | | +| Name | Type | Description | Notes | +| ------- | ----------------- | ----------- | ----- | +| **app** | [**App**](App.md) | | ### Return type @@ -254,15 +235,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## CreateNotification > CreateNotificationSuccessResponse CreateNotification(ctx).Notification(notification).Execute() Create notification - - ### Authorization [app_key](../README.md#app_key) @@ -281,7 +259,7 @@ import ( ) func main() { - notification := *onesignal.NewNotification("AppId_example") // Notification | + notification := *onesignal.NewNotification("AppId_example") // Notification | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -301,16 +279,13 @@ func main() { ### Path Parameters - - ### Other Parameters Other parameters are passed through a pointer to a apiCreateNotificationRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **notification** | [**Notification**](Notification.md) | | +| Name | Type | Description | Notes | +| ---------------- | ----------------------------------- | ----------- | ----- | +| **notification** | [**Notification**](Notification.md) | | ### Return type @@ -325,15 +300,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## CreatePlayer > CreatePlayerSuccessResponse CreatePlayer(ctx).Player(player).Execute() Add a device - - ### Authorization [app_key](../README.md#app_key) @@ -352,7 +324,8 @@ import ( ) func main() { - player := *onesignal.NewPlayer(int32(123)) // Player | + appId := "APP_ID_STRING" + player := *onesignal.NewPlayer("", int32(123), &appId) // Player | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -372,16 +345,13 @@ func main() { ### Path Parameters - - ### Other Parameters Other parameters are passed through a pointer to a apiCreatePlayerRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **player** | [**Player**](Player.md) | | +| Name | Type | Description | Notes | +| ---------- | ----------------------- | ----------- | ----- | +| **player** | [**Player**](Player.md) | | ### Return type @@ -396,15 +366,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## CreateSegments > CreateSegmentSuccessResponse CreateSegments(ctx, appId).Segment(segment).Execute() Create Segments - - ### Authorization [app_key](../README.md#app_key) @@ -444,21 +411,19 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +| Name | Type | Description | Notes | +| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | ### Other Parameters Other parameters are passed through a pointer to a apiCreateSegmentsRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **segment** | [**Segment**](Segment.md) | | +**segment** | [**Segment**](Segment.md) | | ### Return type @@ -473,15 +438,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## DeletePlayer > DeletePlayerSuccessResponse DeletePlayer(ctx, playerId).AppId(appId).Execute() Delete a user record - - ### Authorization [app_key](../README.md#app_key) @@ -521,21 +483,18 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playerId** | **string** | The OneSignal player_id | +| Name | Type | Description | Notes | +| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **playerId** | **string** | The OneSignal player_id | ### Other Parameters Other parameters are passed through a pointer to a apiDeletePlayerRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | - +| Name | Type | Description | Notes | +| --------- | ---------- | --------------------------------------------------------------- | ----- | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | ### Return type @@ -550,15 +509,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## DeleteSegments > DeleteSegmentSuccessResponse DeleteSegments(ctx, appId, segmentId).Execute() Delete Segments - - ### Authorization [app_key](../README.md#app_key) @@ -598,22 +554,18 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**segmentId** | **string** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | +| Name | Type | Description | Notes | +| ------------- | ------------------- | --------------------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +| **segmentId** | **string** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | ### Other Parameters Other parameters are passed through a pointer to a apiDeleteSegmentsRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | ### Return type @@ -628,15 +580,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## EndLiveActivity > EndLiveActivity(ctx, appId, activityId, subscriptionId).Execute() Stop Live Activity - - ### Authorization [app_key](../README.md#app_key) @@ -675,28 +624,23 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**activityId** | **string** | Live Activity record ID | -**subscriptionId** | **string** | Subscription ID | +| Name | Type | Description | Notes | +| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +| **activityId** | **string** | Live Activity record ID | +| **subscriptionId** | **string** | Subscription ID | ### Other Parameters Other parameters are passed through a pointer to a apiEndLiveActivityRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | ### Return type - (empty response body) +(empty response body) ### HTTP request headers @@ -707,15 +651,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## ExportPlayers > ExportPlayersSuccessResponse ExportPlayers(ctx, appId).ExportPlayersRequestBody(exportPlayersRequestBody).Execute() CSV export - - ### Authorization [app_key](../README.md#app_key) @@ -755,21 +696,19 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The app ID that you want to export devices from | +| Name | Type | Description | Notes | +| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The app ID that you want to export devices from | ### Other Parameters Other parameters are passed through a pointer to a apiExportPlayersRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | +**exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | ### Return type @@ -784,15 +723,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetApp > App GetApp(ctx, appId).Execute() View an app - - ### Authorization [user_key](../README.md#user_key) @@ -831,20 +767,17 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | An app id | +| Name | Type | Description | Notes | +| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | An app id | ### Other Parameters Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | ### Return type @@ -859,15 +792,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetApps > []App GetApps(ctx).Execute() View apps - - ### Authorization [user_key](../README.md#user_key) @@ -911,7 +841,6 @@ This endpoint does not need any parameter. Other parameters are passed through a pointer to a apiGetAppsRequest struct via the builder pattern - ### Return type [**[]App**](App.md) @@ -925,15 +854,12 @@ Other parameters are passed through a pointer to a apiGetAppsRequest struct via [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetNotification > NotificationWithMeta GetNotification(ctx, notificationId).AppId(appId).Execute() View notification - - ### Authorization [app_key](../README.md#app_key) @@ -952,8 +878,8 @@ import ( ) func main() { - appId := "appId_example" // string | - notificationId := "notificationId_example" // string | + appId := "appId_example" // string | + notificationId := "notificationId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -973,21 +899,18 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**notificationId** | **string** | | +| Name | Type | Description | Notes | +| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **notificationId** | **string** | | ### Other Parameters Other parameters are passed through a pointer to a apiGetNotificationRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | | - +| Name | Type | Description | Notes | +| --------- | ---------- | ----------- | ----- | +| **appId** | **string** | | ### Return type @@ -1002,15 +925,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetNotificationHistory > NotificationHistorySuccessResponse GetNotificationHistory(ctx, notificationId).GetNotificationRequestBody(getNotificationRequestBody).Execute() Notification History - - ### Authorization [app_key](../README.md#app_key) @@ -1030,7 +950,7 @@ import ( func main() { notificationId := "notificationId_example" // string | The \"id\" of the message found in the Notification object - getNotificationRequestBody := *onesignal.NewGetNotificationRequestBody() // GetNotificationRequestBody | + getNotificationRequestBody := *onesignal.NewGetNotificationRequestBody() // GetNotificationRequestBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -1050,21 +970,19 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**notificationId** | **string** | The \"id\" of the message found in the Notification object | +| Name | Type | Description | Notes | +| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **notificationId** | **string** | The \"id\" of the message found in the Notification object | ### Other Parameters Other parameters are passed through a pointer to a apiGetNotificationHistoryRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | +**getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | ### Return type @@ -1079,15 +997,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetNotifications > NotificationSlice GetNotifications(ctx).AppId(appId).Limit(limit).Offset(offset).Kind(kind).Execute() View notifications - - ### Authorization [app_key](../README.md#app_key) @@ -1129,19 +1044,16 @@ func main() { ### Path Parameters - - ### Other Parameters Other parameters are passed through a pointer to a apiGetNotificationsRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | The app ID that you want to view notifications from | - **limit** | **int32** | How many notifications to return. Max is 50. Default is 50. | - **offset** | **int32** | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | - **kind** | **int32** | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | +| Name | Type | Description | Notes | +| ---------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **appId** | **string** | The app ID that you want to view notifications from | +| **limit** | **int32** | How many notifications to return. Max is 50. Default is 50. | +| **offset** | **int32** | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | +| **kind** | **int32** | Kind of notifications returned: _ unset - All notification types (default) _ `0` - Dashboard only _ `1` - API only _ `3` - Automated only | ### Return type @@ -1156,15 +1068,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetOutcomes > OutcomesData GetOutcomes(ctx, appId).OutcomeNames(outcomeNames).OutcomeNames2(outcomeNames2).OutcomeTimeRange(outcomeTimeRange).OutcomePlatforms(outcomePlatforms).OutcomeAttribution(outcomeAttribution).Execute() View Outcomes - - ### Authorization [app_key](../README.md#app_key) @@ -1184,7 +1093,7 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - outcomeNames := "outcomeNames_example" // string | 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 + outcomeNames := "outcomeNames_example" // string | 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 outcomeNames2 := "outcomeNames_example" // string | 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) outcomeTimeRange := "outcomeTimeRange_example" // string | 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) outcomePlatforms := "outcomePlatforms_example" // string | 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) @@ -1208,25 +1117,23 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +| Name | Type | Description | Notes | +| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | ### Other Parameters Other parameters are passed through a pointer to a apiGetOutcomesRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **outcomeNames** | **string** | 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 | - **outcomeNames2** | **string** | 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. | - **outcomeTimeRange** | **string** | 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. | - **outcomePlatforms** | **string** | 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. | - **outcomeAttribution** | **string** | 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. | +**outcomeNames** | **string** | 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 | +**outcomeNames2** | **string** | 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. | +**outcomeTimeRange** | **string** | 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. | +**outcomePlatforms** | **string** | 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. | +**outcomeAttribution** | **string** | 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. | ### Return type @@ -1241,15 +1148,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetPlayer > Player GetPlayer(ctx, playerId).AppId(appId).EmailAuthHash(emailAuthHash).Execute() View device - - ### Authorization [app_key](../README.md#app_key) @@ -1290,22 +1194,20 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playerId** | **string** | Player's OneSignal ID | +| Name | Type | Description | Notes | +| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **playerId** | **string** | Player's OneSignal ID | ### Other Parameters Other parameters are passed through a pointer to a apiGetPlayerRequest struct via the builder pattern +| Name | Type | Description | Notes | +| --------- | ---------- | --------------------------- | ----- | +| **appId** | **string** | Your app_id for this device | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | Your app_id for this device | - - **emailAuthHash** | **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | +**emailAuthHash** | **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | ### Return type @@ -1320,15 +1222,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## GetPlayers > PlayerSlice GetPlayers(ctx).AppId(appId).Limit(limit).Offset(offset).Execute() View devices - - ### Authorization [app_key](../README.md#app_key) @@ -1369,18 +1268,15 @@ func main() { ### Path Parameters - - ### Other Parameters Other parameters are passed through a pointer to a apiGetPlayersRequest struct via the builder pattern - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **appId** | **string** | The app ID that you want to view players from | - **limit** | **int32** | How many devices to return. Max is 300. Default is 300 | - **offset** | **int32** | Result offset. Default is 0. Results are sorted by id; | +| Name | Type | Description | Notes | +| ---------- | ---------- | ------------------------------------------------------ | ----- | +| **appId** | **string** | The app ID that you want to view players from | +| **limit** | **int32** | How many devices to return. Max is 300. Default is 300 | +| **offset** | **int32** | Result offset. Default is 0. Results are sorted by id; | ### Return type @@ -1395,15 +1291,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## UpdateApp > App UpdateApp(ctx, appId).App(app).Execute() Update an app - - ### Authorization [user_key](../README.md#user_key) @@ -1423,7 +1316,7 @@ import ( func main() { appId := "appId_example" // string | An app id - app := *onesignal.NewApp() // App | + app := *onesignal.NewApp() // App | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -1443,21 +1336,19 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | An app id | +| Name | Type | Description | Notes | +| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | An app id | ### Other Parameters Other parameters are passed through a pointer to a apiUpdateAppRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **app** | [**App**](App.md) | | +**app** | [**App**](App.md) | | ### Return type @@ -1472,15 +1363,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## UpdateLiveActivity > UpdateLiveActivitySuccessResponse UpdateLiveActivity(ctx, appId, activityId).UpdateLiveActivityRequest(updateLiveActivityRequest).Execute() Update a Live Activity via Push - - ### Authorization [app_key](../README.md#app_key) @@ -1501,7 +1389,7 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. activityId := "activityId_example" // string | Live Activity record ID - updateLiveActivityRequest := *onesignal.NewUpdateLiveActivityRequest("Name_example", "Event_example", map[string]interface{}(123)) // UpdateLiveActivityRequest | + updateLiveActivityRequest := *onesignal.NewUpdateLiveActivityRequest("Name_example", "Event_example", map[string]interface{}(123)) // UpdateLiveActivityRequest | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -1521,23 +1409,20 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -**activityId** | **string** | Live Activity record ID | +| Name | Type | Description | Notes | +| -------------- | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +| **activityId** | **string** | Live Activity record ID | ### Other Parameters Other parameters are passed through a pointer to a apiUpdateLiveActivityRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **updateLiveActivityRequest** | [**UpdateLiveActivityRequest**](UpdateLiveActivityRequest.md) | | +**updateLiveActivityRequest** | [**UpdateLiveActivityRequest**](UpdateLiveActivityRequest.md) | | ### Return type @@ -1552,15 +1437,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## UpdatePlayer > UpdatePlayerSuccessResponse UpdatePlayer(ctx, playerId).Player(player).Execute() Edit device - - ### Authorization [app_key](../README.md#app_key) @@ -1580,7 +1462,8 @@ import ( func main() { playerId := "playerId_example" // string | Player's OneSignal ID - player := *onesignal.NewPlayer(int32(123)) // Player | + appId := "APP_ID_STRING" + player := *onesignal.NewPlayer("", int32(123), &appId) // Player | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -1600,21 +1483,19 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**playerId** | **string** | Player's OneSignal ID | +| Name | Type | Description | Notes | +| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **playerId** | **string** | Player's OneSignal ID | ### Other Parameters Other parameters are passed through a pointer to a apiUpdatePlayerRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **player** | [**Player**](Player.md) | | +**player** | [**Player**](Player.md) | | ### Return type @@ -1629,15 +1510,12 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - ## UpdatePlayerTags > UpdatePlayerTagsSuccessResponse UpdatePlayerTags(ctx, appId, externalUserId).UpdatePlayerTagsRequestBody(updatePlayerTagsRequestBody).Execute() Edit tags with external user id - - ### Authorization [app_key](../README.md#app_key) @@ -1678,23 +1556,20 @@ func main() { ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**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. | +| Name | Type | Description | Notes | +| ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------- | ----- | +| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | +| **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. | ### Other Parameters Other parameters are passed through a pointer to a apiUpdatePlayerTagsRequest struct via the builder pattern +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **updatePlayerTagsRequestBody** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md) | | +**updatePlayerTagsRequestBody** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md) | | ### Return type @@ -1708,4 +1583,3 @@ 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) - diff --git a/docs/Player.md b/docs/Player.md index d547483..6d24456 100644 --- a/docs/Player.md +++ b/docs/Player.md @@ -2,41 +2,41 @@ ## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The device's OneSignal ID | [optional] [readonly] -**InvalidIdentifier** | Pointer to **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] -**AppId** | Pointer to **string** | | [optional] -**DeviceType** | **int32** | 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** | Pointer to **NullableString** | a custom user ID | [optional] -**ExternalUserIdAuthHash** | Pointer to **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] -**EmailAuthHash** | Pointer to **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] -**Identifier** | Pointer to **NullableString** | 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** | Pointer to **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** | Pointer to **NullableInt32** | Number of seconds away from UTC. Example: -28800 | [optional] -**GameVersion** | Pointer to **NullableString** | Version of your app. Example: 1.1 | [optional] -**DeviceModel** | Pointer to **NullableString** | Device make and model. Example: iPhone5,1 | [optional] -**DeviceOs** | Pointer to **NullableString** | Device operating system version. Example: 7.0.4 | [optional] -**AdId** | Pointer to **NullableString** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] -**Sdk** | Pointer to **NullableString** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] -**SessionCount** | Pointer to **int32** | Number of times the user has played the game, defaults to 1 | [optional] -**Tags** | Pointer to **map[string]interface{}** | 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** | Pointer to **float32** | Amount the user has spent in USD, up to two decimal places | [optional] -**CreatedAt** | Pointer to **int64** | Unixtime when the player joined the game | [optional] -**Playtime** | Pointer to **int64** | Seconds player was running your app. | [optional] -**BadgeCount** | Pointer to **int32** | 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** | Pointer to **int32** | Unixtime when the player was last active | [optional] -**NotificationTypes** | Pointer to **int32** | 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** | Pointer to **NullableInt32** | 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** | Pointer to **float32** | Longitude of the device, used for geotagging to segment on. | [optional] -**Lat** | Pointer to **float32** | Latitude of the device, used for geotagging to segment on. | [optional] -**Country** | Pointer to **string** | Country code in the ISO 3166-1 Alpha 2 format | [optional] +| Name | Type | Description | Notes | +| -------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | +| **Id** | Pointer to **string** | The device's OneSignal ID | [optional] [readonly] | +| **InvalidIdentifier** | Pointer to **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] | +| **AppId** | Pointer to **string** | | [optional] | +| **DeviceType** | **int32** | 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** | Pointer to **NullableString** | a custom user ID | [optional] | +| **ExternalUserIdAuthHash** | Pointer to **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] | +| **EmailAuthHash** | Pointer to **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] | +| **Identifier** | Pointer to **NullableString** | 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** | Pointer to **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** | Pointer to **NullableInt32** | Number of seconds away from UTC. Example: -28800 | [optional] | +| **GameVersion** | Pointer to **NullableString** | Version of your app. Example: 1.1 | [optional] | +| **DeviceModel** | Pointer to **NullableString** | Device make and model. Example: iPhone5,1 | [optional] | +| **DeviceOs** | Pointer to **NullableString** | Device operating system version. Example: 7.0.4 | [optional] | +| **AdId** | Pointer to **NullableString** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] | +| **Sdk** | Pointer to **NullableString** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] | +| **SessionCount** | Pointer to **int32** | Number of times the user has played the game, defaults to 1 | [optional] | +| **Tags** | Pointer to **map[string]interface{}** | 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** | Pointer to **float32** | Amount the user has spent in USD, up to two decimal places | [optional] | +| **CreatedAt** | Pointer to **int64** | Unixtime when the player joined the game | [optional] | +| **Playtime** | Pointer to **int64** | Seconds player was running your app. | [optional] | +| **BadgeCount** | Pointer to **int32** | 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** | Pointer to **int32** | Unixtime when the player was last active | [optional] | +| **NotificationTypes** | Pointer to **int32** | 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** | Pointer to **NullableInt32** | 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** | Pointer to **float32** | Longitude of the device, used for geotagging to segment on. | [optional] | +| **Lat** | Pointer to **float32** | Latitude of the device, used for geotagging to segment on. | [optional] | +| **Country** | Pointer to **string** | Country code in the ISO 3166-1 Alpha 2 format | [optional] | ## Methods ### NewPlayer -`func NewPlayer(deviceType int32, ) *Player` +`func NewPlayer(id string, deviceType int32, appId *string) *Player` NewPlayer instantiates a new Player object This constructor will assign default values to properties that have it defined, @@ -145,7 +145,6 @@ and a boolean to check if the value has been set. SetDeviceType sets DeviceType field to given value. - ### GetExternalUserId `func (o *Player) GetExternalUserId() string` @@ -175,12 +174,14 @@ HasExternalUserId returns a boolean if a field has been set. `func (o *Player) SetExternalUserIdNil(b bool)` - SetExternalUserIdNil sets the value for ExternalUserId to be an explicit nil +SetExternalUserIdNil sets the value for ExternalUserId to be an explicit nil ### UnsetExternalUserId + `func (o *Player) UnsetExternalUserId()` UnsetExternalUserId ensures that no value is present for ExternalUserId, not even an explicit nil + ### GetExternalUserIdAuthHash `func (o *Player) GetExternalUserIdAuthHash() string` @@ -260,12 +261,14 @@ HasIdentifier returns a boolean if a field has been set. `func (o *Player) SetIdentifierNil(b bool)` - SetIdentifierNil sets the value for Identifier to be an explicit nil +SetIdentifierNil sets the value for Identifier to be an explicit nil ### UnsetIdentifier + `func (o *Player) UnsetIdentifier()` UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil + ### GetLanguage `func (o *Player) GetLanguage() string` @@ -320,12 +323,14 @@ HasTimezone returns a boolean if a field has been set. `func (o *Player) SetTimezoneNil(b bool)` - SetTimezoneNil sets the value for Timezone to be an explicit nil +SetTimezoneNil sets the value for Timezone to be an explicit nil ### UnsetTimezone + `func (o *Player) UnsetTimezone()` UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil + ### GetGameVersion `func (o *Player) GetGameVersion() string` @@ -355,12 +360,14 @@ HasGameVersion returns a boolean if a field has been set. `func (o *Player) SetGameVersionNil(b bool)` - SetGameVersionNil sets the value for GameVersion to be an explicit nil +SetGameVersionNil sets the value for GameVersion to be an explicit nil ### UnsetGameVersion + `func (o *Player) UnsetGameVersion()` UnsetGameVersion ensures that no value is present for GameVersion, not even an explicit nil + ### GetDeviceModel `func (o *Player) GetDeviceModel() string` @@ -390,12 +397,14 @@ HasDeviceModel returns a boolean if a field has been set. `func (o *Player) SetDeviceModelNil(b bool)` - SetDeviceModelNil sets the value for DeviceModel to be an explicit nil +SetDeviceModelNil sets the value for DeviceModel to be an explicit nil ### UnsetDeviceModel + `func (o *Player) UnsetDeviceModel()` UnsetDeviceModel ensures that no value is present for DeviceModel, not even an explicit nil + ### GetDeviceOs `func (o *Player) GetDeviceOs() string` @@ -425,12 +434,14 @@ HasDeviceOs returns a boolean if a field has been set. `func (o *Player) SetDeviceOsNil(b bool)` - SetDeviceOsNil sets the value for DeviceOs to be an explicit nil +SetDeviceOsNil sets the value for DeviceOs to be an explicit nil ### UnsetDeviceOs + `func (o *Player) UnsetDeviceOs()` UnsetDeviceOs ensures that no value is present for DeviceOs, not even an explicit nil + ### GetAdId `func (o *Player) GetAdId() string` @@ -460,12 +471,14 @@ HasAdId returns a boolean if a field has been set. `func (o *Player) SetAdIdNil(b bool)` - SetAdIdNil sets the value for AdId to be an explicit nil +SetAdIdNil sets the value for AdId to be an explicit nil ### UnsetAdId + `func (o *Player) UnsetAdId()` UnsetAdId ensures that no value is present for AdId, not even an explicit nil + ### GetSdk `func (o *Player) GetSdk() string` @@ -495,12 +508,14 @@ HasSdk returns a boolean if a field has been set. `func (o *Player) SetSdkNil(b bool)` - SetSdkNil sets the value for Sdk to be an explicit nil +SetSdkNil sets the value for Sdk to be an explicit nil ### UnsetSdk + `func (o *Player) UnsetSdk()` UnsetSdk ensures that no value is present for Sdk, not even an explicit nil + ### GetSessionCount `func (o *Player) GetSessionCount() int32` @@ -555,12 +570,14 @@ HasTags returns a boolean if a field has been set. `func (o *Player) SetTagsNil(b bool)` - SetTagsNil sets the value for Tags to be an explicit nil +SetTagsNil sets the value for Tags to be an explicit nil ### UnsetTags + `func (o *Player) UnsetTags()` UnsetTags ensures that no value is present for Tags, not even an explicit nil + ### GetAmountSpent `func (o *Player) GetAmountSpent() float32` @@ -740,12 +757,14 @@ HasTestType returns a boolean if a field has been set. `func (o *Player) SetTestTypeNil(b bool)` - SetTestTypeNil sets the value for TestType to be an explicit nil +SetTestTypeNil sets the value for TestType to be an explicit nil ### UnsetTestType + `func (o *Player) UnsetTestType()` UnsetTestType ensures that no value is present for TestType, not even an explicit nil + ### GetLong `func (o *Player) GetLong() float32` @@ -821,7 +840,4 @@ SetCountry sets Country field to given value. HasCountry returns a boolean if a field has been set. - [[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/model_player.go b/model_player.go index b32deb2..ea38c31 100644 --- a/model_player.go +++ b/model_player.go @@ -22,7 +22,7 @@ type Player struct { // If true, this is the equivalent of a user being Unsubscribed InvalidIdentifier *bool `json:"invalid_identifier,omitempty"` AppId *string `json:"app_id,omitempty"` - // 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 + // 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 DeviceType int32 `json:"device_type"` // a custom user ID ExternalUserId NullableString `json:"external_user_id,omitempty"` @@ -30,25 +30,25 @@ type Player struct { ExternalUserIdAuthHash *string `json:"external_user_id_auth_hash,omitempty"` // Email - Only required if you have enabled Identity Verification and device_type is email (11). EmailAuthHash *string `json:"email_auth_hash,omitempty"` - // 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. + // 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. Identifier NullableString `json:"identifier,omitempty"` - // Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en + // Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en Language *string `json:"language,omitempty"` - // Number of seconds away from UTC. Example: -28800 + // Number of seconds away from UTC. Example: -28800 Timezone NullableInt32 `json:"timezone,omitempty"` - // Version of your app. Example: 1.1 + // Version of your app. Example: 1.1 GameVersion NullableString `json:"game_version,omitempty"` - // Device make and model. Example: iPhone5,1 + // Device make and model. Example: iPhone5,1 DeviceModel NullableString `json:"device_model,omitempty"` - // Device operating system version. Example: 7.0.4 + // Device operating system version. Example: 7.0.4 DeviceOs NullableString `json:"device_os,omitempty"` - // The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId + // The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId AdId NullableString `json:"ad_id,omitempty"` // Name and version of the sdk/plugin that's calling this API method (if any) Sdk NullableString `json:"sdk,omitempty"` // Number of times the user has played the game, defaults to 1 SessionCount *int32 `json:"session_count,omitempty"` - // 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 + // 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 Tags map[string]interface{} `json:"tags,omitempty"` // Amount the user has spent in USD, up to two decimal places AmountSpent *float32 `json:"amount_spent,omitempty"` @@ -56,13 +56,13 @@ type Player struct { CreatedAt *int64 `json:"created_at,omitempty"` // Seconds player was running your app. Playtime *int64 `json:"playtime,omitempty"` - // 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. + // 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. BadgeCount *int32 `json:"badge_count,omitempty"` // Unixtime when the player was last active LastActive *int32 `json:"last_active,omitempty"` - // 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. + // 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. NotificationTypes *int32 `json:"notification_types,omitempty"` - // 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. + // 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. TestType NullableInt32 `json:"test_type,omitempty"` // Longitude of the device, used for geotagging to segment on. Long *float32 `json:"long,omitempty"` @@ -79,7 +79,7 @@ type _Player Player // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewPlayer(deviceType int32) *Player { +func NewPlayer(id string, deviceType int32, appId *string) *Player { this := Player{} this.DeviceType = deviceType return &this @@ -1209,5 +1209,3 @@ func (v *NullablePlayer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } - - From ce1452709b0f82420ab0c258aec0114321d9a888 Mon Sep 17 00:00:00 2001 From: mochizuki-pg Date: Sun, 12 Feb 2023 18:00:20 +0900 Subject: [PATCH 2/4] fix: Automatically formatted portions are not included in the diff --- docs/DefaultApi.md | 482 ++++++++++++++++++++++++++++----------------- 1 file changed, 305 insertions(+), 177 deletions(-) diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md index 3c1f33d..40aef88 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -2,30 +2,32 @@ All URIs are relative to *https://onesignal.com/api/v1* -| 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 | -| [**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 | -| [**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 | -| [**EndLiveActivity**](DefaultApi.md#EndLiveActivity) | **Delete** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity | -| [**ExportPlayers**](DefaultApi.md#ExportPlayers) | **Post** /players/csv_export?app_id={app_id} | CSV export | -| [**GetApp**](DefaultApi.md#GetApp) | **Get** /apps/{app_id} | View an app | -| [**GetApps**](DefaultApi.md#GetApps) | **Get** /apps | View apps | -| [**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 | -| [**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 | +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 +[**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 +[**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 +[**EndLiveActivity**](DefaultApi.md#EndLiveActivity) | **Delete** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity +[**ExportPlayers**](DefaultApi.md#ExportPlayers) | **Post** /players/csv_export?app_id={app_id} | CSV export +[**GetApp**](DefaultApi.md#GetApp) | **Get** /apps/{app_id} | View an app +[**GetApps**](DefaultApi.md#GetApps) | **Get** /apps | View apps +[**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 +[**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 + + ## BeginLiveActivity @@ -33,6 +35,8 @@ All URIs are relative to *https://onesignal.com/api/v1* Start Live Activity + + ### Authorization [app_key](../README.md#app_key) @@ -53,7 +57,7 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. activityId := "activityId_example" // string | Live Activity record ID - beginLiveActivityRequest := *onesignal.NewBeginLiveActivityRequest("PushToken_example", "SubscriptionId_example") // BeginLiveActivityRequest | + beginLiveActivityRequest := *onesignal.NewBeginLiveActivityRequest("PushToken_example", "SubscriptionId_example") // BeginLiveActivityRequest | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -71,24 +75,27 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| -------------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -| **activityId** | **string** | Live Activity record ID | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +**activityId** | **string** | Live Activity record ID | ### Other Parameters Other parameters are passed through a pointer to a apiBeginLiveActivityRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**beginLiveActivityRequest** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **beginLiveActivityRequest** | [**BeginLiveActivityRequest**](BeginLiveActivityRequest.md) | | ### Return type -(empty response body) + (empty response body) ### HTTP request headers @@ -99,12 +106,15 @@ Other parameters are passed through a pointer to a apiBeginLiveActivityRequest s [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## CancelNotification > CancelNotificationSuccessResponse CancelNotification(ctx, notificationId).AppId(appId).Execute() Stop a scheduled or currently outgoing notification + + ### Authorization [app_key](../README.md#app_key) @@ -123,8 +133,8 @@ import ( ) func main() { - appId := "appId_example" // string | - notificationId := "notificationId_example" // string | + appId := "appId_example" // string | + notificationId := "notificationId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -144,18 +154,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **notificationId** | **string** | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**notificationId** | **string** | | ### Other Parameters Other parameters are passed through a pointer to a apiCancelNotificationRequest struct via the builder pattern -| Name | Type | Description | Notes | -| --------- | ---------- | ----------- | ----- | -| **appId** | **string** | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string** | | + ### Return type @@ -170,12 +183,15 @@ Other parameters are passed through a pointer to a apiCancelNotificationRequest [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## CreateApp > App CreateApp(ctx).App(app).Execute() Create an app + + ### Authorization [user_key](../README.md#user_key) @@ -194,7 +210,7 @@ import ( ) func main() { - app := *onesignal.NewApp() // App | + app := *onesignal.NewApp() // App | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -214,13 +230,16 @@ func main() { ### Path Parameters + + ### Other Parameters Other parameters are passed through a pointer to a apiCreateAppRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ------- | ----------------- | ----------- | ----- | -| **app** | [**App**](App.md) | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **app** | [**App**](App.md) | | ### Return type @@ -235,12 +254,15 @@ Other parameters are passed through a pointer to a apiCreateAppRequest struct vi [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## CreateNotification > CreateNotificationSuccessResponse CreateNotification(ctx).Notification(notification).Execute() Create notification + + ### Authorization [app_key](../README.md#app_key) @@ -259,7 +281,7 @@ import ( ) func main() { - notification := *onesignal.NewNotification("AppId_example") // Notification | + notification := *onesignal.NewNotification("AppId_example") // Notification | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -279,13 +301,16 @@ func main() { ### Path Parameters + + ### Other Parameters Other parameters are passed through a pointer to a apiCreateNotificationRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---------------- | ----------------------------------- | ----------- | ----- | -| **notification** | [**Notification**](Notification.md) | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **notification** | [**Notification**](Notification.md) | | ### Return type @@ -300,12 +325,15 @@ Other parameters are passed through a pointer to a apiCreateNotificationRequest [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## CreatePlayer > CreatePlayerSuccessResponse CreatePlayer(ctx).Player(player).Execute() Add a device + + ### Authorization [app_key](../README.md#app_key) @@ -345,13 +373,16 @@ func main() { ### Path Parameters + + ### Other Parameters Other parameters are passed through a pointer to a apiCreatePlayerRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---------- | ----------------------- | ----------- | ----- | -| **player** | [**Player**](Player.md) | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **player** | [**Player**](Player.md) | | ### Return type @@ -366,12 +397,15 @@ Other parameters are passed through a pointer to a apiCreatePlayerRequest struct [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## CreateSegments > CreateSegmentSuccessResponse CreateSegments(ctx, appId).Segment(segment).Execute() Create Segments + + ### Authorization [app_key](../README.md#app_key) @@ -411,19 +445,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | ### Other Parameters Other parameters are passed through a pointer to a apiCreateSegmentsRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**segment** | [**Segment**](Segment.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **segment** | [**Segment**](Segment.md) | | ### Return type @@ -438,12 +474,15 @@ Other parameters are passed through a pointer to a apiCreateSegmentsRequest stru [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## DeletePlayer > DeletePlayerSuccessResponse DeletePlayer(ctx, playerId).AppId(appId).Execute() Delete a user record + + ### Authorization [app_key](../README.md#app_key) @@ -483,18 +522,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **playerId** | **string** | The OneSignal player_id | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**playerId** | **string** | The OneSignal player_id | ### Other Parameters Other parameters are passed through a pointer to a apiDeletePlayerRequest struct via the builder pattern -| Name | Type | Description | Notes | -| --------- | ---------- | --------------------------------------------------------------- | ----- | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | + ### Return type @@ -509,12 +551,15 @@ Other parameters are passed through a pointer to a apiDeletePlayerRequest struct [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## DeleteSegments > DeleteSegmentSuccessResponse DeleteSegments(ctx, appId, segmentId).Execute() Delete Segments + + ### Authorization [app_key](../README.md#app_key) @@ -554,18 +599,22 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------- | ------------------- | --------------------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -| **segmentId** | **string** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +**segmentId** | **string** | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | ### Other Parameters Other parameters are passed through a pointer to a apiDeleteSegmentsRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + ### Return type @@ -580,12 +629,15 @@ Other parameters are passed through a pointer to a apiDeleteSegmentsRequest stru [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## EndLiveActivity > EndLiveActivity(ctx, appId, activityId, subscriptionId).Execute() Stop Live Activity + + ### Authorization [app_key](../README.md#app_key) @@ -624,23 +676,28 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -| **activityId** | **string** | Live Activity record ID | -| **subscriptionId** | **string** | Subscription ID | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +**activityId** | **string** | Live Activity record ID | +**subscriptionId** | **string** | Subscription ID | ### Other Parameters Other parameters are passed through a pointer to a apiEndLiveActivityRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + ### Return type -(empty response body) + (empty response body) ### HTTP request headers @@ -651,12 +708,15 @@ Other parameters are passed through a pointer to a apiEndLiveActivityRequest str [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## ExportPlayers > ExportPlayersSuccessResponse ExportPlayers(ctx, appId).ExportPlayersRequestBody(exportPlayersRequestBody).Execute() CSV export + + ### Authorization [app_key](../README.md#app_key) @@ -696,19 +756,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The app ID that you want to export devices from | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The app ID that you want to export devices from | ### Other Parameters Other parameters are passed through a pointer to a apiExportPlayersRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **exportPlayersRequestBody** | [**ExportPlayersRequestBody**](ExportPlayersRequestBody.md) | | ### Return type @@ -723,12 +785,15 @@ Other parameters are passed through a pointer to a apiExportPlayersRequest struc [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetApp > App GetApp(ctx, appId).Execute() View an app + + ### Authorization [user_key](../README.md#user_key) @@ -767,17 +832,20 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | An app id | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | An app id | ### Other Parameters Other parameters are passed through a pointer to a apiGetAppRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + ### Return type @@ -792,12 +860,15 @@ Other parameters are passed through a pointer to a apiGetAppRequest struct via t [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetApps > []App GetApps(ctx).Execute() View apps + + ### Authorization [user_key](../README.md#user_key) @@ -841,6 +912,7 @@ This endpoint does not need any parameter. Other parameters are passed through a pointer to a apiGetAppsRequest struct via the builder pattern + ### Return type [**[]App**](App.md) @@ -854,12 +926,15 @@ Other parameters are passed through a pointer to a apiGetAppsRequest struct via [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetNotification > NotificationWithMeta GetNotification(ctx, notificationId).AppId(appId).Execute() View notification + + ### Authorization [app_key](../README.md#app_key) @@ -878,8 +953,8 @@ import ( ) func main() { - appId := "appId_example" // string | - notificationId := "notificationId_example" // string | + appId := "appId_example" // string | + notificationId := "notificationId_example" // string | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -899,18 +974,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **notificationId** | **string** | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**notificationId** | **string** | | ### Other Parameters Other parameters are passed through a pointer to a apiGetNotificationRequest struct via the builder pattern -| Name | Type | Description | Notes | -| --------- | ---------- | ----------- | ----- | -| **appId** | **string** | | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string** | | + ### Return type @@ -925,12 +1003,15 @@ Other parameters are passed through a pointer to a apiGetNotificationRequest str [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetNotificationHistory > NotificationHistorySuccessResponse GetNotificationHistory(ctx, notificationId).GetNotificationRequestBody(getNotificationRequestBody).Execute() Notification History + + ### Authorization [app_key](../README.md#app_key) @@ -950,7 +1031,7 @@ import ( func main() { notificationId := "notificationId_example" // string | The \"id\" of the message found in the Notification object - getNotificationRequestBody := *onesignal.NewGetNotificationRequestBody() // GetNotificationRequestBody | + getNotificationRequestBody := *onesignal.NewGetNotificationRequestBody() // GetNotificationRequestBody | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -970,19 +1051,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **notificationId** | **string** | The \"id\" of the message found in the Notification object | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**notificationId** | **string** | The \"id\" of the message found in the Notification object | ### Other Parameters Other parameters are passed through a pointer to a apiGetNotificationHistoryRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **getNotificationRequestBody** | [**GetNotificationRequestBody**](GetNotificationRequestBody.md) | | ### Return type @@ -997,12 +1080,15 @@ Other parameters are passed through a pointer to a apiGetNotificationHistoryRequ [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetNotifications > NotificationSlice GetNotifications(ctx).AppId(appId).Limit(limit).Offset(offset).Kind(kind).Execute() View notifications + + ### Authorization [app_key](../README.md#app_key) @@ -1044,16 +1130,19 @@ func main() { ### Path Parameters + + ### Other Parameters Other parameters are passed through a pointer to a apiGetNotificationsRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **appId** | **string** | The app ID that you want to view notifications from | -| **limit** | **int32** | How many notifications to return. Max is 50. Default is 50. | -| **offset** | **int32** | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | -| **kind** | **int32** | Kind of notifications returned: _ unset - All notification types (default) _ `0` - Dashboard only _ `1` - API only _ `3` - Automated only | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string** | The app ID that you want to view notifications from | + **limit** | **int32** | How many notifications to return. Max is 50. Default is 50. | + **offset** | **int32** | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | + **kind** | **int32** | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only | ### Return type @@ -1068,12 +1157,15 @@ Other parameters are passed through a pointer to a apiGetNotificationsRequest st [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetOutcomes > OutcomesData GetOutcomes(ctx, appId).OutcomeNames(outcomeNames).OutcomeNames2(outcomeNames2).OutcomeTimeRange(outcomeTimeRange).OutcomePlatforms(outcomePlatforms).OutcomeAttribution(outcomeAttribution).Execute() View Outcomes + + ### Authorization [app_key](../README.md#app_key) @@ -1093,7 +1185,7 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. - outcomeNames := "outcomeNames_example" // string | 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 + outcomeNames := "outcomeNames_example" // string | 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 outcomeNames2 := "outcomeNames_example" // string | 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) outcomeTimeRange := "outcomeTimeRange_example" // string | 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) outcomePlatforms := "outcomePlatforms_example" // string | 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) @@ -1117,23 +1209,25 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | ### Other Parameters Other parameters are passed through a pointer to a apiGetOutcomesRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**outcomeNames** | **string** | 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 | -**outcomeNames2** | **string** | 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. | -**outcomeTimeRange** | **string** | 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. | -**outcomePlatforms** | **string** | 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. | -**outcomeAttribution** | **string** | 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. | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **outcomeNames** | **string** | 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 | + **outcomeNames2** | **string** | 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. | + **outcomeTimeRange** | **string** | 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. | + **outcomePlatforms** | **string** | 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. | + **outcomeAttribution** | **string** | 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. | ### Return type @@ -1148,12 +1242,15 @@ Other parameters are passed through a pointer to a apiGetOutcomesRequest struct [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetPlayer > Player GetPlayer(ctx, playerId).AppId(appId).EmailAuthHash(emailAuthHash).Execute() View device + + ### Authorization [app_key](../README.md#app_key) @@ -1194,20 +1291,22 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **playerId** | **string** | Player's OneSignal ID | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**playerId** | **string** | Player's OneSignal ID | ### Other Parameters Other parameters are passed through a pointer to a apiGetPlayerRequest struct via the builder pattern -| Name | Type | Description | Notes | -| --------- | ---------- | --------------------------- | ----- | -| **appId** | **string** | Your app_id for this device | -**emailAuthHash** | **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string** | Your app_id for this device | + + **emailAuthHash** | **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | ### Return type @@ -1222,12 +1321,15 @@ Other parameters are passed through a pointer to a apiGetPlayerRequest struct vi [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## GetPlayers > PlayerSlice GetPlayers(ctx).AppId(appId).Limit(limit).Offset(offset).Execute() View devices + + ### Authorization [app_key](../README.md#app_key) @@ -1268,15 +1370,18 @@ func main() { ### Path Parameters + + ### Other Parameters Other parameters are passed through a pointer to a apiGetPlayersRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---------- | ---------- | ------------------------------------------------------ | ----- | -| **appId** | **string** | The app ID that you want to view players from | -| **limit** | **int32** | How many devices to return. Max is 300. Default is 300 | -| **offset** | **int32** | Result offset. Default is 0. Results are sorted by id; | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **appId** | **string** | The app ID that you want to view players from | + **limit** | **int32** | How many devices to return. Max is 300. Default is 300 | + **offset** | **int32** | Result offset. Default is 0. Results are sorted by id; | ### Return type @@ -1291,12 +1396,15 @@ Other parameters are passed through a pointer to a apiGetPlayersRequest struct v [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## UpdateApp > App UpdateApp(ctx, appId).App(app).Execute() Update an app + + ### Authorization [user_key](../README.md#user_key) @@ -1316,7 +1424,7 @@ import ( func main() { appId := "appId_example" // string | An app id - app := *onesignal.NewApp() // App | + app := *onesignal.NewApp() // App | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -1336,19 +1444,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| --------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | An app id | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | An app id | ### Other Parameters Other parameters are passed through a pointer to a apiUpdateAppRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**app** | [**App**](App.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **app** | [**App**](App.md) | | ### Return type @@ -1363,12 +1473,15 @@ Other parameters are passed through a pointer to a apiUpdateAppRequest struct vi [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## UpdateLiveActivity > UpdateLiveActivitySuccessResponse UpdateLiveActivity(ctx, appId, activityId).UpdateLiveActivityRequest(updateLiveActivityRequest).Execute() Update a Live Activity via Push + + ### Authorization [app_key](../README.md#app_key) @@ -1389,7 +1502,7 @@ import ( func main() { appId := "appId_example" // string | The OneSignal App ID for your app. Available in Keys & IDs. activityId := "activityId_example" // string | Live Activity record ID - updateLiveActivityRequest := *onesignal.NewUpdateLiveActivityRequest("Name_example", "Event_example", map[string]interface{}(123)) // UpdateLiveActivityRequest | + updateLiveActivityRequest := *onesignal.NewUpdateLiveActivityRequest("Name_example", "Event_example", map[string]interface{}(123)) // UpdateLiveActivityRequest | configuration := onesignal.NewConfiguration() apiClient := onesignal.NewAPIClient(configuration) @@ -1409,20 +1522,23 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| -------------- | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | -| **activityId** | **string** | Live Activity record ID | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**appId** | **string** | The OneSignal App ID for your app. Available in Keys & IDs. | +**activityId** | **string** | Live Activity record ID | ### Other Parameters Other parameters are passed through a pointer to a apiUpdateLiveActivityRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**updateLiveActivityRequest** | [**UpdateLiveActivityRequest**](UpdateLiveActivityRequest.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updateLiveActivityRequest** | [**UpdateLiveActivityRequest**](UpdateLiveActivityRequest.md) | | ### Return type @@ -1437,12 +1553,15 @@ Other parameters are passed through a pointer to a apiUpdateLiveActivityRequest [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## UpdatePlayer > UpdatePlayerSuccessResponse UpdatePlayer(ctx, playerId).Player(player).Execute() Edit device + + ### Authorization [app_key](../README.md#app_key) @@ -1483,19 +1602,21 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------ | ------------------- | --------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **playerId** | **string** | Player's OneSignal ID | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**playerId** | **string** | Player's OneSignal ID | ### Other Parameters Other parameters are passed through a pointer to a apiUpdatePlayerRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**player** | [**Player**](Player.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **player** | [**Player**](Player.md) | | ### Return type @@ -1510,12 +1631,15 @@ Other parameters are passed through a pointer to a apiUpdatePlayerRequest struct [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + ## UpdatePlayerTags > UpdatePlayerTagsSuccessResponse UpdatePlayerTags(ctx, appId, externalUserId).UpdatePlayerTagsRequestBody(updatePlayerTagsRequestBody).Execute() Edit tags with external user id + + ### Authorization [app_key](../README.md#app_key) @@ -1556,20 +1680,23 @@ func main() { ### Path Parameters -| Name | Type | Description | Notes | -| ------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------------- | ----- | -| **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. | -| **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. | + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**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. | ### Other Parameters Other parameters are passed through a pointer to a apiUpdatePlayerTagsRequest struct via the builder pattern -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -**updatePlayerTagsRequestBody** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md) | | +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **updatePlayerTagsRequestBody** | [**UpdatePlayerTagsRequestBody**](UpdatePlayerTagsRequestBody.md) | | ### Return type @@ -1583,3 +1710,4 @@ Other parameters are passed through a pointer to a apiUpdatePlayerTagsRequest st [[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) + From 6f4d5beb6701dd301a8f9fde01ebb7af705b1582 Mon Sep 17 00:00:00 2001 From: mochizuki-pg Date: Sun, 12 Feb 2023 18:11:21 +0900 Subject: [PATCH 3/4] fix: Automatically formatted portions are not included in the diff --- docs/Player.md | 102 ++++++++++++++++++++---------------------------- model_player.go | 26 ++++++------ 2 files changed, 57 insertions(+), 71 deletions(-) diff --git a/docs/Player.md b/docs/Player.md index 6d24456..ea3c37a 100644 --- a/docs/Player.md +++ b/docs/Player.md @@ -2,35 +2,35 @@ ## Properties -| Name | Type | Description | Notes | -| -------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | -| **Id** | Pointer to **string** | The device's OneSignal ID | [optional] [readonly] | -| **InvalidIdentifier** | Pointer to **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] | -| **AppId** | Pointer to **string** | | [optional] | -| **DeviceType** | **int32** | 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** | Pointer to **NullableString** | a custom user ID | [optional] | -| **ExternalUserIdAuthHash** | Pointer to **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] | -| **EmailAuthHash** | Pointer to **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] | -| **Identifier** | Pointer to **NullableString** | 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** | Pointer to **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** | Pointer to **NullableInt32** | Number of seconds away from UTC. Example: -28800 | [optional] | -| **GameVersion** | Pointer to **NullableString** | Version of your app. Example: 1.1 | [optional] | -| **DeviceModel** | Pointer to **NullableString** | Device make and model. Example: iPhone5,1 | [optional] | -| **DeviceOs** | Pointer to **NullableString** | Device operating system version. Example: 7.0.4 | [optional] | -| **AdId** | Pointer to **NullableString** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] | -| **Sdk** | Pointer to **NullableString** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] | -| **SessionCount** | Pointer to **int32** | Number of times the user has played the game, defaults to 1 | [optional] | -| **Tags** | Pointer to **map[string]interface{}** | 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** | Pointer to **float32** | Amount the user has spent in USD, up to two decimal places | [optional] | -| **CreatedAt** | Pointer to **int64** | Unixtime when the player joined the game | [optional] | -| **Playtime** | Pointer to **int64** | Seconds player was running your app. | [optional] | -| **BadgeCount** | Pointer to **int32** | 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** | Pointer to **int32** | Unixtime when the player was last active | [optional] | -| **NotificationTypes** | Pointer to **int32** | 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** | Pointer to **NullableInt32** | 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** | Pointer to **float32** | Longitude of the device, used for geotagging to segment on. | [optional] | -| **Lat** | Pointer to **float32** | Latitude of the device, used for geotagging to segment on. | [optional] | -| **Country** | Pointer to **string** | Country code in the ISO 3166-1 Alpha 2 format | [optional] | +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | The device's OneSignal ID | [optional] [readonly] +**InvalidIdentifier** | Pointer to **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] +**AppId** | Pointer to **string** | | [optional] +**DeviceType** | **int32** | 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** | Pointer to **NullableString** | a custom user ID | [optional] +**ExternalUserIdAuthHash** | Pointer to **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional] +**EmailAuthHash** | Pointer to **string** | Email - Only required if you have enabled Identity Verification and device_type is email (11). | [optional] +**Identifier** | Pointer to **NullableString** | 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** | Pointer to **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** | Pointer to **NullableInt32** | Number of seconds away from UTC. Example: -28800 | [optional] +**GameVersion** | Pointer to **NullableString** | Version of your app. Example: 1.1 | [optional] +**DeviceModel** | Pointer to **NullableString** | Device make and model. Example: iPhone5,1 | [optional] +**DeviceOs** | Pointer to **NullableString** | Device operating system version. Example: 7.0.4 | [optional] +**AdId** | Pointer to **NullableString** | The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId | [optional] +**Sdk** | Pointer to **NullableString** | Name and version of the sdk/plugin that's calling this API method (if any) | [optional] +**SessionCount** | Pointer to **int32** | Number of times the user has played the game, defaults to 1 | [optional] +**Tags** | Pointer to **map[string]interface{}** | 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** | Pointer to **float32** | Amount the user has spent in USD, up to two decimal places | [optional] +**CreatedAt** | Pointer to **int64** | Unixtime when the player joined the game | [optional] +**Playtime** | Pointer to **int64** | Seconds player was running your app. | [optional] +**BadgeCount** | Pointer to **int32** | 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** | Pointer to **int32** | Unixtime when the player was last active | [optional] +**NotificationTypes** | Pointer to **int32** | 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** | Pointer to **NullableInt32** | 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** | Pointer to **float32** | Longitude of the device, used for geotagging to segment on. | [optional] +**Lat** | Pointer to **float32** | Latitude of the device, used for geotagging to segment on. | [optional] +**Country** | Pointer to **string** | Country code in the ISO 3166-1 Alpha 2 format | [optional] ## Methods @@ -145,6 +145,7 @@ and a boolean to check if the value has been set. SetDeviceType sets DeviceType field to given value. + ### GetExternalUserId `func (o *Player) GetExternalUserId() string` @@ -174,14 +175,12 @@ HasExternalUserId returns a boolean if a field has been set. `func (o *Player) SetExternalUserIdNil(b bool)` -SetExternalUserIdNil sets the value for ExternalUserId to be an explicit nil + SetExternalUserIdNil sets the value for ExternalUserId to be an explicit nil ### UnsetExternalUserId - `func (o *Player) UnsetExternalUserId()` UnsetExternalUserId ensures that no value is present for ExternalUserId, not even an explicit nil - ### GetExternalUserIdAuthHash `func (o *Player) GetExternalUserIdAuthHash() string` @@ -261,14 +260,12 @@ HasIdentifier returns a boolean if a field has been set. `func (o *Player) SetIdentifierNil(b bool)` -SetIdentifierNil sets the value for Identifier to be an explicit nil + SetIdentifierNil sets the value for Identifier to be an explicit nil ### UnsetIdentifier - `func (o *Player) UnsetIdentifier()` UnsetIdentifier ensures that no value is present for Identifier, not even an explicit nil - ### GetLanguage `func (o *Player) GetLanguage() string` @@ -323,14 +320,12 @@ HasTimezone returns a boolean if a field has been set. `func (o *Player) SetTimezoneNil(b bool)` -SetTimezoneNil sets the value for Timezone to be an explicit nil + SetTimezoneNil sets the value for Timezone to be an explicit nil ### UnsetTimezone - `func (o *Player) UnsetTimezone()` UnsetTimezone ensures that no value is present for Timezone, not even an explicit nil - ### GetGameVersion `func (o *Player) GetGameVersion() string` @@ -360,14 +355,12 @@ HasGameVersion returns a boolean if a field has been set. `func (o *Player) SetGameVersionNil(b bool)` -SetGameVersionNil sets the value for GameVersion to be an explicit nil + SetGameVersionNil sets the value for GameVersion to be an explicit nil ### UnsetGameVersion - `func (o *Player) UnsetGameVersion()` UnsetGameVersion ensures that no value is present for GameVersion, not even an explicit nil - ### GetDeviceModel `func (o *Player) GetDeviceModel() string` @@ -397,14 +390,12 @@ HasDeviceModel returns a boolean if a field has been set. `func (o *Player) SetDeviceModelNil(b bool)` -SetDeviceModelNil sets the value for DeviceModel to be an explicit nil + SetDeviceModelNil sets the value for DeviceModel to be an explicit nil ### UnsetDeviceModel - `func (o *Player) UnsetDeviceModel()` UnsetDeviceModel ensures that no value is present for DeviceModel, not even an explicit nil - ### GetDeviceOs `func (o *Player) GetDeviceOs() string` @@ -434,14 +425,12 @@ HasDeviceOs returns a boolean if a field has been set. `func (o *Player) SetDeviceOsNil(b bool)` -SetDeviceOsNil sets the value for DeviceOs to be an explicit nil + SetDeviceOsNil sets the value for DeviceOs to be an explicit nil ### UnsetDeviceOs - `func (o *Player) UnsetDeviceOs()` UnsetDeviceOs ensures that no value is present for DeviceOs, not even an explicit nil - ### GetAdId `func (o *Player) GetAdId() string` @@ -471,14 +460,12 @@ HasAdId returns a boolean if a field has been set. `func (o *Player) SetAdIdNil(b bool)` -SetAdIdNil sets the value for AdId to be an explicit nil + SetAdIdNil sets the value for AdId to be an explicit nil ### UnsetAdId - `func (o *Player) UnsetAdId()` UnsetAdId ensures that no value is present for AdId, not even an explicit nil - ### GetSdk `func (o *Player) GetSdk() string` @@ -508,14 +495,12 @@ HasSdk returns a boolean if a field has been set. `func (o *Player) SetSdkNil(b bool)` -SetSdkNil sets the value for Sdk to be an explicit nil + SetSdkNil sets the value for Sdk to be an explicit nil ### UnsetSdk - `func (o *Player) UnsetSdk()` UnsetSdk ensures that no value is present for Sdk, not even an explicit nil - ### GetSessionCount `func (o *Player) GetSessionCount() int32` @@ -570,14 +555,12 @@ HasTags returns a boolean if a field has been set. `func (o *Player) SetTagsNil(b bool)` -SetTagsNil sets the value for Tags to be an explicit nil + SetTagsNil sets the value for Tags to be an explicit nil ### UnsetTags - `func (o *Player) UnsetTags()` UnsetTags ensures that no value is present for Tags, not even an explicit nil - ### GetAmountSpent `func (o *Player) GetAmountSpent() float32` @@ -757,14 +740,12 @@ HasTestType returns a boolean if a field has been set. `func (o *Player) SetTestTypeNil(b bool)` -SetTestTypeNil sets the value for TestType to be an explicit nil + SetTestTypeNil sets the value for TestType to be an explicit nil ### UnsetTestType - `func (o *Player) UnsetTestType()` UnsetTestType ensures that no value is present for TestType, not even an explicit nil - ### GetLong `func (o *Player) GetLong() float32` @@ -840,4 +821,7 @@ SetCountry sets Country field to given value. HasCountry returns a boolean if a field has been set. + [[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/model_player.go b/model_player.go index ea38c31..7fcb4b7 100644 --- a/model_player.go +++ b/model_player.go @@ -22,7 +22,7 @@ type Player struct { // If true, this is the equivalent of a user being Unsubscribed InvalidIdentifier *bool `json:"invalid_identifier,omitempty"` AppId *string `json:"app_id,omitempty"` - // 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 + // 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 DeviceType int32 `json:"device_type"` // a custom user ID ExternalUserId NullableString `json:"external_user_id,omitempty"` @@ -30,25 +30,25 @@ type Player struct { ExternalUserIdAuthHash *string `json:"external_user_id_auth_hash,omitempty"` // Email - Only required if you have enabled Identity Verification and device_type is email (11). EmailAuthHash *string `json:"email_auth_hash,omitempty"` - // 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. + // 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. Identifier NullableString `json:"identifier,omitempty"` - // Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en + // Language code. Typically lower case two letters, except for Chinese where it must be one of zh-Hans or zh-Hant. Example: en Language *string `json:"language,omitempty"` - // Number of seconds away from UTC. Example: -28800 + // Number of seconds away from UTC. Example: -28800 Timezone NullableInt32 `json:"timezone,omitempty"` - // Version of your app. Example: 1.1 + // Version of your app. Example: 1.1 GameVersion NullableString `json:"game_version,omitempty"` - // Device make and model. Example: iPhone5,1 + // Device make and model. Example: iPhone5,1 DeviceModel NullableString `json:"device_model,omitempty"` - // Device operating system version. Example: 7.0.4 + // Device operating system version. Example: 7.0.4 DeviceOs NullableString `json:"device_os,omitempty"` - // The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId + // The ad id for the device's platform: Android = Advertising Id iOS = identifierForVendor WP8.0 = DeviceUniqueId WP8.1 = AdvertisingId AdId NullableString `json:"ad_id,omitempty"` // Name and version of the sdk/plugin that's calling this API method (if any) Sdk NullableString `json:"sdk,omitempty"` // Number of times the user has played the game, defaults to 1 SessionCount *int32 `json:"session_count,omitempty"` - // 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 + // 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 Tags map[string]interface{} `json:"tags,omitempty"` // Amount the user has spent in USD, up to two decimal places AmountSpent *float32 `json:"amount_spent,omitempty"` @@ -56,13 +56,13 @@ type Player struct { CreatedAt *int64 `json:"created_at,omitempty"` // Seconds player was running your app. Playtime *int64 `json:"playtime,omitempty"` - // 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. + // 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. BadgeCount *int32 `json:"badge_count,omitempty"` // Unixtime when the player was last active LastActive *int32 `json:"last_active,omitempty"` - // 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. + // 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. NotificationTypes *int32 `json:"notification_types,omitempty"` - // 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. + // 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. TestType NullableInt32 `json:"test_type,omitempty"` // Longitude of the device, used for geotagging to segment on. Long *float32 `json:"long,omitempty"` @@ -1209,3 +1209,5 @@ func (v *NullablePlayer) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } + + From 92793c0d24ea5a82305bcfa1753e3654533b78bb Mon Sep 17 00:00:00 2001 From: mochizuki-pg Date: Sun, 12 Feb 2023 18:33:02 +0900 Subject: [PATCH 4/4] fix: Player properties --- docs/Player.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Player.md b/docs/Player.md index ea3c37a..7ec05a9 100644 --- a/docs/Player.md +++ b/docs/Player.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | Pointer to **string** | The device's OneSignal ID | [optional] [readonly] +**Id** | Pointer to **string** | The device's OneSignal ID | [readonly] **InvalidIdentifier** | Pointer to **bool** | If true, this is the equivalent of a user being Unsubscribed | [optional] [readonly] -**AppId** | Pointer to **string** | | [optional] +**AppId** | Pointer to **string** | | **DeviceType** | **int32** | 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** | Pointer to **NullableString** | a custom user ID | [optional] **ExternalUserIdAuthHash** | Pointer to **string** | Only required if you have enabled Identity Verification and device_type is NOT 11 email. | [optional]