amo/users.go
2024-05-30 13:43:10 +05:00

18 lines
350 B
Go

package amo
import "surdeus.su/core/ss/urlenc"
import "surdeus.su/core/amo/users"
import "fmt"
func (client *Client) GetUser(
userId int,
opts ...urlenc.Builder,
) (*users.User, error) {
user := new(users.User)
err := client.API.Get(fmt.Sprintf(
"/api/v4/users/%d?%s",
userId,
urlenc.Join(opts...).Encode(),
), user)
return user, err
}