WIP v0.5.0
This commit is contained in:
@@ -146,4 +146,20 @@ func (api *Api) TransferBusinessAccountStart(p TransferBusinessAccountStartP) (b
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetBusinessAccountGiftsP struct {
|
type GetBusinessAccountGiftsP struct {
|
||||||
|
BusinessConnectionID string `json:"business_connection_id"`
|
||||||
|
ExcludeUnsaved bool `json:"exclude_unsaved,omitempty"`
|
||||||
|
ExcludeSaved bool `json:"exclude_saved,omitempty"`
|
||||||
|
ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
|
||||||
|
ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
|
||||||
|
ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
|
||||||
|
ExcludeUnique bool `json:"exclude_unique,omitempty"`
|
||||||
|
ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
|
||||||
|
SortByPrice bool `json:"sort_by_price,omitempty"`
|
||||||
|
Offset string `json:"offset,omitempty"`
|
||||||
|
Limit int `json:"limit,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (api *Api) GetBusinessAccountGifts(p GetBusinessAccountGiftsP) (OwnedGifts, error) {
|
||||||
|
req := NewRequest[OwnedGifts]("getBusinessAccountGifts", p)
|
||||||
|
return req.Do(api)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,4 +110,35 @@ type Gifts struct {
|
|||||||
type OwnedGiftType string
|
type OwnedGiftType string
|
||||||
type BaseOwnedGift struct {
|
type BaseOwnedGift struct {
|
||||||
Type OwnedGiftType `json:"type"`
|
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
|
||||||
|
Gift Gift `json:"gift"`
|
||||||
|
SenderUser User `json:"sender_user,omitempty"`
|
||||||
|
Text string `json:"text,omitempty"`
|
||||||
|
Entities []MessageEntity `json:"entities,omitempty"`
|
||||||
|
IsPrivate *bool `json:"is_private,omitempty"`
|
||||||
|
CanBeUpgraded *bool `json:"can_be_upgraded,omitempty"`
|
||||||
|
WasRefunded *bool `json:"was_refunded,omitempty"`
|
||||||
|
ConvertStarCount *int `json:"convert_star_count,omitempty"`
|
||||||
|
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
|
||||||
|
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"`
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user