v1.0.0 beta 10
This commit is contained in:
@@ -261,20 +261,20 @@ type Gifts struct {
|
||||
Gifts []Gift `json:"gifts"`
|
||||
}
|
||||
|
||||
type OwnedGiftType string
|
||||
|
||||
const (
|
||||
OwnedGiftRegularType OwnedGiftType = "regular"
|
||||
OwnedGiftUniqueType OwnedGiftType = "unique"
|
||||
)
|
||||
|
||||
type OwnedGiftType string
|
||||
type BaseOwnedGift struct {
|
||||
type OwnedGift struct {
|
||||
Type OwnedGiftType `json:"type"`
|
||||
OwnerGiftID *string `json:"owner_gift_id,omitempty"`
|
||||
SendDate *int `json:"send_date,omitempty"`
|
||||
IsSaved *bool `json:"is_saved,omitempty"`
|
||||
}
|
||||
type OwnedGiftRegular struct {
|
||||
BaseOwnedGift
|
||||
|
||||
// Поля, характерные для "regular"
|
||||
Gift Gift `json:"gift"`
|
||||
SenderUser User `json:"sender_user,omitempty"`
|
||||
Text string `json:"text,omitempty"`
|
||||
@@ -286,18 +286,15 @@ type OwnedGiftRegular struct {
|
||||
PrepaidUpgradeStarCount *int `json:"prepaid_upgrade_star_count,omitempty"`
|
||||
IsUpgradeSeparate *bool `json:"is_upgrade_separate,omitempty"`
|
||||
UniqueGiftNumber *int `json:"unique_gift_number,omitempty"`
|
||||
}
|
||||
type OwnedGiftUnique struct {
|
||||
BaseOwnedGift
|
||||
|
||||
// Поля, характерные для "unique"
|
||||
CanBeTransferred *bool `json:"can_be_transferred,omitempty"`
|
||||
TransferStarCount *int `json:"transfer_star_count,omitempty"`
|
||||
NextTransferDate *int `json:"next_transfer_date,omitempty"`
|
||||
}
|
||||
|
||||
type OwnedGifts struct {
|
||||
TotalCount int `json:"total_count"`
|
||||
Gifts []struct {
|
||||
OwnedGiftRegular
|
||||
OwnedGiftUnique
|
||||
} `json:"gifts"`
|
||||
NextOffset string `json:"next_offset"`
|
||||
TotalCount int `json:"total_count"`
|
||||
Gifts []OwnedGift `json:"gifts"`
|
||||
NextOffset string `json:"next_offset"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user