WIP v0.5.0
This commit is contained in:
@@ -5,8 +5,8 @@ type VerifyUserP struct {
|
||||
CustomDescription string `json:"custom_description,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) VerifyUser(p VerifyUserP) (bool, error) {
|
||||
req := NewRequest[bool]("verifyUser", p)
|
||||
func (api *Api) VerifyUser(params VerifyUserP) (bool, error) {
|
||||
req := NewRequest[bool]("verifyUser", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ type VerifyChatP struct {
|
||||
CustomDescription string `json:"custom_description,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) VerifyChat(p VerifyChatP) (bool, error) {
|
||||
req := NewRequest[bool]("verifyChat", p)
|
||||
func (api *Api) VerifyChat(params VerifyChatP) (bool, error) {
|
||||
req := NewRequest[bool]("verifyChat", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ type RemoveUserVerificationP struct {
|
||||
UserID int `json:"user_id"`
|
||||
}
|
||||
|
||||
func (api *Api) RemoveUserVerification(p RemoveUserVerificationP) (bool, error) {
|
||||
req := NewRequest[bool]("removeUserVerification", p)
|
||||
func (api *Api) RemoveUserVerification(params RemoveUserVerificationP) (bool, error) {
|
||||
req := NewRequest[bool]("removeUserVerification", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ type RemoveChatVerificationP struct {
|
||||
ChatID int `json:"chat_id"`
|
||||
}
|
||||
|
||||
func (api *Api) RemoveChatVerification(p RemoveChatVerificationP) (bool, error) {
|
||||
req := NewRequest[bool]("removeChatVerification", p)
|
||||
func (api *Api) RemoveChatVerification(params RemoveChatVerificationP) (bool, error) {
|
||||
req := NewRequest[bool]("removeChatVerification", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ type ReadBusinessMessageP struct {
|
||||
MessageID int `json:"message_id"`
|
||||
}
|
||||
|
||||
func (api *Api) ReadBusinessMessage(p ReadBusinessMessageP) (bool, error) {
|
||||
req := NewRequest[bool]("readBusinessMessage", p)
|
||||
func (api *Api) ReadBusinessMessage(params ReadBusinessMessageP) (bool, error) {
|
||||
req := NewRequest[bool]("readBusinessMessage", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -54,8 +54,8 @@ type DeleteBusinessMessageP struct {
|
||||
MessageIDs []int `json:"message_ids"`
|
||||
}
|
||||
|
||||
func (api *Api) DeleteBusinessMessage(p DeleteBusinessMessageP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteBusinessMessage", p)
|
||||
func (api *Api) DeleteBusinessMessage(params DeleteBusinessMessageP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteBusinessMessage", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ type SetBusinessAccountNameP struct {
|
||||
LastName string `json:"last_name,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SetBusinessAccountName(p SetBusinessAccountNameP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountName", p)
|
||||
func (api *Api) SetBusinessAccountName(params SetBusinessAccountNameP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountName", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ type SetBusinessAccountUsernameP struct {
|
||||
Username string `json:"username,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SetBusinessAccountUsername(p SetBusinessAccountUsernameP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountUsername", p)
|
||||
func (api *Api) SetBusinessAccountUsername(params SetBusinessAccountUsernameP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountUsername", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ type SetBusinessAccountBioP struct {
|
||||
Bio string `json:"bio,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SetBusinessAccountBio(p SetBusinessAccountBioP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountBio", p)
|
||||
func (api *Api) SetBusinessAccountBio(params SetBusinessAccountBioP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountBio", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ type SetBusinessAccountProfilePhoto struct {
|
||||
IsPublic bool `json:"is_public,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SetBusinessAccountProfilePhoto(p SetBusinessAccountProfilePhoto) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountProfilePhoto", p)
|
||||
func (api *Api) SetBusinessAccountProfilePhoto(params SetBusinessAccountProfilePhoto) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountProfilePhoto", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -106,8 +106,8 @@ type RemoveBusinessAccountProfilePhotoP struct {
|
||||
IsPublic bool `json:"is_public,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) RemoveBusinessAccountProfilePhoto(p RemoveBusinessAccountProfilePhotoP) (bool, error) {
|
||||
req := NewRequest[bool]("removeBusinessAccountProfilePhoto", p)
|
||||
func (api *Api) RemoveBusinessAccountProfilePhoto(params RemoveBusinessAccountProfilePhotoP) (bool, error) {
|
||||
req := NewRequest[bool]("removeBusinessAccountProfilePhoto", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -117,8 +117,8 @@ type SetBusinessAccountGiftSettingsP struct {
|
||||
AcceptedGiftTypes AcceptedGiftTypes `json:"accepted_gift_types"`
|
||||
}
|
||||
|
||||
func (api *Api) SetBusinessAccountGiftSettings(p SetBusinessAccountGiftSettingsP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountGiftSettings", p)
|
||||
func (api *Api) SetBusinessAccountGiftSettings(params SetBusinessAccountGiftSettingsP) (bool, error) {
|
||||
req := NewRequest[bool]("setBusinessAccountGiftSettings", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -126,8 +126,8 @@ type GetBusinessAccountStarBalanceP struct {
|
||||
BusinessConnectionID string `json:"business_connection_id"`
|
||||
}
|
||||
|
||||
func (api *Api) GetBusinessAccountStarBalance(p GetBusinessAccountStarBalanceP) (StarAmount, error) {
|
||||
req := NewRequest[StarAmount]("getBusinessAccountGiftSettings", p)
|
||||
func (api *Api) GetBusinessAccountStarBalance(params GetBusinessAccountStarBalanceP) (StarAmount, error) {
|
||||
req := NewRequest[StarAmount]("getBusinessAccountGiftSettings", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -136,8 +136,8 @@ type TransferBusinessAccountStartP struct {
|
||||
StarCount int `json:"star_count"`
|
||||
}
|
||||
|
||||
func (api *Api) TransferBusinessAccountStart(p TransferBusinessAccountStartP) (bool, error) {
|
||||
req := NewRequest[bool]("transferBusinessAccountStart", p)
|
||||
func (api *Api) TransferBusinessAccountStart(params TransferBusinessAccountStartP) (bool, error) {
|
||||
req := NewRequest[bool]("transferBusinessAccountStart", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -155,8 +155,8 @@ type GetBusinessAccountGiftsP struct {
|
||||
Limit int `json:"limit,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) GetBusinessAccountGifts(p GetBusinessAccountGiftsP) (OwnedGifts, error) {
|
||||
req := NewRequest[OwnedGifts]("getBusinessAccountGifts", p)
|
||||
func (api *Api) GetBusinessAccountGifts(params GetBusinessAccountGiftsP) (OwnedGifts, error) {
|
||||
req := NewRequest[OwnedGifts]("getBusinessAccountGifts", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -165,8 +165,8 @@ type ConvertGiftToStarsP struct {
|
||||
OwnedGiftID string `json:"owned_gift_id"`
|
||||
}
|
||||
|
||||
func (api *Api) ConvertGiftToStars(p ConvertGiftToStarsP) (bool, error) {
|
||||
req := NewRequest[bool]("convertGiftToStars", p)
|
||||
func (api *Api) ConvertGiftToStars(params ConvertGiftToStarsP) (bool, error) {
|
||||
req := NewRequest[bool]("convertGiftToStars", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -177,8 +177,8 @@ type UpgradeGiftP struct {
|
||||
StarCount int `json:"star_count,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) UpgradeGift(p UpgradeGiftP) (bool, error) {
|
||||
req := NewRequest[bool]("upgradeGift", p)
|
||||
func (api *Api) UpgradeGift(params UpgradeGiftP) (bool, error) {
|
||||
req := NewRequest[bool]("upgradeGift", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -189,8 +189,8 @@ type TransferGiftP struct {
|
||||
StarCount int `json:"star_count,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) TransferGift(p TransferGiftP) (bool, error) {
|
||||
req := NewRequest[bool]("transferGift", p)
|
||||
func (api *Api) TransferGift(params TransferGiftP) (bool, error) {
|
||||
req := NewRequest[bool]("transferGift", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -208,12 +208,12 @@ type PostStoryP struct {
|
||||
ProtectContent bool `json:"protect_content,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) PostStoryPhoto(p PostStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("postStory", p)
|
||||
func (api *Api) PostStoryPhoto(params PostStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("postStory", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
func (api *Api) PostStoryVideo(p PostStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("postStory", p)
|
||||
func (api *Api) PostStoryVideo(params PostStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("postStory", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -226,8 +226,8 @@ type RepostStoryP struct {
|
||||
ProtectContent bool `json:"protect_content,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) RepostStory(p RepostStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("repostStory", p)
|
||||
func (api *Api) RepostStory(params RepostStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("repostStory", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -242,8 +242,8 @@ type EditStoryP struct {
|
||||
Areas []StoryArea `json:"areas,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) EditStory(p EditStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("editStory", p)
|
||||
func (api *Api) EditStory(params EditStoryP) (Story, error) {
|
||||
req := NewRequest[Story]("editStory", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ type DeleteStoryP struct {
|
||||
StoryID int `json:"story_id"`
|
||||
}
|
||||
|
||||
func (api *Api) DeleteStory(p DeleteStoryP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteStory", p)
|
||||
func (api *Api) DeleteStory(params DeleteStoryP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteStory", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user