imapi

package
v1.8.4-patch.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2025 License: GPL-3.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiCaller

type ApiCaller[Req, Resp any] interface {
	Call(ctx context.Context, apiPrefix string, req *Req) (*Resp, error)
}

func NewApiCaller

func NewApiCaller[Req, Resp any](api string) ApiCaller[Req, Resp]

type Caller

type Caller struct {
	// contains filtered or unexported fields
}

func (*Caller) AccountCheckSingle added in v1.8.0

func (c *Caller) AccountCheckSingle(ctx context.Context, userID string) (bool, error)

return true when isUserNotExist.

func (*Caller) FindGroupInfo

func (c *Caller) FindGroupInfo(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error)

func (*Caller) ForceOffLine

func (c *Caller) ForceOffLine(ctx context.Context, userID string) error

func (*Caller) FriendUserIDs

func (c *Caller) FriendUserIDs(ctx context.Context, userID string) ([]string, error)

func (*Caller) GetAdminTokenCache added in v1.8.3

func (c *Caller) GetAdminTokenCache(ctx context.Context, userID string) (string, error)

func (*Caller) GetUserToken added in v1.8.2

func (c *Caller) GetUserToken(ctx context.Context, userID string, platformID int32) (string, error)

func (*Caller) ImAdminTokenWithDefaultAdmin

func (c *Caller) ImAdminTokenWithDefaultAdmin(ctx context.Context) (string, error)

func (*Caller) ImportFriend

func (c *Caller) ImportFriend(ctx context.Context, ownerUserID string, friendUserIDs []string) error

func (*Caller) InviteToGroup

func (c *Caller) InviteToGroup(ctx context.Context, userID string, groupIDs []string) error

func (*Caller) RegisterUser

func (c *Caller) RegisterUser(ctx context.Context, users []*sdkws.UserInfo) error

func (*Caller) UpdateUserInfo

func (c *Caller) UpdateUserInfo(ctx context.Context, userID string, nickName string, faceURL string) error

func (*Caller) UserRegisterCount

func (c *Caller) UserRegisterCount(ctx context.Context, start int64, end int64) (map[string]int64, int64, error)

type CallerInterface

type CallerInterface interface {
	ImAdminTokenWithDefaultAdmin(ctx context.Context) (string, error)
	ImportFriend(ctx context.Context, ownerUserID string, friendUserID []string) error
	GetUserToken(ctx context.Context, userID string, platform int32) (string, error)
	GetAdminTokenCache(ctx context.Context, userID string) (string, error)
	InviteToGroup(ctx context.Context, userID string, groupIDs []string) error
	UpdateUserInfo(ctx context.Context, userID string, nickName string, faceURL string) error
	ForceOffLine(ctx context.Context, userID string) error
	RegisterUser(ctx context.Context, users []*sdkws.UserInfo) error
	FindGroupInfo(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error)
	UserRegisterCount(ctx context.Context, start int64, end int64) (map[string]int64, int64, error)
	FriendUserIDs(ctx context.Context, userID string) ([]string, error)
	AccountCheckSingle(ctx context.Context, userID string) (bool, error)
}

func New

func New(imApi string, imSecret string, defaultIMUserID string) CallerInterface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL