MCPcopy
hub / github.com/wechatpy/wechatpy / tag_user

Method tag_user

wechatpy/client/api/tag.py:77–92  ·  view source on GitHub ↗

批量为用户打标签 :param tag_id: 标签 ID :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包

(self, tag_id, user_id)

Source from the content-addressed store, hash-verified

75 )
76
77 def tag_user(self, tag_id, user_id):
78 """
79 批量为用户打标签
80
81 :param tag_id: 标签 ID
82 :param user_id: 用户 ID, 可以是单个或者列表
83
84 :return: 返回的 JSON 数据包
85
86 """
87 data = {'tagid': tag_id}
88 if isinstance(user_id, (tuple, list)):
89 data['openid_list'] = user_id
90 else:
91 data['openid_list'] = [user_id, ]
92 return self._post('tags/members/batchtagging', data=data)
93
94 def untag_user(self, tag_id, user_id):
95 """

Callers

nothing calls this directly

Calls 1

_postMethod · 0.45

Tested by

no test coverage detected