@tnwx/wxmp
Version:
TNWX 微信系开发脚手架之极速开发微信公众号
62 lines (61 loc) • 1.81 kB
TypeScript
export declare class UserApi {
private static updateRemarkUrl;
private static getUserUrl;
private static getUserInfoUrl;
private static batchGetUrl;
private static getBlackListUrl;
private static batchBlackListUrl;
private static batchUnBlackListUrl;
/**
* 设置用户备注名
* @param openId
* @param remark
*/
static updateRemark(openId: string, remark: string): Promise<any>;
/**
* 获取用户列表
* @param openId
* @param remark
*/
static getFollowers(nextOpenid?: string): Promise<any>;
/**
* 获取用户基本信息(包括UnionID机制)
* @param openId
* @param lang
*/
static getUserInfo(openId: string, lang?: string): Promise<any>;
/**
* 批量获取用户基本信息
* @param userList
*/
static batchGetUserInfo(userList: BatchUserInfo[]): Promise<any>;
/**
* 批量获取用户基本信息
* @param json
*/
static batchUserInfo(json: string): Promise<any>;
/**
* 获取公众号的黑名单列表
* @param beginOpenId 为空时默认从开头拉取
*/
static getBlackList(beginOpenId?: string): Promise<any>;
/**
* 拉黑用户
* @param openidList 需要拉入黑名单的用户的openid,一次拉黑最多允许20个
*/
static batchBlackList(openidList: string[]): Promise<any>;
/**
* 取消拉黑用户
* @param openidList
*/
static batchUnBlackList(openidList: string[]): Promise<any>;
}
export declare class BatchUserInfo {
private openid;
private lang;
constructor(openid: string, lang: string);
get getOpenId(): string;
set setOpenId(openid: string);
get getLang(): string;
set setLang(lang: string);
}