WIP v0.5.0
This commit is contained in:
@@ -14,8 +14,8 @@ type SendStickerP struct {
|
||||
MessageEffectID string `json:"message_effect_id,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SendSticker(p SendStickerP) (Message, error) {
|
||||
req := NewRequest[Message]("sendSticker", p)
|
||||
func (api *Api) SendSticker(params SendStickerP) (Message, error) {
|
||||
req := NewRequest[Message]("sendSticker", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ type GetStickerSetP struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (api *Api) GetStickerSet(p GetStickerSetP) (StickerSet, error) {
|
||||
req := NewRequest[StickerSet]("getStickerSet", p)
|
||||
func (api *Api) GetStickerSet(params GetStickerSetP) (StickerSet, error) {
|
||||
req := NewRequest[StickerSet]("getStickerSet", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ type GetCustomEmojiStickersP struct {
|
||||
CustomEmojiIDs []string `json:"custom_emoji_ids"`
|
||||
}
|
||||
|
||||
func (api *Api) GetCustomEmojiStickers(p GetCustomEmojiStickersP) ([]Sticker, error) {
|
||||
req := NewRequest[[]Sticker]("getCustomEmojiStickers", p)
|
||||
func (api *Api) GetCustomEmojiStickers(params GetCustomEmojiStickersP) ([]Sticker, error) {
|
||||
req := NewRequest[[]Sticker]("getCustomEmojiStickers", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ type CreateNewStickerSetP struct {
|
||||
NeedsRepainting bool `json:"needs_repainting,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) CreateNewStickerSet(p CreateNewStickerSetP) (bool, error) {
|
||||
req := NewRequest[bool]("createNewStickerSet", p)
|
||||
func (api *Api) CreateNewStickerSet(params CreateNewStickerSetP) (bool, error) {
|
||||
req := NewRequest[bool]("createNewStickerSet", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ type AddStickerToSetP struct {
|
||||
Sticker InputSticker `json:"sticker"`
|
||||
}
|
||||
|
||||
func (api *Api) AddStickerToSet(p AddStickerToSetP) (bool, error) {
|
||||
req := NewRequest[bool]("addStickerToSet", p)
|
||||
func (api *Api) AddStickerToSet(params AddStickerToSetP) (bool, error) {
|
||||
req := NewRequest[bool]("addStickerToSet", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ type SetStickerPositionInSetP struct {
|
||||
Position int `json:"position"`
|
||||
}
|
||||
|
||||
func (api *Api) SetStickerPosition(p SetStickerPositionInSetP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerPosition", p)
|
||||
func (api *Api) SetStickerPosition(params SetStickerPositionInSetP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerPosition", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ type DeleteStickerFromSetP struct {
|
||||
Sticker string `json:"sticker"`
|
||||
}
|
||||
|
||||
func (api *Api) DeleteStickerFromSet(p DeleteStickerFromSetP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteStickerFromSet", p)
|
||||
func (api *Api) DeleteStickerFromSet(params DeleteStickerFromSetP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteStickerFromSet", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ type ReplaceStickerInSetP struct {
|
||||
Sticker InputSticker `json:"sticker"`
|
||||
}
|
||||
|
||||
func (api *Api) ReplaceStickerInSet(p ReplaceStickerInSetP) (bool, error) {
|
||||
req := NewRequest[bool]("replaceStickerInSet", p)
|
||||
func (api *Api) ReplaceStickerInSet(params ReplaceStickerInSetP) (bool, error) {
|
||||
req := NewRequest[bool]("replaceStickerInSet", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -99,8 +99,8 @@ type SetStickerEmojiListP struct {
|
||||
EmojiList []string `json:"emoji_list"`
|
||||
}
|
||||
|
||||
func (api *Api) SetStickerEmojiList(p SetStickerEmojiListP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerEmojiList", p)
|
||||
func (api *Api) SetStickerEmojiList(params SetStickerEmojiListP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerEmojiList", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -109,8 +109,8 @@ type SetStickerKeywordsP struct {
|
||||
Keywords []string `json:"keywords"`
|
||||
}
|
||||
|
||||
func (api *Api) SetStickerKeywords(p SetStickerKeywordsP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerKeywords", p)
|
||||
func (api *Api) SetStickerKeywords(params SetStickerKeywordsP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerKeywords", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ type SetStickerMaskPositionP struct {
|
||||
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SetStickerMaskPosition(p SetStickerMaskPositionP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerMaskPosition", p)
|
||||
func (api *Api) SetStickerMaskPosition(params SetStickerMaskPositionP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerMaskPosition", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -129,8 +129,8 @@ type SetStickerSetTitleP struct {
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
func (api *Api) SetStickerSetTitle(p SetStickerSetTitleP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerSetTitle", p)
|
||||
func (api *Api) SetStickerSetTitle(params SetStickerSetTitleP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerSetTitle", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ type SetStickerSetThumbnailP struct {
|
||||
Format InputStickerFormat `json:"format"`
|
||||
}
|
||||
|
||||
func (api *Api) SetStickerSetThumbnail(p SetStickerSetThumbnailP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerSetThumbnail", p)
|
||||
func (api *Api) SetStickerSetThumbnail(params SetStickerSetThumbnailP) (bool, error) {
|
||||
req := NewRequest[bool]("setStickerSetThumbnail", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ type SetCustomEmojiStickerSetThumbnailP struct {
|
||||
CustomEmojiID string `json:"custom_emoji_id,omitempty"`
|
||||
}
|
||||
|
||||
func (api *Api) SetCustomEmojiStickerSetThumbnail(p SetStickerSetThumbnailP) (bool, error) {
|
||||
req := NewRequest[bool]("setCustomEmojiStickerSetThumbnail", p)
|
||||
func (api *Api) SetCustomEmojiStickerSetThumbnail(params SetStickerSetThumbnailP) (bool, error) {
|
||||
req := NewRequest[bool]("setCustomEmojiStickerSetThumbnail", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ type DeleteStickerSetP struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func (api *Api) DeleteStickerSet(p DeleteStickerSetP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteStickerSet", p)
|
||||
func (api *Api) DeleteStickerSet(params DeleteStickerSetP) (bool, error) {
|
||||
req := NewRequest[bool]("deleteStickerSet", params)
|
||||
return req.Do(api)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user