some cleanup

This commit is contained in:
2026-02-12 13:50:02 +03:00
parent 12883f428e
commit 4129b8e688
16 changed files with 334 additions and 428 deletions

View File

@@ -19,19 +19,19 @@ type UpdateParams struct {
AllowedUpdates []UpdateType `json:"allowed_updates"`
}
func (api *Api) GetMe() (User, error) {
func (api *API) GetMe() (User, error) {
req := NewRequest[User, EmptyParams]("getMe", NoParams)
return req.Do(api)
}
func (api *Api) LogOut() (bool, error) {
func (api *API) LogOut() (bool, error) {
req := NewRequest[bool, EmptyParams]("logOut", NoParams)
return req.Do(api)
}
func (api *Api) Close() (bool, error) {
func (api *API) Close() (bool, error) {
req := NewRequest[bool, EmptyParams]("close", NoParams)
return req.Do(api)
}
func (api *Api) GetUpdates(params UpdateParams) ([]Update, error) {
func (api *API) GetUpdates(params UpdateParams) ([]Update, error) {
req := NewRequest[[]Update]("getUpdates", params)
return req.Do(api)
}
@@ -40,7 +40,7 @@ type GetFileP struct {
FileId string `json:"file_id"`
}
func (api *Api) GetFile(params GetFileP) (File, error) {
func (api *API) GetFile(params GetFileP) (File, error) {
req := NewRequest[File]("getFile", params)
return req.Do(api)
}