Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playstore): add pointer in DeveloperNotification #268

Merged
merged 5 commits into from
Mar 19, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions playstore/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
// DeveloperNotification is sent by a Pub/Sub topic.
// Detailed description is following.
// https://developer.android.com/google/play/billing/rtdn-reference#json_specification
// Deprecated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated comments should be Deprecated: .
For example, Depreacated: use DeveloperNotificationV2 intead.
It would be kind to do it this way ☺️
https://go.dev/wiki/Deprecated

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member

@takecy takecy Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depreacated: use DeveloperNotificationV2 intead.
A colon + space is required after the Deprecated character.
And please write on one line 🙏

In this format, the editors will issue a warning.

type DeveloperNotification struct {
Version string `json:"version"`
PackageName string `json:"packageName"`
Expand All @@ -48,6 +49,19 @@ type DeveloperNotification struct {
TestNotification TestNotification `json:"testNotification,omitempty"`
}

// DeveloperNotificationNew is sent by a Pub/Sub topic.
// Detailed description is following.
// https://developer.android.com/google/play/billing/rtdn-reference#json_specification
type DeveloperNotificationNew struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be DeveloperNotificationV2 as New may cause confusion at a later date? 🙏

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be DeveloperNotificationV2 as New may cause confusion at a later date? 🙏

ok

Version string `json:"version"`
PackageName string `json:"packageName"`
EventTimeMillis string `json:"eventTimeMillis"`
SubscriptionNotification *SubscriptionNotification `json:"subscriptionNotification,omitempty"`
OneTimeProductNotification *OneTimeProductNotification `json:"oneTimeProductNotification,omitempty"`
VoidedPurchaseNotification *VoidedPurchaseNotification `json:"voidedPurchaseNotification,omitempty"`
TestNotification *TestNotification `json:"testNotification,omitempty"`
}

// SubscriptionNotification has subscription status as notificationType, token and subscription id
// to confirm status by calling Google Android Publisher API.
type SubscriptionNotification struct {
Expand Down