partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
WeChatCard.update_code
更新卡券 code
wechatpy/client/api/card.py
def update_code(self, card_id, old_code, new_code): """ 更新卡券 code """ return self._post( 'card/code/update', data={ 'card_id': card_id, 'code': old_code, 'new_code': new_code } )
def update_code(self, card_id, old_code, new_code): """ 更新卡券 code """ return self._post( 'card/code/update', data={ 'card_id': card_id, 'code': old_code, 'new_code': new_code } )
[ "更新卡券", "code" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L195-L206
[ "def", "update_code", "(", "self", ",", "card_id", ",", "old_code", ",", "new_code", ")", ":", "return", "self", ".", "_post", "(", "'card/code/update'", ",", "data", "=", "{", "'card_id'", ":", "card_id", ",", "'code'", ":", "old_code", ",", "'new_code'",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.invalid_code
设置卡券失效
wechatpy/client/api/card.py
def invalid_code(self, code, card_id=None): """ 设置卡券失效 """ card_data = { 'code': code } if card_id: card_data['card_id'] = card_id return self._post( 'card/code/unavailable', data=card_data )
def invalid_code(self, code, card_id=None): """ 设置卡券失效 """ card_data = { 'code': code } if card_id: card_data['card_id'] = card_id return self._post( 'card/code/unavailable', data=card_data )
[ "设置卡券失效" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L208-L220
[ "def", "invalid_code", "(", "self", ",", "code", ",", "card_id", "=", "None", ")", ":", "card_data", "=", "{", "'code'", ":", "code", "}", "if", "card_id", ":", "card_data", "[", "'card_id'", "]", "=", "card_id", "return", "self", ".", "_post", "(", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.activate_membercard
激活会员卡 - 接口激活方式 详情请参见 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 参数示例: { "init_bonus": 100, "init_bonus_record":"旧积分同步", "init_balance": 200, "membership_number": "AAA00000001", "code": "12312313", ...
wechatpy/client/api/card.py
def activate_membercard(self, membership_number, code, **kwargs): """ 激活会员卡 - 接口激活方式 详情请参见 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 参数示例: { "init_bonus": 100, "init_bonus_record":"旧积分同步", "init_balance": 200, ...
def activate_membercard(self, membership_number, code, **kwargs): """ 激活会员卡 - 接口激活方式 详情请参见 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 参数示例: { "init_bonus": 100, "init_bonus_record":"旧积分同步", "init_balance": 200, ...
[ "激活会员卡", "-", "接口激活方式", "详情请参见", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?t", "=", "resource", "/", "res_main&id", "=", "mp1451025283" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L257-L290
[ "def", "activate_membercard", "(", "self", ",", "membership_number", ",", "code", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'membership_number'", "]", "=", "membership_number", "kwargs", "[", "'code'", "]", "=", "code", "return", "self", ".", "_post...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.update_membercard
更新会员信息 详情请参见 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 注意事项: 1.开发者可以同时传入add_bonus和bonus解决由于同步失败带来的幂等性问题。同时传入add_bonus和bonus时 add_bonus作为积分变动消息中的变量值,而bonus作为卡面上的总积分额度显示。余额变动同理。 2.开发者可以传入is_notify_bonus控制特殊的积分对账变动不发送消息,余额变动同理。 参数示例: ...
wechatpy/client/api/card.py
def update_membercard(self, code, card_id, **kwargs): """ 更新会员信息 详情请参见 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 注意事项: 1.开发者可以同时传入add_bonus和bonus解决由于同步失败带来的幂等性问题。同时传入add_bonus和bonus时 add_bonus作为积分变动消息中的变量值,而bonus作为卡面上的总积分额度显示。余额变动同理。 ...
def update_membercard(self, code, card_id, **kwargs): """ 更新会员信息 详情请参见 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 注意事项: 1.开发者可以同时传入add_bonus和bonus解决由于同步失败带来的幂等性问题。同时传入add_bonus和bonus时 add_bonus作为积分变动消息中的变量值,而bonus作为卡面上的总积分额度显示。余额变动同理。 ...
[ "更新会员信息", "详情请参见", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?t", "=", "resource", "/", "res_main&id", "=", "mp1451025283" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L292-L344
[ "def", "update_membercard", "(", "self", ",", "code", ",", "card_id", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "update", "(", "{", "'code'", ":", "code", ",", "'card_id'", ":", "card_id", ",", "}", ")", "return", "self", ".", "_post", "(", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.add_pay_giftcard
新增支付后投放卡券的规则,支持支付后领卡,支付后赠券 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param base_info: 营销规则结构体 :type base_info: dict :param extra_info: 支付规则结构体 :type extra_info: dict :param is_membercard: 本次规则是否是领卡。(领卡传入 True, 赠券传入 False) :type is_memberc...
wechatpy/client/api/card.py
def add_pay_giftcard(self, base_info, extra_info, is_membercard): """ 新增支付后投放卡券的规则,支持支付后领卡,支付后赠券 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param base_info: 营销规则结构体 :type base_info: dict :param extra_info: 支付规则结构体 :type extra_info: dict ...
def add_pay_giftcard(self, base_info, extra_info, is_membercard): """ 新增支付后投放卡券的规则,支持支付后领卡,支付后赠券 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param base_info: 营销规则结构体 :type base_info: dict :param extra_info: 支付规则结构体 :type extra_info: dict ...
[ "新增支付后投放卡券的规则,支持支付后领卡,支付后赠券", "详情请参见", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?id", "=", "mp1466494654_K9rNz" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L364-L393
[ "def", "add_pay_giftcard", "(", "self", ",", "base_info", ",", "extra_info", ",", "is_membercard", ")", ":", "if", "is_membercard", ":", "rule_key", "=", "'member_rule'", "rule_type", "=", "'RULE_TYPE_PAY_MEMBER_CARD'", "else", ":", "rule_key", "=", "'single_pay'", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.get_pay_giftcard
查询支付后投放卡券的规则 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param rule_id: 支付即会员的规则 ID :return: 支付后投放卡券的规则 :rtype: dict
wechatpy/client/api/card.py
def get_pay_giftcard(self, rule_id): """ 查询支付后投放卡券的规则 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param rule_id: 支付即会员的规则 ID :return: 支付后投放卡券的规则 :rtype: dict """ return self._post( 'card/paygiftcard/getbyid', ...
def get_pay_giftcard(self, rule_id): """ 查询支付后投放卡券的规则 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param rule_id: 支付即会员的规则 ID :return: 支付后投放卡券的规则 :rtype: dict """ return self._post( 'card/paygiftcard/getbyid', ...
[ "查询支付后投放卡券的规则", "详情请参见", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?id", "=", "mp1466494654_K9rNz" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L410-L426
[ "def", "get_pay_giftcard", "(", "self", ",", "rule_id", ")", ":", "return", "self", ".", "_post", "(", "'card/paygiftcard/getbyid'", ",", "data", "=", "{", "'rule_id'", ":", "rule_id", ",", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.batch_get_pay_giftcard
批量查询支付后投放卡券的规则 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param effective: 是否仅查询生效的规则 :type effective: bool :param offset: 起始偏移量 :type offset: int :param count: 查询的数量 :type count: int :return: 支付后投放卡券规则的总数,以及查询到的列表
wechatpy/client/api/card.py
def batch_get_pay_giftcard(self, effective=True, offset=0, count=10): """ 批量查询支付后投放卡券的规则 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param effective: 是否仅查询生效的规则 :type effective: bool :param offset: 起始偏移量 :type offset: int :param co...
def batch_get_pay_giftcard(self, effective=True, offset=0, count=10): """ 批量查询支付后投放卡券的规则 详情请参见 https://mp.weixin.qq.com/wiki?id=mp1466494654_K9rNz :param effective: 是否仅查询生效的规则 :type effective: bool :param offset: 起始偏移量 :type offset: int :param co...
[ "批量查询支付后投放卡券的规则", "详情请参见", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?id", "=", "mp1466494654_K9rNz" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L428-L451
[ "def", "batch_get_pay_giftcard", "(", "self", ",", "effective", "=", "True", ",", "offset", "=", "0", ",", "count", "=", "10", ")", ":", "return", "self", ".", "_post", "(", "'card/paygiftcard/batchget'", ",", "data", "=", "{", "'type'", ":", "'RULE_TYPE_P...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.update_movie_ticket
更新电影票
wechatpy/client/api/card.py
def update_movie_ticket(self, code, ticket_class, show_time, duration, screening_room, seat_number, card_id=None): """ 更新电影票 """ ticket = { 'code': code, 'ticket_class': ticket_class, 'show_time': show_time, 'dur...
def update_movie_ticket(self, code, ticket_class, show_time, duration, screening_room, seat_number, card_id=None): """ 更新电影票 """ ticket = { 'code': code, 'ticket_class': ticket_class, 'show_time': show_time, 'dur...
[ "更新电影票" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L453-L471
[ "def", "update_movie_ticket", "(", "self", ",", "code", ",", "ticket_class", ",", "show_time", ",", "duration", ",", "screening_room", ",", "seat_number", ",", "card_id", "=", "None", ")", ":", "ticket", "=", "{", "'code'", ":", "code", ",", "'ticket_class'"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.checkin_boardingpass
飞机票接口
wechatpy/client/api/card.py
def checkin_boardingpass(self, code, passenger_name, seat_class, etkt_bnr, seat='', gate='', boarding_time=None, is_cancel=False, qrcode_data=None, card_id=None): """ 飞机票接口 """ data = { 'code': code, 'passe...
def checkin_boardingpass(self, code, passenger_name, seat_class, etkt_bnr, seat='', gate='', boarding_time=None, is_cancel=False, qrcode_data=None, card_id=None): """ 飞机票接口 """ data = { 'code': code, 'passe...
[ "飞机票接口" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L473-L497
[ "def", "checkin_boardingpass", "(", "self", ",", "code", ",", "passenger_name", ",", "seat_class", ",", "etkt_bnr", ",", "seat", "=", "''", ",", "gate", "=", "''", ",", "boarding_time", "=", "None", ",", "is_cancel", "=", "False", ",", "qrcode_data", "=", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.update_luckymoney_balance
更新红包余额
wechatpy/client/api/card.py
def update_luckymoney_balance(self, code, balance, card_id=None): """ 更新红包余额 """ card_data = { 'code': code, 'balance': balance } if card_id: card_data['card_id'] = card_id return self._post( 'card/luckymoney/updateu...
def update_luckymoney_balance(self, code, balance, card_id=None): """ 更新红包余额 """ card_data = { 'code': code, 'balance': balance } if card_id: card_data['card_id'] = card_id return self._post( 'card/luckymoney/updateu...
[ "更新红包余额" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L499-L512
[ "def", "update_luckymoney_balance", "(", "self", ",", "code", ",", "balance", ",", "card_id", "=", "None", ")", ":", "card_data", "=", "{", "'code'", ":", "code", ",", "'balance'", ":", "balance", "}", "if", "card_id", ":", "card_data", "[", "'card_id'", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.get_redirect_url
获取卡券跳转外链
wechatpy/client/api/card.py
def get_redirect_url(self, url, encrypt_code, card_id): """ 获取卡券跳转外链 """ from wechatpy.utils import WeChatSigner code = self.decrypt_code(encrypt_code) signer = WeChatSigner() signer.add_data(self.secret) signer.add_data(code) signer.add_data(car...
def get_redirect_url(self, url, encrypt_code, card_id): """ 获取卡券跳转外链 """ from wechatpy.utils import WeChatSigner code = self.decrypt_code(encrypt_code) signer = WeChatSigner() signer.add_data(self.secret) signer.add_data(code) signer.add_data(car...
[ "获取卡券跳转外链" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L514-L534
[ "def", "get_redirect_url", "(", "self", ",", "url", ",", "encrypt_code", ",", "card_id", ")", ":", "from", "wechatpy", ".", "utils", "import", "WeChatSigner", "code", "=", "self", ".", "decrypt_code", "(", "encrypt_code", ")", "signer", "=", "WeChatSigner", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.deposit_code
导入code
wechatpy/client/api/card.py
def deposit_code(self, card_id, codes): """ 导入code """ card_data = { 'card_id': card_id, 'code': codes } return self._post( 'card/code/deposit', data=card_data )
def deposit_code(self, card_id, codes): """ 导入code """ card_data = { 'card_id': card_id, 'code': codes } return self._post( 'card/code/deposit', data=card_data )
[ "导入code" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L536-L547
[ "def", "deposit_code", "(", "self", ",", "card_id", ",", "codes", ")", ":", "card_data", "=", "{", "'card_id'", ":", "card_id", ",", "'code'", ":", "codes", "}", "return", "self", ".", "_post", "(", "'card/code/deposit'", ",", "data", "=", "card_data", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.check_code
核查code
wechatpy/client/api/card.py
def check_code(self, card_id, codes): """ 核查code """ card_data = { 'card_id': card_id, 'code': codes } return self._post( 'card/code/checkcode', data=card_data )
def check_code(self, card_id, codes): """ 核查code """ card_data = { 'card_id': card_id, 'code': codes } return self._post( 'card/code/checkcode', data=card_data )
[ "核查code" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L561-L572
[ "def", "check_code", "(", "self", ",", "card_id", ",", "codes", ")", ":", "card_data", "=", "{", "'card_id'", ":", "card_id", ",", "'code'", ":", "codes", "}", "return", "self", ".", "_post", "(", "'card/code/checkcode'", ",", "data", "=", "card_data", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.modify_stock
修改库存
wechatpy/client/api/card.py
def modify_stock(self, card_id, n): """ 修改库存 """ if n == 0: return card_data = { 'card_id': card_id, } if n > 0: card_data['increase_stock_value'] = n elif n < 0: card_data['reduce_stock_value'] = -n ...
def modify_stock(self, card_id, n): """ 修改库存 """ if n == 0: return card_data = { 'card_id': card_id, } if n > 0: card_data['increase_stock_value'] = n elif n < 0: card_data['reduce_stock_value'] = -n ...
[ "修改库存" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L574-L590
[ "def", "modify_stock", "(", "self", ",", "card_id", ",", "n", ")", ":", "if", "n", "==", "0", ":", "return", "card_data", "=", "{", "'card_id'", ":", "card_id", ",", "}", "if", "n", ">", "0", ":", "card_data", "[", "'increase_stock_value'", "]", "=",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.get_activate_url
获取开卡插件 Url, 内含调用开卡插件所需的参数 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1499332673_Unm7V :param card_id: 会员卡的card_id :param outer_str: 渠道值,用于统计本次领取的渠道参数 :return: 内含调用开卡插件所需的参数的 Url
wechatpy/client/api/card.py
def get_activate_url(self, card_id, outer_str=None): """ 获取开卡插件 Url, 内含调用开卡插件所需的参数 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1499332673_Unm7V :param card_id: 会员卡的card_id :param outer_str: 渠道值,用于统计本次领取的渠道参数 :return: 内含调用开卡插件所需的参数的 Url """ return sel...
def get_activate_url(self, card_id, outer_str=None): """ 获取开卡插件 Url, 内含调用开卡插件所需的参数 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1499332673_Unm7V :param card_id: 会员卡的card_id :param outer_str: 渠道值,用于统计本次领取的渠道参数 :return: 内含调用开卡插件所需的参数的 Url """ return sel...
[ "获取开卡插件", "Url", "内含调用开卡插件所需的参数", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?id", "=", "mp1499332673_Unm7V" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L592-L609
[ "def", "get_activate_url", "(", "self", ",", "card_id", ",", "outer_str", "=", "None", ")", ":", "return", "self", ".", "_post", "(", "'card/membercard/activate/geturl'", ",", "data", "=", "{", "'card_id'", ":", "card_id", ",", "'outer_str'", ":", "outer_str",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.get_activate_info
获取用户开卡时提交的信息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1499332673_Unm7V :param activate_ticket: 跳转型开卡组件开卡后回调中的激活票据,可以用来获取用户开卡资料 :return: 用户开卡时填写的字段值
wechatpy/client/api/card.py
def get_activate_info(self, activate_ticket): """ 获取用户开卡时提交的信息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1499332673_Unm7V :param activate_ticket: 跳转型开卡组件开卡后回调中的激活票据,可以用来获取用户开卡资料 :return: 用户开卡时填写的字段值 """ return self._post( 'card/membercard/activ...
def get_activate_info(self, activate_ticket): """ 获取用户开卡时提交的信息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1499332673_Unm7V :param activate_ticket: 跳转型开卡组件开卡后回调中的激活票据,可以用来获取用户开卡资料 :return: 用户开卡时填写的字段值 """ return self._post( 'card/membercard/activ...
[ "获取用户开卡时提交的信息", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?id", "=", "mp1499332673_Unm7V" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L611-L626
[ "def", "get_activate_info", "(", "self", ",", "activate_ticket", ")", ":", "return", "self", ".", "_post", "(", "'card/membercard/activatetempinfo/get'", ",", "data", "=", "{", "'activate_ticket'", ":", "activate_ticket", ",", "}", ",", "result_processor", "=", "l...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatCard.set_activate_user_form
设置开卡字段接口 详情请参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 "6 激活会员卡" -> "6.2 一键激活" -> "步骤二:设置开卡字段接口" 参数示例: { "card_id": "pbLatjnrwUUdZI641gKdTMJzHGfc", "service_statement": { "name": "会员守则", "url": "ht...
wechatpy/client/api/card.py
def set_activate_user_form(self, card_id, **kwargs): """ 设置开卡字段接口 详情请参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 "6 激活会员卡" -> "6.2 一键激活" -> "步骤二:设置开卡字段接口" 参数示例: { "card_id": "pbLatjnrwUUdZI641gKdTMJzHGfc", "service...
def set_activate_user_form(self, card_id, **kwargs): """ 设置开卡字段接口 详情请参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1451025283 "6 激活会员卡" -> "6.2 一键激活" -> "步骤二:设置开卡字段接口" 参数示例: { "card_id": "pbLatjnrwUUdZI641gKdTMJzHGfc", "service...
[ "设置开卡字段接口", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?t", "=", "resource", "/", "res_main&id", "=", "mp1451025283", "6", "激活会员卡", "-", ">", "6", ".", "2", "一键激活", "-", ">", "步骤二:设置开卡字段接口" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/card.py#L628-L700
[ "def", "set_activate_user_form", "(", "self", ",", "card_id", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "'card_id'", "]", "=", "card_id", "return", "self", ".", "_post", "(", "'card/membercard/activateuserform/set'", ",", "data", "=", "kwargs", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatJSAPI.get_jsapi_signature
获取 JSAPI 签名 :param prepay_id: 统一下单接口返回的 prepay_id 参数值 :param timestamp: 可选,时间戳,默认为当前时间戳 :param nonce_str: 可选,随机字符串,默认自动生成 :return: 签名
wechatpy/pay/api/jsapi.py
def get_jsapi_signature(self, prepay_id, timestamp=None, nonce_str=None): """ 获取 JSAPI 签名 :param prepay_id: 统一下单接口返回的 prepay_id 参数值 :param timestamp: 可选,时间戳,默认为当前时间戳 :param nonce_str: 可选,随机字符串,默认自动生成 :return: 签名 """ data = { 'appId': self.sub_...
def get_jsapi_signature(self, prepay_id, timestamp=None, nonce_str=None): """ 获取 JSAPI 签名 :param prepay_id: 统一下单接口返回的 prepay_id 参数值 :param timestamp: 可选,时间戳,默认为当前时间戳 :param nonce_str: 可选,随机字符串,默认自动生成 :return: 签名 """ data = { 'appId': self.sub_...
[ "获取", "JSAPI", "签名" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/jsapi.py#L13-L32
[ "def", "get_jsapi_signature", "(", "self", ",", "prepay_id", ",", "timestamp", "=", "None", ",", "nonce_str", "=", "None", ")", ":", "data", "=", "{", "'appId'", ":", "self", ".", "sub_appid", "or", "self", ".", "appid", ",", "'timeStamp'", ":", "timesta...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatJSAPI.get_jsapi_params
获取 JSAPI 参数 :param prepay_id: 统一下单接口返回的 prepay_id 参数值 :param timestamp: 可选,时间戳,默认为当前时间戳 :param nonce_str: 可选,随机字符串,默认自动生成 :param jssdk: 前端调用方式,默认使用 WeixinJSBridge 使用 jssdk 调起支付的话,timestamp 的 s 为小写 使用 WeixinJSBridge 调起支付的话,timeStamp 的 S 为大写 ...
wechatpy/pay/api/jsapi.py
def get_jsapi_params(self, prepay_id, timestamp=None, nonce_str=None, jssdk=False): """ 获取 JSAPI 参数 :param prepay_id: 统一下单接口返回的 prepay_id 参数值 :param timestamp: 可选,时间戳,默认为当前时间戳 :param nonce_str: 可选,随机字符串,默认自动生成 :param jssdk: 前端调用方式,默认使用 WeixinJSBridge ...
def get_jsapi_params(self, prepay_id, timestamp=None, nonce_str=None, jssdk=False): """ 获取 JSAPI 参数 :param prepay_id: 统一下单接口返回的 prepay_id 参数值 :param timestamp: 可选,时间戳,默认为当前时间戳 :param nonce_str: 可选,随机字符串,默认自动生成 :param jssdk: 前端调用方式,默认使用 WeixinJSBridge ...
[ "获取", "JSAPI", "参数" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/jsapi.py#L34-L61
[ "def", "get_jsapi_params", "(", "self", ",", "prepay_id", ",", "timestamp", "=", "None", ",", "nonce_str", "=", "None", ",", "jssdk", "=", "False", ")", ":", "data", "=", "{", "'appId'", ":", "self", ".", "sub_appid", "or", "self", ".", "appid", ",", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatClient.fetch_access_token
获取 access token 详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档 :return: 返回的 JSON 数据包
wechatpy/client/__init__.py
def fetch_access_token(self): """ 获取 access token 详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档 :return: 返回的 JSON 数据包 """ return self._fetch_access_token( url='https://api.weixin.qq.com/cgi-bin/token', params={ 'grant_t...
def fetch_access_token(self): """ 获取 access token 详情请参考 http://mp.weixin.qq.com/wiki/index.php?title=通用接口文档 :return: 返回的 JSON 数据包 """ return self._fetch_access_token( url='https://api.weixin.qq.com/cgi-bin/token', params={ 'grant_t...
[ "获取", "access", "token", "详情请参考", "http", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki", "/", "index", ".", "php?title", "=", "通用接口文档" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/__init__.py#L52-L66
[ "def", "fetch_access_token", "(", "self", ")", ":", "return", "self", ".", "_fetch_access_token", "(", "url", "=", "'https://api.weixin.qq.com/cgi-bin/token'", ",", "params", "=", "{", "'grant_type'", ":", "'client_credential'", ",", "'appid'", ":", "self", ".", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatComponentClient.fetch_access_token
获取 access token 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list\ &t=resource/res_list&verify=1&id=open1419318587&token=&lang=zh_CN 这是内部刷新机制。请不要完全依赖! 因为有可能在缓存期间没有对此公众号的操作,造成refresh_token失效。 :return: 返回的 JSON 数据包
wechatpy/client/__init__.py
def fetch_access_token(self): """ 获取 access token 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list\ &t=resource/res_list&verify=1&id=open1419318587&token=&lang=zh_CN 这是内部刷新机制。请不要完全依赖! 因为有可能在缓存期间没有对此公众号的操作,造成refresh_token失效。 :return: 返回的 JSON...
def fetch_access_token(self): """ 获取 access token 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list\ &t=resource/res_list&verify=1&id=open1419318587&token=&lang=zh_CN 这是内部刷新机制。请不要完全依赖! 因为有可能在缓存期间没有对此公众号的操作,造成refresh_token失效。 :return: 返回的 JSON...
[ "获取", "access", "token", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list", "\\", "&t", "=", "resource", "/", "res_list&verify", "=", "1&id", "=", "open141931858...
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/__init__.py#L113-L135
[ "def", "fetch_access_token", "(", "self", ")", ":", "expires_in", "=", "7200", "result", "=", "self", ".", "component", ".", "refresh_authorizer_token", "(", "self", ".", "appid", ",", "self", ".", "refresh_token", ")", "if", "'expires_in'", "in", "result", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatDepartment.update
更新部门 https://work.weixin.qq.com/api/doc#90000/90135/90206 :param id: 部门 id :param name: 部门名称。长度限制为1~32个字符,字符不能包括\\:?”<>| :param parent_id: 父亲部门id :param order: 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32) :return: 返回的 JSON 数据包
wechatpy/enterprise/client/api/department.py
def update(self, id, name=None, parent_id=None, order=None): """ 更新部门 https://work.weixin.qq.com/api/doc#90000/90135/90206 :param id: 部门 id :param name: 部门名称。长度限制为1~32个字符,字符不能包括\\:?”<>| :param parent_id: 父亲部门id :param order: 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^3...
def update(self, id, name=None, parent_id=None, order=None): """ 更新部门 https://work.weixin.qq.com/api/doc#90000/90135/90206 :param id: 部门 id :param name: 部门名称。长度限制为1~32个字符,字符不能包括\\:?”<>| :param parent_id: 父亲部门id :param order: 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^3...
[ "更新部门" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/department.py#L34-L52
[ "def", "update", "(", "self", ",", "id", ",", "name", "=", "None", ",", "parent_id", "=", "None", ",", "order", "=", "None", ")", ":", "data", "=", "optionaldict", "(", "id", "=", "id", ",", "name", "=", "name", ",", "parentid", "=", "parent_id", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatDepartment.get
获取指定部门列表 https://work.weixin.qq.com/api/doc#90000/90135/90208 权限说明: 只能拉取token对应的应用的权限范围内的部门列表 :param id: 部门id。获取指定部门及其下的子部门。 如果不填,默认获取全量组织架构 :return: 部门列表
wechatpy/enterprise/client/api/department.py
def get(self, id=None): """ 获取指定部门列表 https://work.weixin.qq.com/api/doc#90000/90135/90208 权限说明: 只能拉取token对应的应用的权限范围内的部门列表 :param id: 部门id。获取指定部门及其下的子部门。 如果不填,默认获取全量组织架构 :return: 部门列表 """ if id is None: res = self._get('department/lis...
def get(self, id=None): """ 获取指定部门列表 https://work.weixin.qq.com/api/doc#90000/90135/90208 权限说明: 只能拉取token对应的应用的权限范围内的部门列表 :param id: 部门id。获取指定部门及其下的子部门。 如果不填,默认获取全量组织架构 :return: 部门列表 """ if id is None: res = self._get('department/lis...
[ "获取指定部门列表" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/department.py#L65-L81
[ "def", "get", "(", "self", ",", "id", "=", "None", ")", ":", "if", "id", "is", "None", ":", "res", "=", "self", ".", "_get", "(", "'department/list'", ")", "else", ":", "res", "=", "self", ".", "_get", "(", "'department/list'", ",", "params", "=", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatDepartment.get_users
获取部门成员:https://work.weixin.qq.com/api/doc#90000/90135/90200 获取部门成员详情:https://work.weixin.qq.com/api/doc#90000/90135/90201 :param id: 部门 id :param status: 0 获取全部员工,1 获取已关注成员列表, 2 获取禁用成员列表,4 获取未关注成员列表。可叠加 :param fetch_child: 1/0:是否递归获取子部门下面的成员 :param simple:...
wechatpy/enterprise/client/api/department.py
def get_users(self, id, status=0, fetch_child=0, simple=True): """ 获取部门成员:https://work.weixin.qq.com/api/doc#90000/90135/90200 获取部门成员详情:https://work.weixin.qq.com/api/doc#90000/90135/90201 :param id: 部门 id :param status: 0 获取全部员工,1 获取已关注成员列表, 2 获取禁用成员列表,4 ...
def get_users(self, id, status=0, fetch_child=0, simple=True): """ 获取部门成员:https://work.weixin.qq.com/api/doc#90000/90135/90200 获取部门成员详情:https://work.weixin.qq.com/api/doc#90000/90135/90201 :param id: 部门 id :param status: 0 获取全部员工,1 获取已关注成员列表, 2 获取禁用成员列表,4 ...
[ "获取部门成员:https", ":", "//", "work", ".", "weixin", ".", "qq", ".", "com", "/", "api", "/", "doc#90000", "/", "90135", "/", "90200", "获取部门成员详情:https", ":", "//", "work", ".", "weixin", ".", "qq", ".", "com", "/", "api", "/", "doc#90000", "/", "90135", ...
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/department.py#L83-L104
[ "def", "get_users", "(", "self", ",", "id", ",", "status", "=", "0", ",", "fetch_child", "=", "0", ",", "simple", "=", "True", ")", ":", "url", "=", "'user/simplelist'", "if", "simple", "else", "'user/list'", "res", "=", "self", ".", "_get", "(", "ur...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatBatch.sync_user
增量更新成员 https://work.weixin.qq.com/api/doc#90000/90135/90980 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 :param media_id: 上传的csv文件的media_id :param to_invite: 是否邀请新建的成员使用企业微信(将通过微信服务通知或短信或邮件下发邀请,...
wechatpy/enterprise/client/api/batch.py
def sync_user(self, url, token, encoding_aes_key, media_id, to_invite=True): """ 增量更新成员 https://work.weixin.qq.com/api/doc#90000/90135/90980 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 ...
def sync_user(self, url, token, encoding_aes_key, media_id, to_invite=True): """ 增量更新成员 https://work.weixin.qq.com/api/doc#90000/90135/90980 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 ...
[ "增量更新成员" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/batch.py#L19-L43
[ "def", "sync_user", "(", "self", ",", "url", ",", "token", ",", "encoding_aes_key", ",", "media_id", ",", "to_invite", "=", "True", ")", ":", "return", "self", ".", "_post", "(", "'batch/syncuser'", ",", "data", "=", "{", "'media_id'", ":", "media_id", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatBatch.replace_party
全量覆盖部门 https://work.weixin.qq.com/api/doc#90000/90135/90982 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 :param media_id: 上传的csv文件的media_id :return: 返回的 JSON 数据包
wechatpy/enterprise/client/api/batch.py
def replace_party(self, url, token, encoding_aes_key, media_id): """ 全量覆盖部门 https://work.weixin.qq.com/api/doc#90000/90135/90982 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 :param media...
def replace_party(self, url, token, encoding_aes_key, media_id): """ 全量覆盖部门 https://work.weixin.qq.com/api/doc#90000/90135/90982 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 :param media...
[ "全量覆盖部门" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/batch.py#L71-L93
[ "def", "replace_party", "(", "self", ",", "url", ",", "token", ",", "encoding_aes_key", ",", "media_id", ")", ":", "return", "self", ".", "_post", "(", "'batch/replaceparty'", ",", "data", "=", "{", "'media_id'", ":", "media_id", ",", "'callback'", ":", "{...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatBatch.invite
邀请成员 https://work.weixin.qq.com/api/doc#90000/90135/90975 企业可通过接口批量邀请成员使用企业微信,邀请后将通过短信或邮件下发通知。 :param user: 成员ID列表, 最多支持1000个。 :param party: 成员ID列表, 最多支持100个。 :param tag: 成员ID列表, 最多支持100个。 :return: 返回的 JSON 数据包
wechatpy/enterprise/client/api/batch.py
def invite(self, user=None, party=None, tag=None): """ 邀请成员 https://work.weixin.qq.com/api/doc#90000/90135/90975 企业可通过接口批量邀请成员使用企业微信,邀请后将通过短信或邮件下发通知。 :param user: 成员ID列表, 最多支持1000个。 :param party: 成员ID列表, 最多支持100个。 :param tag: 成员ID列表, 最多支持100个。 :return: ...
def invite(self, user=None, party=None, tag=None): """ 邀请成员 https://work.weixin.qq.com/api/doc#90000/90135/90975 企业可通过接口批量邀请成员使用企业微信,邀请后将通过短信或邮件下发通知。 :param user: 成员ID列表, 最多支持1000个。 :param party: 成员ID列表, 最多支持100个。 :param tag: 成员ID列表, 最多支持100个。 :return: ...
[ "邀请成员" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/batch.py#L106-L120
[ "def", "invite", "(", "self", ",", "user", "=", "None", ",", "party", "=", "None", ",", "tag", "=", "None", ")", ":", "data", "=", "optionaldict", "(", "user", "=", "user", ",", "party", "=", "party", ",", "tag", "=", "tag", ")", "return", "self"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatBatch.invite_user
邀请成员关注(deprecated) https://qydev.weixin.qq.com/wiki/index.php?title=异步任务接口 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: 用于生成签名 :param encoding_aes_key: 用于消息体的加密,是AES密钥的Base64编码 :param user_ids: 可选,成员ID列表,多个接收者用‘|’分隔,最多支持1000个。 :param party_ids: 可选,部门ID...
wechatpy/enterprise/client/api/batch.py
def invite_user(self, url, token, encoding_aes_key, user_ids=None, party_ids=None, tag_ids=None, invite_tips=None): """ 邀请成员关注(deprecated) https://qydev.weixin.qq.com/wiki/index.php?title=异步任务接口 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: ...
def invite_user(self, url, token, encoding_aes_key, user_ids=None, party_ids=None, tag_ids=None, invite_tips=None): """ 邀请成员关注(deprecated) https://qydev.weixin.qq.com/wiki/index.php?title=异步任务接口 :param url: 企业应用接收企业微信推送请求的访问协议和地址,支持http或https协议 :param token: ...
[ "邀请成员关注", "(", "deprecated", ")", "https", ":", "//", "qydev", ".", "weixin", ".", "qq", ".", "com", "/", "wiki", "/", "index", ".", "php?title", "=", "异步任务接口" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/batch.py#L122-L153
[ "def", "invite_user", "(", "self", ",", "url", ",", "token", ",", "encoding_aes_key", ",", "user_ids", "=", "None", ",", "party_ids", "=", "None", ",", "tag_ids", "=", "None", ",", "invite_tips", "=", "None", ")", ":", "data", "=", "optionaldict", "(", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatGroup.create
创建分组 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param name: 分组名字(30个字符以内) :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secret') res = client.group.create('N...
wechatpy/client/api/group.py
def create(self, name): """ 创建分组 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param name: 分组名字(30个字符以内) :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secre...
def create(self, name): """ 创建分组 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param name: 分组名字(30个字符以内) :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secre...
[ "创建分组" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/group.py#L10-L32
[ "def", "create", "(", "self", ",", "name", ")", ":", "name", "=", "to_text", "(", "name", ")", "return", "self", ".", "_post", "(", "'groups/create'", ",", "data", "=", "{", "'group'", ":", "{", "'name'", ":", "name", "}", "}", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatGroup.get
查询所有分组或查询用户所在分组 ID 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param user_id: 用户 ID,提供时查询该用户所在分组,否则查询所有分组 :return: 所有分组列表或用户所在分组 ID 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secret') ...
wechatpy/client/api/group.py
def get(self, user_id=None): """ 查询所有分组或查询用户所在分组 ID 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param user_id: 用户 ID,提供时查询该用户所在分组,否则查询所有分组 :return: 所有分组列表或用户所在分组 ID 使用示例:: from wechatpy import WeChatClient ...
def get(self, user_id=None): """ 查询所有分组或查询用户所在分组 ID 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param user_id: 用户 ID,提供时查询该用户所在分组,否则查询所有分组 :return: 所有分组列表或用户所在分组 ID 使用示例:: from wechatpy import WeChatClient ...
[ "查询所有分组或查询用户所在分组", "ID" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/group.py#L34-L63
[ "def", "get", "(", "self", ",", "user_id", "=", "None", ")", ":", "if", "user_id", "is", "None", ":", "res", "=", "self", ".", "_get", "(", "'groups/get'", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'groups'", "]", ")", "else", ":...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatGroup.update
修改分组名 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param group_id: 分组id,由微信分配 :param name: 分组名字(30个字符以内) :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secret') ...
wechatpy/client/api/group.py
def update(self, group_id, name): """ 修改分组名 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param group_id: 分组id,由微信分配 :param name: 分组名字(30个字符以内) :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient ...
def update(self, group_id, name): """ 修改分组名 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param group_id: 分组id,由微信分配 :param name: 分组名字(30个字符以内) :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient ...
[ "修改分组名" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/group.py#L65-L93
[ "def", "update", "(", "self", ",", "group_id", ",", "name", ")", ":", "name", "=", "to_text", "(", "name", ")", "return", "self", ".", "_post", "(", "'groups/update'", ",", "data", "=", "{", "'group'", ":", "{", "'id'", ":", "int", "(", "group_id", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatGroup.move_user
移动用户分组 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param user_id: 用户 ID, 可以是单个或者列表,为列表时为批量移动用户分组 :param group_id: 分组 ID :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid...
wechatpy/client/api/group.py
def move_user(self, user_id, group_id): """ 移动用户分组 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param user_id: 用户 ID, 可以是单个或者列表,为列表时为批量移动用户分组 :param group_id: 分组 ID :return: 返回的 JSON 数据包 使用示例:: from wechatpy i...
def move_user(self, user_id, group_id): """ 移动用户分组 详情请参考 http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html :param user_id: 用户 ID, 可以是单个或者列表,为列表时为批量移动用户分组 :param group_id: 分组 ID :return: 返回的 JSON 数据包 使用示例:: from wechatpy i...
[ "移动用户分组" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/group.py#L95-L121
[ "def", "move_user", "(", "self", ",", "user_id", ",", "group_id", ")", ":", "data", "=", "{", "'to_groupid'", ":", "group_id", "}", "if", "isinstance", "(", "user_id", ",", "(", "tuple", ",", "list", ")", ")", ":", "endpoint", "=", "'groups/members/batch...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
check_signature
Check WeChat callback signature, raises InvalidSignatureException if check failed. :param token: WeChat callback token :param signature: WeChat callback signature sent by WeChat server :param timestamp: WeChat callback timestamp sent by WeChat server :param nonce: WeChat callback nonce sent by WeCh...
wechatpy/utils.py
def check_signature(token, signature, timestamp, nonce): """Check WeChat callback signature, raises InvalidSignatureException if check failed. :param token: WeChat callback token :param signature: WeChat callback signature sent by WeChat server :param timestamp: WeChat callback timestamp sent by We...
def check_signature(token, signature, timestamp, nonce): """Check WeChat callback signature, raises InvalidSignatureException if check failed. :param token: WeChat callback token :param signature: WeChat callback signature sent by WeChat server :param timestamp: WeChat callback timestamp sent by We...
[ "Check", "WeChat", "callback", "signature", "raises", "InvalidSignatureException", "if", "check", "failed", "." ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L59-L73
[ "def", "check_signature", "(", "token", ",", "signature", ",", "timestamp", ",", "nonce", ")", ":", "signer", "=", "WeChatSigner", "(", ")", "signer", ".", "add_data", "(", "token", ",", "timestamp", ",", "nonce", ")", "if", "signer", ".", "signature", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
to_text
Convert value to unicode, default encoding is utf-8 :param value: Value to be converted :param encoding: Desired encoding
wechatpy/utils.py
def to_text(value, encoding='utf-8'): """Convert value to unicode, default encoding is utf-8 :param value: Value to be converted :param encoding: Desired encoding """ if not value: return '' if isinstance(value, six.text_type): return value if isinstance(value, six.binary_ty...
def to_text(value, encoding='utf-8'): """Convert value to unicode, default encoding is utf-8 :param value: Value to be converted :param encoding: Desired encoding """ if not value: return '' if isinstance(value, six.text_type): return value if isinstance(value, six.binary_ty...
[ "Convert", "value", "to", "unicode", "default", "encoding", "is", "utf", "-", "8" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L76-L88
[ "def", "to_text", "(", "value", ",", "encoding", "=", "'utf-8'", ")", ":", "if", "not", "value", ":", "return", "''", "if", "isinstance", "(", "value", ",", "six", ".", "text_type", ")", ":", "return", "value", "if", "isinstance", "(", "value", ",", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
to_binary
Convert value to binary string, default encoding is utf-8 :param value: Value to be converted :param encoding: Desired encoding
wechatpy/utils.py
def to_binary(value, encoding='utf-8'): """Convert value to binary string, default encoding is utf-8 :param value: Value to be converted :param encoding: Desired encoding """ if not value: return b'' if isinstance(value, six.binary_type): return value if isinstance(value, si...
def to_binary(value, encoding='utf-8'): """Convert value to binary string, default encoding is utf-8 :param value: Value to be converted :param encoding: Desired encoding """ if not value: return b'' if isinstance(value, six.binary_type): return value if isinstance(value, si...
[ "Convert", "value", "to", "binary", "string", "default", "encoding", "is", "utf", "-", "8" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L91-L103
[ "def", "to_binary", "(", "value", ",", "encoding", "=", "'utf-8'", ")", ":", "if", "not", "value", ":", "return", "b''", "if", "isinstance", "(", "value", ",", "six", ".", "binary_type", ")", ":", "return", "value", "if", "isinstance", "(", "value", ",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
timezone
Try to get timezone using pytz or python-dateutil :param zone: timezone str :return: timezone tzinfo or None
wechatpy/utils.py
def timezone(zone): """Try to get timezone using pytz or python-dateutil :param zone: timezone str :return: timezone tzinfo or None """ try: import pytz return pytz.timezone(zone) except ImportError: pass try: from dateutil.tz import gettz return gett...
def timezone(zone): """Try to get timezone using pytz or python-dateutil :param zone: timezone str :return: timezone tzinfo or None """ try: import pytz return pytz.timezone(zone) except ImportError: pass try: from dateutil.tz import gettz return gett...
[ "Try", "to", "get", "timezone", "using", "pytz", "or", "python", "-", "dateutil" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L106-L121
[ "def", "timezone", "(", "zone", ")", ":", "try", ":", "import", "pytz", "return", "pytz", ".", "timezone", "(", "zone", ")", "except", "ImportError", ":", "pass", "try", ":", "from", "dateutil", ".", "tz", "import", "gettz", "return", "gettz", "(", "zo...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
get_querystring
Get Querystring information from uri. :param uri: uri :return: querystring info or {}
wechatpy/utils.py
def get_querystring(uri): """Get Querystring information from uri. :param uri: uri :return: querystring info or {} """ parts = urlparse.urlsplit(uri) return urlparse.parse_qs(parts.query)
def get_querystring(uri): """Get Querystring information from uri. :param uri: uri :return: querystring info or {} """ parts = urlparse.urlsplit(uri) return urlparse.parse_qs(parts.query)
[ "Get", "Querystring", "information", "from", "uri", "." ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L130-L137
[ "def", "get_querystring", "(", "uri", ")", ":", "parts", "=", "urlparse", ".", "urlsplit", "(", "uri", ")", "return", "urlparse", ".", "parse_qs", "(", "parts", ".", "query", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatSigner.add_data
Add data to signer
wechatpy/utils.py
def add_data(self, *args): """Add data to signer""" for data in args: self._data.append(to_binary(data))
def add_data(self, *args): """Add data to signer""" for data in args: self._data.append(to_binary(data))
[ "Add", "data", "to", "signer" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L46-L49
[ "def", "add_data", "(", "self", ",", "*", "args", ")", ":", "for", "data", "in", "args", ":", "self", ".", "_data", ".", "append", "(", "to_binary", "(", "data", ")", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatSigner.signature
Get data signature
wechatpy/utils.py
def signature(self): """Get data signature""" self._data.sort() str_to_sign = self._delimiter.join(self._data) return hashlib.sha1(str_to_sign).hexdigest()
def signature(self): """Get data signature""" self._data.sort() str_to_sign = self._delimiter.join(self._data) return hashlib.sha1(str_to_sign).hexdigest()
[ "Get", "data", "signature" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/utils.py#L52-L56
[ "def", "signature", "(", "self", ")", ":", "self", ".", "_data", ".", "sort", "(", ")", "str_to_sign", "=", "self", ".", "_delimiter", ".", "join", "(", "self", ".", "_data", ")", "return", "hashlib", ".", "sha1", "(", "str_to_sign", ")", ".", "hexdi...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.list_shops
获取门店列表 详情请参考 http://mp.weixin.qq.com/wiki/15/bcfb5d4578ea818b89913472cf2bbf8f.html :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :return: 返回的 JSON 数据包
wechatpy/client/api/wifi.py
def list_shops(self, page_index=1, page_size=20): """ 获取门店列表 详情请参考 http://mp.weixin.qq.com/wiki/15/bcfb5d4578ea818b89913472cf2bbf8f.html :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :return: 返回的 JSON 数据包 """ res = self...
def list_shops(self, page_index=1, page_size=20): """ 获取门店列表 详情请参考 http://mp.weixin.qq.com/wiki/15/bcfb5d4578ea818b89913472cf2bbf8f.html :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :return: 返回的 JSON 数据包 """ res = self...
[ "获取门店列表" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L13-L32
[ "def", "list_shops", "(", "self", ",", "page_index", "=", "1", ",", "page_size", "=", "20", ")", ":", "res", "=", "self", ".", "_post", "(", "'shop/list'", ",", "data", "=", "{", "'pageindex'", ":", "page_index", ",", "'pagesize'", ":", "page_size", ",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.get_shop
查询门店的WiFi信息 http://mp.weixin.qq.com/wiki/15/bcfb5d4578ea818b89913472cf2bbf8f.html :param shop_id: 门店 ID :return: 返回的 JSON 数据包
wechatpy/client/api/wifi.py
def get_shop(self, shop_id=0): """ 查询门店的WiFi信息 http://mp.weixin.qq.com/wiki/15/bcfb5d4578ea818b89913472cf2bbf8f.html :param shop_id: 门店 ID :return: 返回的 JSON 数据包 """ res = self._post( 'shop/get', data={ 'shop_id': shop_id, ...
def get_shop(self, shop_id=0): """ 查询门店的WiFi信息 http://mp.weixin.qq.com/wiki/15/bcfb5d4578ea818b89913472cf2bbf8f.html :param shop_id: 门店 ID :return: 返回的 JSON 数据包 """ res = self._post( 'shop/get', data={ 'shop_id': shop_id, ...
[ "查询门店的WiFi信息", "http", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki", "/", "15", "/", "bcfb5d4578ea818b89913472cf2bbf8f", ".", "html" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L34-L49
[ "def", "get_shop", "(", "self", ",", "shop_id", "=", "0", ")", ":", "res", "=", "self", ".", "_post", "(", "'shop/get'", ",", "data", "=", "{", "'shop_id'", ":", "shop_id", ",", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'dat...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.add_device
添加设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 门店 ID :param ssid: 无线网络设备的ssid。非认证公众号添加的ssid必需是“WX”开头(“WX”为大写字母), 认证公众号和第三方平台无此限制;所有ssid均不能包含中文字符 :param password: 无线网络设备的密码,大于8个字符,不能包含中文字符 :param bssi...
wechatpy/client/api/wifi.py
def add_device(self, shop_id, ssid, password, bssid): """ 添加设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 门店 ID :param ssid: 无线网络设备的ssid。非认证公众号添加的ssid必需是“WX”开头(“WX”为大写字母), 认证公众号和第三方平台无此限制;所有ssid均不能包含中...
def add_device(self, shop_id, ssid, password, bssid): """ 添加设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 门店 ID :param ssid: 无线网络设备的ssid。非认证公众号添加的ssid必需是“WX”开头(“WX”为大写字母), 认证公众号和第三方平台无此限制;所有ssid均不能包含中...
[ "添加设备" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L51-L73
[ "def", "add_device", "(", "self", ",", "shop_id", ",", "ssid", ",", "password", ",", "bssid", ")", ":", "return", "self", ".", "_post", "(", "'device/add'", ",", "data", "=", "{", "'shop_id'", ":", "shop_id", ",", "'ssid'", ":", "ssid", ",", "'password...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.list_devices
查询设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 可选,门店 ID :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :return: 返回的 JSON 数据包
wechatpy/client/api/wifi.py
def list_devices(self, shop_id=None, page_index=1, page_size=20): """ 查询设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 可选,门店 ID :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :retu...
def list_devices(self, shop_id=None, page_index=1, page_size=20): """ 查询设备 详情请参考 http://mp.weixin.qq.com/wiki/10/6232005bdc497f7cf8e19d4e843c70d2.html :param shop_id: 可选,门店 ID :param page_index: 可选,分页下标,默认从1开始 :param page_size: 可选,每页的个数,默认20个,最大20个 :retu...
[ "查询设备" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L75-L97
[ "def", "list_devices", "(", "self", ",", "shop_id", "=", "None", ",", "page_index", "=", "1", ",", "page_size", "=", "20", ")", ":", "data", "=", "optionaldict", "(", "shop_id", "=", "shop_id", ",", "pageindex", "=", "page_index", ",", "pagesize", "=", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.get_qrcode_url
获取物料二维码图片网址 详情请参考 http://mp.weixin.qq.com/wiki/7/fcd0378ef00617fc276be2b3baa80973.html :param shop_id: 门店 ID :param img_id: 物料样式编号:0-二维码,可用于自由设计宣传材料; 1-桌贴(二维码),100mm×100mm(宽×高),可直接张贴 :return: 二维码图片网址
wechatpy/client/api/wifi.py
def get_qrcode_url(self, shop_id, img_id): """ 获取物料二维码图片网址 详情请参考 http://mp.weixin.qq.com/wiki/7/fcd0378ef00617fc276be2b3baa80973.html :param shop_id: 门店 ID :param img_id: 物料样式编号:0-二维码,可用于自由设计宣传材料; 1-桌贴(二维码),100mm×100mm(宽×高),可直接张贴 :return: ...
def get_qrcode_url(self, shop_id, img_id): """ 获取物料二维码图片网址 详情请参考 http://mp.weixin.qq.com/wiki/7/fcd0378ef00617fc276be2b3baa80973.html :param shop_id: 门店 ID :param img_id: 物料样式编号:0-二维码,可用于自由设计宣传材料; 1-桌贴(二维码),100mm×100mm(宽×高),可直接张贴 :return: ...
[ "获取物料二维码图片网址" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L111-L131
[ "def", "get_qrcode_url", "(", "self", ",", "shop_id", ",", "img_id", ")", ":", "res", "=", "self", ".", "_post", "(", "'qrcode/get'", ",", "data", "=", "{", "'shop_id'", ":", "shop_id", ",", "'img_id'", ":", "img_id", ",", "}", ",", "result_processor", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.set_homepage
设置商家主页 详情请参考 http://mp.weixin.qq.com/wiki/6/2732f3cf83947e0e4971aa8797ee9d6a.html :param shop_id: 门店 ID :param template_id: 模板ID,0-默认模板,1-自定义url :param url: 自定义链接,当template_id为1时必填 :return: 返回的 JSON 数据包
wechatpy/client/api/wifi.py
def set_homepage(self, shop_id, template_id, url=None): """ 设置商家主页 详情请参考 http://mp.weixin.qq.com/wiki/6/2732f3cf83947e0e4971aa8797ee9d6a.html :param shop_id: 门店 ID :param template_id: 模板ID,0-默认模板,1-自定义url :param url: 自定义链接,当template_id为1时必填 :return: 返回的 ...
def set_homepage(self, shop_id, template_id, url=None): """ 设置商家主页 详情请参考 http://mp.weixin.qq.com/wiki/6/2732f3cf83947e0e4971aa8797ee9d6a.html :param shop_id: 门店 ID :param template_id: 模板ID,0-默认模板,1-自定义url :param url: 自定义链接,当template_id为1时必填 :return: 返回的 ...
[ "设置商家主页" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L133-L151
[ "def", "set_homepage", "(", "self", ",", "shop_id", ",", "template_id", ",", "url", "=", "None", ")", ":", "data", "=", "{", "'shop_id'", ":", "shop_id", ",", "'template_id'", ":", "template_id", ",", "}", "if", "url", ":", "data", "[", "'struct'", "]"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.get_homepage
查询商家主页 详情请参考 http://mp.weixin.qq.com/wiki/6/2732f3cf83947e0e4971aa8797ee9d6a.html :param shop_id: 门店 ID :return: 返回的 JSON 数据包
wechatpy/client/api/wifi.py
def get_homepage(self, shop_id): """ 查询商家主页 详情请参考 http://mp.weixin.qq.com/wiki/6/2732f3cf83947e0e4971aa8797ee9d6a.html :param shop_id: 门店 ID :return: 返回的 JSON 数据包 """ res = self._post( 'homepage/get', data={'shop_id': shop_id}, ...
def get_homepage(self, shop_id): """ 查询商家主页 详情请参考 http://mp.weixin.qq.com/wiki/6/2732f3cf83947e0e4971aa8797ee9d6a.html :param shop_id: 门店 ID :return: 返回的 JSON 数据包 """ res = self._post( 'homepage/get', data={'shop_id': shop_id}, ...
[ "查询商家主页" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L153-L168
[ "def", "get_homepage", "(", "self", ",", "shop_id", ")", ":", "res", "=", "self", ".", "_post", "(", "'homepage/get'", ",", "data", "=", "{", "'shop_id'", ":", "shop_id", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'data'", "]", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWiFi.list_statistics
Wi-Fi数据统计 详情请参考 http://mp.weixin.qq.com/wiki/8/dfa2b756b66fca5d9b1211bc18812698.html :param begin_date: 起始日期时间,最长时间跨度为30天 :param end_date: 结束日期时间戳,最长时间跨度为30天 :param shop_id: 可选,门店 ID,按门店ID搜索,-1为总统计 :return: 返回的 JSON 数据包
wechatpy/client/api/wifi.py
def list_statistics(self, begin_date, end_date, shop_id=-1): """ Wi-Fi数据统计 详情请参考 http://mp.weixin.qq.com/wiki/8/dfa2b756b66fca5d9b1211bc18812698.html :param begin_date: 起始日期时间,最长时间跨度为30天 :param end_date: 结束日期时间戳,最长时间跨度为30天 :param shop_id: 可选,门店 ID,按门店ID搜索,-1为总统计...
def list_statistics(self, begin_date, end_date, shop_id=-1): """ Wi-Fi数据统计 详情请参考 http://mp.weixin.qq.com/wiki/8/dfa2b756b66fca5d9b1211bc18812698.html :param begin_date: 起始日期时间,最长时间跨度为30天 :param end_date: 结束日期时间戳,最长时间跨度为30天 :param shop_id: 可选,门店 ID,按门店ID搜索,-1为总统计...
[ "Wi", "-", "Fi数据统计" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wifi.py#L170-L195
[ "def", "list_statistics", "(", "self", ",", "begin_date", ",", "end_date", ",", "shop_id", "=", "-", "1", ")", ":", "if", "isinstance", "(", "begin_date", ",", "(", "datetime", ",", "date", ")", ")", ":", "begin_date", "=", "begin_date", ".", "strftime",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatOAuth.authorize_url
构造网页授权链接 详情请参考 https://work.weixin.qq.com/api/doc#90000/90135/91022 :param redirect_uri: 授权后重定向的回调链接地址 :param state: 重定向后会带上 state 参数 :return: 返回的 JSON 数据包
wechatpy/enterprise/client/api/oauth.py
def authorize_url(self, redirect_uri, state=None): """ 构造网页授权链接 详情请参考 https://work.weixin.qq.com/api/doc#90000/90135/91022 :param redirect_uri: 授权后重定向的回调链接地址 :param state: 重定向后会带上 state 参数 :return: 返回的 JSON 数据包 """ redirect_uri = six.moves.urllib....
def authorize_url(self, redirect_uri, state=None): """ 构造网页授权链接 详情请参考 https://work.weixin.qq.com/api/doc#90000/90135/91022 :param redirect_uri: 授权后重定向的回调链接地址 :param state: 重定向后会带上 state 参数 :return: 返回的 JSON 数据包 """ redirect_uri = six.moves.urllib....
[ "构造网页授权链接", "详情请参考", "https", ":", "//", "work", ".", "weixin", ".", "qq", ".", "com", "/", "api", "/", "doc#90000", "/", "90135", "/", "91022" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/oauth.py#L12-L34
[ "def", "authorize_url", "(", "self", ",", "redirect_uri", ",", "state", "=", "None", ")", ":", "redirect_uri", "=", "six", ".", "moves", ".", "urllib", ".", "parse", ".", "quote", "(", "redirect_uri", ",", "safe", "=", "b''", ")", "url_list", "=", "[",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMicroPay.create
刷卡支付接口 :param device_info: 可选,终端设备号(商户自定义,如门店编号) :param body: 商品描述 :param detail: 可选,商品详情 :param attach: 可选,附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据 :param client_ip: 可选,APP和网页支付提交用户端ip,Native支付填调用微信支付API的机器IP :param out_trade_no: 可选,商户订单号,默认自动生成 :param total_fee...
wechatpy/pay/api/micropay.py
def create(self, body, total_fee, auth_code, client_ip=None, out_trade_no=None, detail=None, attach=None, fee_type='CNY', goods_tag=None, device_info=None, limit_pay=None): """ 刷卡支付接口 :param device_info: 可选,终端设备号(商户自定义,如门店编号) :param body: 商品描述 :param detail: 可选,商品详...
def create(self, body, total_fee, auth_code, client_ip=None, out_trade_no=None, detail=None, attach=None, fee_type='CNY', goods_tag=None, device_info=None, limit_pay=None): """ 刷卡支付接口 :param device_info: 可选,终端设备号(商户自定义,如门店编号) :param body: 商品描述 :param detail: 可选,商品详...
[ "刷卡支付接口", ":", "param", "device_info", ":", "可选,终端设备号", "(", "商户自定义,如门店编号", ")", ":", "param", "body", ":", "商品描述", ":", "param", "detail", ":", "可选,商品详情", ":", "param", "attach", ":", "可选,附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据", ":", "param", "client_ip", ":...
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/micropay.py#L11-L49
[ "def", "create", "(", "self", ",", "body", ",", "total_fee", ",", "auth_code", ",", "client_ip", "=", "None", ",", "out_trade_no", "=", "None", ",", "detail", "=", "None", ",", "attach", "=", "None", ",", "fee_type", "=", "'CNY'", ",", "goods_tag", "="...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.create
创建标签 :param name: 标签名(30个字符以内) :return: 返回的 JSON 数据包
wechatpy/client/api/tag.py
def create(self, name): """ 创建标签 :param name: 标签名(30个字符以内) :return: 返回的 JSON 数据包 """ name = to_text(name) return self._post( 'tags/create', data={'tag': {'name': name}}, result_processor=lambda x: x['tag'] )
def create(self, name): """ 创建标签 :param name: 标签名(30个字符以内) :return: 返回的 JSON 数据包 """ name = to_text(name) return self._post( 'tags/create', data={'tag': {'name': name}}, result_processor=lambda x: x['tag'] )
[ "创建标签" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L10-L23
[ "def", "create", "(", "self", ",", "name", ")", ":", "name", "=", "to_text", "(", "name", ")", "return", "self", ".", "_post", "(", "'tags/create'", ",", "data", "=", "{", "'tag'", ":", "{", "'name'", ":", "name", "}", "}", ",", "result_processor", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.update
编辑标签 :param tag_id: 标签id,由微信分配 :param name: 标签名字(30个字符以内) :return: 返回的 JSON 数据包
wechatpy/client/api/tag.py
def update(self, tag_id, name): """ 编辑标签 :param tag_id: 标签id,由微信分配 :param name: 标签名字(30个字符以内) :return: 返回的 JSON 数据包 """ name = to_text(name) return self._post( 'tags/update', data={ 'tag': { 'id...
def update(self, tag_id, name): """ 编辑标签 :param tag_id: 标签id,由微信分配 :param name: 标签名字(30个字符以内) :return: 返回的 JSON 数据包 """ name = to_text(name) return self._post( 'tags/update', data={ 'tag': { 'id...
[ "编辑标签" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L40-L58
[ "def", "update", "(", "self", ",", "tag_id", ",", "name", ")", ":", "name", "=", "to_text", "(", "name", ")", "return", "self", ".", "_post", "(", "'tags/update'", ",", "data", "=", "{", "'tag'", ":", "{", "'id'", ":", "int", "(", "tag_id", ")", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.tag_user
批量为用户打标签 :param tag_id: 标签 ID :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包
wechatpy/client/api/tag.py
def tag_user(self, tag_id, user_id): """ 批量为用户打标签 :param tag_id: 标签 ID :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包 """ data = {'tagid': tag_id} if isinstance(user_id, (tuple, list)): data['openid_list'] = user_id else: ...
def tag_user(self, tag_id, user_id): """ 批量为用户打标签 :param tag_id: 标签 ID :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包 """ data = {'tagid': tag_id} if isinstance(user_id, (tuple, list)): data['openid_list'] = user_id else: ...
[ "批量为用户打标签" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L77-L92
[ "def", "tag_user", "(", "self", ",", "tag_id", ",", "user_id", ")", ":", "data", "=", "{", "'tagid'", ":", "tag_id", "}", "if", "isinstance", "(", "user_id", ",", "(", "tuple", ",", "list", ")", ")", ":", "data", "[", "'openid_list'", "]", "=", "us...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.get_user_tag
获取用户身上的标签列表 :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包
wechatpy/client/api/tag.py
def get_user_tag(self, user_id): """ 获取用户身上的标签列表 :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包 """ return self._post( 'tags/getidlist', data={ 'openid': user_id }, result_processor=lambda x: x['tagi...
def get_user_tag(self, user_id): """ 获取用户身上的标签列表 :param user_id: 用户 ID, 可以是单个或者列表 :return: 返回的 JSON 数据包 """ return self._post( 'tags/getidlist', data={ 'openid': user_id }, result_processor=lambda x: x['tagi...
[ "获取用户身上的标签列表" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L111-L124
[ "def", "get_user_tag", "(", "self", ",", "user_id", ")", ":", "return", "self", ".", "_post", "(", "'tags/getidlist'", ",", "data", "=", "{", "'openid'", ":", "user_id", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'tagid_list'", "]"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.get_tag_users
获取标签下粉丝列表 :param tag_id: 标签 ID :param first_user_id: 可选。第一个拉取的 OPENID,不填默认从头开始拉取 :return: 返回的 JSON 数据包
wechatpy/client/api/tag.py
def get_tag_users(self, tag_id, first_user_id=None): """ 获取标签下粉丝列表 :param tag_id: 标签 ID :param first_user_id: 可选。第一个拉取的 OPENID,不填默认从头开始拉取 :return: 返回的 JSON 数据包 """ data = { 'tagid': tag_id, } if first_user_id: data['next_op...
def get_tag_users(self, tag_id, first_user_id=None): """ 获取标签下粉丝列表 :param tag_id: 标签 ID :param first_user_id: 可选。第一个拉取的 OPENID,不填默认从头开始拉取 :return: 返回的 JSON 数据包 """ data = { 'tagid': tag_id, } if first_user_id: data['next_op...
[ "获取标签下粉丝列表" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L126-L142
[ "def", "get_tag_users", "(", "self", ",", "tag_id", ",", "first_user_id", "=", "None", ")", ":", "data", "=", "{", "'tagid'", ":", "tag_id", ",", "}", "if", "first_user_id", ":", "data", "[", "'next_openid'", "]", "=", "first_user_id", "return", "self", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.iter_tag_users
获取标签下粉丝openid列表 :return: 返回一个迭代器,可以用for进行循环,得到openid 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secret') for openid in client.tag.iter_tag_users(0): print(openid)
wechatpy/client/api/tag.py
def iter_tag_users(self, tag_id, first_user_id=None): """ 获取标签下粉丝openid列表 :return: 返回一个迭代器,可以用for进行循环,得到openid 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secret') for openid in client.tag.iter_tag_users(0): ...
def iter_tag_users(self, tag_id, first_user_id=None): """ 获取标签下粉丝openid列表 :return: 返回一个迭代器,可以用for进行循环,得到openid 使用示例:: from wechatpy import WeChatClient client = WeChatClient('appid', 'secret') for openid in client.tag.iter_tag_users(0): ...
[ "获取标签下粉丝openid列表" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L144-L167
[ "def", "iter_tag_users", "(", "self", ",", "tag_id", ",", "first_user_id", "=", "None", ")", ":", "while", "True", ":", "follower_data", "=", "self", ".", "get_tag_users", "(", "tag_id", ",", "first_user_id", ")", "if", "'data'", "not", "in", "follower_data"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTag.get_black_list
获取公众号的黑名单列表 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1471422259_pJMWA :param begin_openid: 起始的 OpenID,传空则默认从头开始拉取 :return: 返回的 JSON 数据包 :rtype: dict
wechatpy/client/api/tag.py
def get_black_list(self, begin_openid=None): """ 获取公众号的黑名单列表 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1471422259_pJMWA :param begin_openid: 起始的 OpenID,传空则默认从头开始拉取 :return: 返回的 JSON 数据包 :rtype: dict """ data = {} if begin_openid: ...
def get_black_list(self, begin_openid=None): """ 获取公众号的黑名单列表 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1471422259_pJMWA :param begin_openid: 起始的 OpenID,传空则默认从头开始拉取 :return: 返回的 JSON 数据包 :rtype: dict """ data = {} if begin_openid: ...
[ "获取公众号的黑名单列表", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki?id", "=", "mp1471422259_pJMWA" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/tag.py#L169-L185
[ "def", "get_black_list", "(", "self", ",", "begin_openid", "=", "None", ")", ":", "data", "=", "{", "}", "if", "begin_openid", ":", "data", "[", "'begin_openid'", "]", "=", "begin_openid", "return", "self", ".", "_post", "(", "'tags/members/getblacklist'", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.get_wxa_code
创建小程序码(接口A: 适用于需要的码数量较少的业务场景) 详情请参考 https://mp.weixin.qq.com/debug/wxadoc/dev/api/qrcode.html
wechatpy/client/api/wxa.py
def get_wxa_code(self, path, width=430, auto_color=False, line_color={"r": "0", "g": "0", "b": "0"}, is_hyaline=False): """ 创建小程序码(接口A: 适用于需要的码数量较少的业务场景) 详情请参考 https://mp.weixin.qq.co...
def get_wxa_code(self, path, width=430, auto_color=False, line_color={"r": "0", "g": "0", "b": "0"}, is_hyaline=False): """ 创建小程序码(接口A: 适用于需要的码数量较少的业务场景) 详情请参考 https://mp.weixin.qq.co...
[ "创建小程序码(接口A", ":", "适用于需要的码数量较少的业务场景)", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "debug", "/", "wxadoc", "/", "dev", "/", "api", "/", "qrcode", ".", "html" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L26-L46
[ "def", "get_wxa_code", "(", "self", ",", "path", ",", "width", "=", "430", ",", "auto_color", "=", "False", ",", "line_color", "=", "{", "\"r\"", ":", "\"0\"", ",", "\"g\"", ":", "\"0\"", ",", "\"b\"", ":", "\"0\"", "}", ",", "is_hyaline", "=", "Fals...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.get_wxa_code_unlimited
创建小程序码(接口B:适用于需要的码数量极多,或仅临时使用的业务场景) 详情请参考 https://mp.weixin.qq.com/debug/wxadoc/dev/api/qrcode.html
wechatpy/client/api/wxa.py
def get_wxa_code_unlimited(self, scene, width=430, auto_color=False, line_color={"r": "0", "g": "0", "b": "0"}, page=None, is_hyaline=...
def get_wxa_code_unlimited(self, scene, width=430, auto_color=False, line_color={"r": "0", "g": "0", "b": "0"}, page=None, is_hyaline=...
[ "创建小程序码(接口B:适用于需要的码数量极多,或仅临时使用的业务场景)", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "debug", "/", "wxadoc", "/", "dev", "/", "api", "/", "qrcode", ".", "html" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L48-L70
[ "def", "get_wxa_code_unlimited", "(", "self", ",", "scene", ",", "width", "=", "430", ",", "auto_color", "=", "False", ",", "line_color", "=", "{", "\"r\"", ":", "\"0\"", ",", "\"g\"", ":", "\"0\"", ",", "\"b\"", ":", "\"0\"", "}", ",", "page", "=", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.send_template_message
发送模板消息 详情请参考 https://mp.weixin.qq.com/debug/wxadoc/dev/api/notice.html
wechatpy/client/api/wxa.py
def send_template_message(self, user_id, template_id, data, form_id, page=None, color=None, emphasis_keyword=None): """ 发送模板消息 详情请参考 https://mp.weixin.qq.com/debug/wxadoc/dev/api/notice.html """ tpl_data = optionaldict( touser=user_id, template_id=...
def send_template_message(self, user_id, template_id, data, form_id, page=None, color=None, emphasis_keyword=None): """ 发送模板消息 详情请参考 https://mp.weixin.qq.com/debug/wxadoc/dev/api/notice.html """ tpl_data = optionaldict( touser=user_id, template_id=...
[ "发送模板消息", "详情请参考", "https", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "debug", "/", "wxadoc", "/", "dev", "/", "api", "/", "notice", ".", "html" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L72-L90
[ "def", "send_template_message", "(", "self", ",", "user_id", ",", "template_id", ",", "data", ",", "form_id", ",", "page", "=", "None", ",", "color", "=", "None", ",", "emphasis_keyword", "=", "None", ")", ":", "tpl_data", "=", "optionaldict", "(", "touser...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.modify_domain
修改小程序服务器授权域名 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489138143_WPbOO :param action: 增删改查的操作类型,仅支持 'add', 'delete', 'set', 'get' :param request_domain: request 合法域名 :param wsrequest_domain: socket 合法域名 :param upload_domain: upload fil...
wechatpy/client/api/wxa.py
def modify_domain(self, action, request_domain=(), wsrequest_domain=(), upload_domain=(), download_domain=()): """ 修改小程序服务器授权域名 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489138143_WPbOO :param action: 增删改查的操作类型,仅支持 'add', 'delete', 'set', 'get...
def modify_domain(self, action, request_domain=(), wsrequest_domain=(), upload_domain=(), download_domain=()): """ 修改小程序服务器授权域名 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489138143_WPbOO :param action: 增删改查的操作类型,仅支持 'add', 'delete', 'set', 'get...
[ "修改小程序服务器授权域名", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1489138143_WPbOO" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L92-L113
[ "def", "modify_domain", "(", "self", ",", "action", ",", "request_domain", "=", "(", ")", ",", "wsrequest_domain", "=", "(", ")", ",", "upload_domain", "=", "(", ")", ",", "download_domain", "=", "(", ")", ")", ":", "return", "self", ".", "_post", "(",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.commit
为授权的小程序账号上传小程序代码 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489140610_Uavc4 :param template_id: 代码库中的代码模板 ID :param ext_json: 第三方自定义的配置 :param version: 代码版本号,开发者可自定义 :param description: 代码描述,开发者可自定义
wechatpy/client/api/wxa.py
def commit(self, template_id, ext_json, version, description): """ 为授权的小程序账号上传小程序代码 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489140610_Uavc4 :param template_id: 代码库中的代码模板 ID :param ext_json: 第三方自定义的配置 :param version: 代码版本号,开发者...
def commit(self, template_id, ext_json, version, description): """ 为授权的小程序账号上传小程序代码 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489140610_Uavc4 :param template_id: 代码库中的代码模板 ID :param ext_json: 第三方自定义的配置 :param version: 代码版本号,开发者...
[ "为授权的小程序账号上传小程序代码", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1489140610_Uavc4" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L145-L164
[ "def", "commit", "(", "self", ",", "template_id", ",", "ext_json", ",", "version", ",", "description", ")", ":", "return", "self", ".", "_post", "(", "'wxa/commit'", ",", "data", "=", "{", "'template_id'", ":", "template_id", ",", "'ext_json'", ":", "ext_j...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.submit_audit
将第三方提交的代码包提交审核 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489140610_Uavc4 :param item_list: 提交审核项的一个列表(至少填写1项,至多填写5项) :type item_list: list[dict] :return: 审核编号 :rtype: int
wechatpy/client/api/wxa.py
def submit_audit(self, item_list): """ 将第三方提交的代码包提交审核 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489140610_Uavc4 :param item_list: 提交审核项的一个列表(至少填写1项,至多填写5项) :type item_list: list[dict] :return: 审核编号 :rtype: int "...
def submit_audit(self, item_list): """ 将第三方提交的代码包提交审核 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1489140610_Uavc4 :param item_list: 提交审核项的一个列表(至少填写1项,至多填写5项) :type item_list: list[dict] :return: 审核编号 :rtype: int "...
[ "将第三方提交的代码包提交审核", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1489140610_Uavc4" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L203-L220
[ "def", "submit_audit", "(", "self", ",", "item_list", ")", ":", "return", "self", ".", "_post", "(", "'wxa/submit_audit'", ",", "data", "=", "{", "'item_list'", ":", "item_list", ",", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'aud...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.list_templates
获取本账号内所有模板 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1500465446_j4CgR :param offset: 用于分页,表示起始量,最小值为0 :type offset: int :param count: 用于分页,表示拉取数量,最大值为20 :type count: int :return: 模板列表 :rtype: list[dict]
wechatpy/client/api/wxa.py
def list_templates(self, offset=0, count=20): """ 获取本账号内所有模板 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1500465446_j4CgR :param offset: 用于分页,表示起始量,最小值为0 :type offset: int :param count: 用于分页,表示拉取数量,最大值为20 :type count: int ...
def list_templates(self, offset=0, count=20): """ 获取本账号内所有模板 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1500465446_j4CgR :param offset: 用于分页,表示起始量,最小值为0 :type offset: int :param count: 用于分页,表示拉取数量,最大值为20 :type count: int ...
[ "获取本账号内所有模板", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1500465446_j4CgR" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L315-L335
[ "def", "list_templates", "(", "self", ",", "offset", "=", "0", ",", "count", "=", "20", ")", ":", "return", "self", ".", "_post", "(", "'cgi-bin/wxopen/template/list'", ",", "data", "=", "{", "'offset'", ":", "offset", ",", "'count'", ":", "count", ",", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.add_template
组合模板,并将其添加至账号下的模板列表里 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1500465446_j4CgR :param template_short_id: 模板标题ID :param keyword_id_list: 按照顺序排列的模板关键词列表,最多10个 :type keyword_id_list: list[int] :return: 模板ID
wechatpy/client/api/wxa.py
def add_template(self, template_short_id, keyword_id_list): """ 组合模板,并将其添加至账号下的模板列表里 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1500465446_j4CgR :param template_short_id: 模板标题ID :param keyword_id_list: 按照顺序排列的模板关键词列表,最多10个 :type ...
def add_template(self, template_short_id, keyword_id_list): """ 组合模板,并将其添加至账号下的模板列表里 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1500465446_j4CgR :param template_short_id: 模板标题ID :param keyword_id_list: 按照顺序排列的模板关键词列表,最多10个 :type ...
[ "组合模板,并将其添加至账号下的模板列表里", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1500465446_j4CgR" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L337-L355
[ "def", "add_template", "(", "self", ",", "template_short_id", ",", "keyword_id_list", ")", ":", "return", "self", ".", "_post", "(", "'cgi-bin/wxopen/template/add'", ",", "data", "=", "{", "'id'", ":", "template_short_id", ",", "'keyword_id_list'", ":", "keyword_i...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.create_open
创建开放平台账号,并绑定公众号/小程序 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1498704199_1bcax :param appid: 授权公众号或小程序的 appid :return: 开放平台的 appid
wechatpy/client/api/wxa.py
def create_open(self, appid): """ 创建开放平台账号,并绑定公众号/小程序 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1498704199_1bcax :param appid: 授权公众号或小程序的 appid :return: 开放平台的 appid """ return self._post( 'cgi-bin/open/create...
def create_open(self, appid): """ 创建开放平台账号,并绑定公众号/小程序 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1498704199_1bcax :param appid: 授权公众号或小程序的 appid :return: 开放平台的 appid """ return self._post( 'cgi-bin/open/create...
[ "创建开放平台账号,并绑定公众号", "/", "小程序", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1498704199_1bcax" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L372-L387
[ "def", "create_open", "(", "self", ",", "appid", ")", ":", "return", "self", ".", "_post", "(", "'cgi-bin/open/create'", ",", "data", "=", "{", "'appid'", ":", "appid", ",", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'open_appid'",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.get_open
获取公众号/小程序所绑定的开放平台账号 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1498704199_1bcax :param appid: 授权公众号或小程序的 appid :return: 开放平台的 appid
wechatpy/client/api/wxa.py
def get_open(self, appid): """ 获取公众号/小程序所绑定的开放平台账号 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1498704199_1bcax :param appid: 授权公众号或小程序的 appid :return: 开放平台的 appid """ return self._post( 'cgi-bin/open/get', ...
def get_open(self, appid): """ 获取公众号/小程序所绑定的开放平台账号 详情请参考 https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&id=open1498704199_1bcax :param appid: 授权公众号或小程序的 appid :return: 开放平台的 appid """ return self._post( 'cgi-bin/open/get', ...
[ "获取公众号", "/", "小程序所绑定的开放平台账号", "详情请参考", "https", ":", "//", "open", ".", "weixin", ".", "qq", ".", "com", "/", "cgi", "-", "bin", "/", "showdocument?action", "=", "dir_list&id", "=", "open1498704199_1bcax" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L389-L404
[ "def", "get_open", "(", "self", ",", "appid", ")", ":", "return", "self", ".", "_post", "(", "'cgi-bin/open/get'", ",", "data", "=", "{", "'appid'", ":", "appid", ",", "}", ",", "result_processor", "=", "lambda", "x", ":", "x", "[", "'open_appid'", "]"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatWxa.code_to_session
登录凭证校验。通过 wx.login() 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程。更多使用方法详见 小程序登录 详情请参考 https://developers.weixin.qq.com/miniprogram/dev/api/code2Session.html :param js_code: :return:
wechatpy/client/api/wxa.py
def code_to_session(self, js_code): """ 登录凭证校验。通过 wx.login() 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程。更多使用方法详见 小程序登录 详情请参考 https://developers.weixin.qq.com/miniprogram/dev/api/code2Session.html :param js_code: :return: """ return self._get( 'sns/j...
def code_to_session(self, js_code): """ 登录凭证校验。通过 wx.login() 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程。更多使用方法详见 小程序登录 详情请参考 https://developers.weixin.qq.com/miniprogram/dev/api/code2Session.html :param js_code: :return: """ return self._get( 'sns/j...
[ "登录凭证校验。通过", "wx", ".", "login", "()", "接口获得临时登录凭证", "code", "后传到开发者服务器调用此接口完成登录流程。更多使用方法详见", "小程序登录", "详情请参考", "https", ":", "//", "developers", ".", "weixin", ".", "qq", ".", "com", "/", "miniprogram", "/", "dev", "/", "api", "/", "code2Session", ".", "htm...
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/wxa.py#L440-L457
[ "def", "code_to_session", "(", "self", ",", "js_code", ")", ":", "return", "self", ".", "_get", "(", "'sns/jscode2session'", ",", "params", "=", "{", "'appid'", ":", "self", ".", "appid", ",", "'secret'", ":", "self", ".", "secret", ",", "'js_code'", ":"...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatSemantic.search
发送语义理解请求 详情请参考 http://mp.weixin.qq.com/wiki/0/0ce78b3c9524811fee34aba3e33f3448.html :param query: 输入文本串 :param category: 需要使用的服务类型,多个可传入列表 :param uid: 可选,用户唯一id(非开发者id),用户区分公众号下的不同用户(建议填入用户openid) :param latitude: 可选,纬度坐标,与经度同时传入;与城市二选一传入 :param longitude: 可选,经度坐...
wechatpy/client/api/semantic.py
def search(self, query, category, uid=None, latitude=None, longitude=None, city=None, region=None): """ 发送语义理解请求 详情请参考 http://mp.weixin.qq.com/wiki/0/0ce78b3c9524811fee34aba3e33f3448....
def search(self, query, category, uid=None, latitude=None, longitude=None, city=None, region=None): """ 发送语义理解请求 详情请参考 http://mp.weixin.qq.com/wiki/0/0ce78b3c9524811fee34aba3e33f3448....
[ "发送语义理解请求", "详情请参考", "http", ":", "//", "mp", ".", "weixin", ".", "qq", ".", "com", "/", "wiki", "/", "0", "/", "0ce78b3c9524811fee34aba3e33f3448", ".", "html" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/semantic.py#L10-L59
[ "def", "search", "(", "self", ",", "query", ",", "category", ",", "uid", "=", "None", ",", "latitude", "=", "None", ",", "longitude", "=", "None", ",", "city", "=", "None", ",", "region", "=", "None", ")", ":", "if", "isinstance", "(", "category", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatAgent.set
设置应用 https://work.weixin.qq.com/api/doc#90000/90135/90228 :param agent_id: 企业应用的id :param name: 企业应用名称,长度不超过32个utf8字符 :param description: 企业应用详情,长度为4至120个utf8字符 :param redirect_domain: 企业应用可信域名。注意:域名需通过所有权校验,否则jssdk功能将受限,此时返回错误码85005 :param logo_media_id: 企业应用头像的mediaid,...
wechatpy/enterprise/client/api/agent.py
def set(self, agent_id, name=None, description=None, redirect_domain=None, logo_media_id=None, report_location_flag=0, is_report_user=True, is_report_enter=True): """ 设置应用 https://work.weixin.qq.com/a...
def set(self, agent_id, name=None, description=None, redirect_domain=None, logo_media_id=None, report_location_flag=0, is_report_user=True, is_report_enter=True): """ 设置应用 https://work.weixin.qq.com/a...
[ "设置应用", "https", ":", "//", "work", ".", "weixin", ".", "qq", ".", "com", "/", "api", "/", "doc#90000", "/", "90135", "/", "90228" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/agent.py#L39-L74
[ "def", "set", "(", "self", ",", "agent_id", ",", "name", "=", "None", ",", "description", "=", "None", ",", "redirect_domain", "=", "None", ",", "logo_media_id", "=", "None", ",", "report_location_flag", "=", "0", ",", "is_report_user", "=", "True", ",", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatJSAPI.get_jsapi_signature
获取 JSAPI 签名 https://work.weixin.qq.com/api/doc#90001/90144/90539/签名算法/ :param noncestr: nonce string :param ticket: JS-SDK ticket :param timestamp: 时间戳 :param url: URL :return: 签名
wechatpy/enterprise/client/api/jsapi.py
def get_jsapi_signature(self, noncestr, ticket, timestamp, url): """ 获取 JSAPI 签名 https://work.weixin.qq.com/api/doc#90001/90144/90539/签名算法/ :param noncestr: nonce string :param ticket: JS-SDK ticket :param timestamp: 时间戳 :param url: URL :return: 签名 ...
def get_jsapi_signature(self, noncestr, ticket, timestamp, url): """ 获取 JSAPI 签名 https://work.weixin.qq.com/api/doc#90001/90144/90539/签名算法/ :param noncestr: nonce string :param ticket: JS-SDK ticket :param timestamp: 时间戳 :param url: URL :return: 签名 ...
[ "获取", "JSAPI", "签名" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/jsapi.py#L25-L45
[ "def", "get_jsapi_signature", "(", "self", ",", "noncestr", ",", "ticket", ",", "timestamp", ",", "url", ")", ":", "data", "=", "[", "'noncestr={noncestr}'", ".", "format", "(", "noncestr", "=", "noncestr", ")", ",", "'jsapi_ticket={ticket}'", ".", "format", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatJSAPI.get_jsapi_ticket
获取微信 JS-SDK ticket 该方法会通过 session 对象自动缓存管理 ticket :return: ticket
wechatpy/enterprise/client/api/jsapi.py
def get_jsapi_ticket(self): """ 获取微信 JS-SDK ticket 该方法会通过 session 对象自动缓存管理 ticket :return: ticket """ ticket_key = '{}_jsapi_ticket'.format(self._client.corp_id) expires_at_key = '{}_jsapi_ticket_expires_at'.format(self._client.corp_id) ticket = self.ses...
def get_jsapi_ticket(self): """ 获取微信 JS-SDK ticket 该方法会通过 session 对象自动缓存管理 ticket :return: ticket """ ticket_key = '{}_jsapi_ticket'.format(self._client.corp_id) expires_at_key = '{}_jsapi_ticket_expires_at'.format(self._client.corp_id) ticket = self.ses...
[ "获取微信", "JS", "-", "SDK", "ticket" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/jsapi.py#L57-L75
[ "def", "get_jsapi_ticket", "(", "self", ")", ":", "ticket_key", "=", "'{}_jsapi_ticket'", ".", "format", "(", "self", ".", "_client", ".", "corp_id", ")", "expires_at_key", "=", "'{}_jsapi_ticket_expires_at'", ".", "format", "(", "self", ".", "_client", ".", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatJSAPI.get_agent_jsapi_ticket
获取应用的jsapi_ticket 该方法会通过 session 对象自动缓存管理 ticket :return: ticket
wechatpy/enterprise/client/api/jsapi.py
def get_agent_jsapi_ticket(self): """ 获取应用的jsapi_ticket 该方法会通过 session 对象自动缓存管理 ticket :return: ticket """ ticket_key = '{}_agent_jsapi_ticket'.format(self._client.corp_id) expires_at_key = '{}_agent_jsapi_ticket_expires_at'.format(self._client.corp_id) ...
def get_agent_jsapi_ticket(self): """ 获取应用的jsapi_ticket 该方法会通过 session 对象自动缓存管理 ticket :return: ticket """ ticket_key = '{}_agent_jsapi_ticket'.format(self._client.corp_id) expires_at_key = '{}_agent_jsapi_ticket_expires_at'.format(self._client.corp_id) ...
[ "获取应用的jsapi_ticket" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/api/jsapi.py#L77-L95
[ "def", "get_agent_jsapi_ticket", "(", "self", ")", ":", "ticket_key", "=", "'{}_agent_jsapi_ticket'", ".", "format", "(", "self", ".", "_client", ".", "corp_id", ")", "expires_at_key", "=", "'{}_agent_jsapi_ticket_expires_at'", ".", "format", "(", "self", ".", "_c...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatRefund.apply
申请退款 :param total_fee: 订单总金额,单位为分 :param refund_fee: 退款总金额,单位为分 :param out_refund_no: 商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔 :param transaction_id: 可选,微信订单号 :param out_trade_no: 可选,商户系统内部的订单号,与 transaction_id 二选一 :param fee_type: 可选,货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY ...
wechatpy/pay/api/refund.py
def apply(self, total_fee, refund_fee, out_refund_no, transaction_id=None, out_trade_no=None, fee_type='CNY', op_user_id=None, device_info=None, refund_account='REFUND_SOURCE_UNSETTLED_FUNDS', notify_url=None): """ 申请退款 :param total_fee: 订单总金额,单位为分 ...
def apply(self, total_fee, refund_fee, out_refund_no, transaction_id=None, out_trade_no=None, fee_type='CNY', op_user_id=None, device_info=None, refund_account='REFUND_SOURCE_UNSETTLED_FUNDS', notify_url=None): """ 申请退款 :param total_fee: 订单总金额,单位为分 ...
[ "申请退款" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/refund.py#L9-L41
[ "def", "apply", "(", "self", ",", "total_fee", ",", "refund_fee", ",", "out_refund_no", ",", "transaction_id", "=", "None", ",", "out_trade_no", "=", "None", ",", "fee_type", "=", "'CNY'", ",", "op_user_id", "=", "None", ",", "device_info", "=", "None", ",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatRefund.query
查询退款 :param refund_id: 微信退款单号 :param out_refund_no: 商户退款单号 :param transaction_id: 微信订单号 :param out_trade_no: 商户系统内部的订单号 :param device_info: 可选,终端设备号 :return: 返回的结果数据
wechatpy/pay/api/refund.py
def query(self, refund_id=None, out_refund_no=None, transaction_id=None, out_trade_no=None, device_info=None): """ 查询退款 :param refund_id: 微信退款单号 :param out_refund_no: 商户退款单号 :param transaction_id: 微信订单号 :param out_trade_no: 商户系统内部的订单号 :param device_...
def query(self, refund_id=None, out_refund_no=None, transaction_id=None, out_trade_no=None, device_info=None): """ 查询退款 :param refund_id: 微信退款单号 :param out_refund_no: 商户退款单号 :param transaction_id: 微信订单号 :param out_trade_no: 商户系统内部的订单号 :param device_...
[ "查询退款" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/refund.py#L43-L63
[ "def", "query", "(", "self", ",", "refund_id", "=", "None", ",", "out_refund_no", "=", "None", ",", "transaction_id", "=", "None", ",", "out_trade_no", "=", "None", ",", "device_info", "=", "None", ")", ":", "data", "=", "{", "'appid'", ":", "self", "....
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.update
修改商品
wechatpy/client/api/merchant/__init__.py
def update(self, product_id, product_data): """修改商品""" product_data['product_id'] = product_id return self._post( 'merchant/update', data=product_data )
def update(self, product_id, product_data): """修改商品""" product_data['product_id'] = product_id return self._post( 'merchant/update', data=product_data )
[ "修改商品" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L45-L51
[ "def", "update", "(", "self", ",", "product_id", ",", "product_data", ")", ":", "product_data", "[", "'product_id'", "]", "=", "product_id", "return", "self", ".", "_post", "(", "'merchant/update'", ",", "data", "=", "product_data", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.add_stock
增加库存 :param product_id: 商品ID :param sku_info: sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 :param quantity: 增加的库存数量 :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def add_stock(self, product_id, sku_info, quantity): """ 增加库存 :param product_id: 商品ID :param sku_info: sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 :param quantity: 增加的库存数量 :return: 返回的 JSON 数据包 """ return self._post( 'merchant/stock/add'...
def add_stock(self, product_id, sku_info, quantity): """ 增加库存 :param product_id: 商品ID :param sku_info: sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 :param quantity: 增加的库存数量 :return: 返回的 JSON 数据包 """ return self._post( 'merchant/stock/add'...
[ "增加库存" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L123-L139
[ "def", "add_stock", "(", "self", ",", "product_id", ",", "sku_info", ",", "quantity", ")", ":", "return", "self", ".", "_post", "(", "'merchant/stock/add'", ",", "data", "=", "{", "\"product_id\"", ":", "product_id", ",", "\"sku_info\"", ":", "sku_info", ","...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.reduce_stock
减少库存 :param product_id: 商品ID :param sku_info: sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 :param quantity: 减少的库存数量 :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def reduce_stock(self, product_id, sku_info, quantity): """ 减少库存 :param product_id: 商品ID :param sku_info: sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 :param quantity: 减少的库存数量 :return: 返回的 JSON 数据包 """ return self._post( 'merchant/stock/r...
def reduce_stock(self, product_id, sku_info, quantity): """ 减少库存 :param product_id: 商品ID :param sku_info: sku信息,格式"id1:vid1;id2:vid2",如商品为统一规格,则此处赋值为空字符串即可 :param quantity: 减少的库存数量 :return: 返回的 JSON 数据包 """ return self._post( 'merchant/stock/r...
[ "减少库存" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L141-L157
[ "def", "reduce_stock", "(", "self", ",", "product_id", ",", "sku_info", ",", "quantity", ")", ":", "return", "self", ".", "_post", "(", "'merchant/stock/reduce'", ",", "data", "=", "{", "\"product_id\"", ":", "product_id", ",", "\"sku_info\"", ":", "sku_info",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.update_express
增加邮费模板 :param template_id: 邮费模板ID :param delivery_template: 邮费模板信息(字段说明详见增加邮费模板) :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def update_express(self, template_id, delivery_template): """ 增加邮费模板 :param template_id: 邮费模板ID :param delivery_template: 邮费模板信息(字段说明详见增加邮费模板) :return: 返回的 JSON 数据包 """ delivery_template['template_id'] = template_id return self._post( 'merchan...
def update_express(self, template_id, delivery_template): """ 增加邮费模板 :param template_id: 邮费模板ID :param delivery_template: 邮费模板信息(字段说明详见增加邮费模板) :return: 返回的 JSON 数据包 """ delivery_template['template_id'] = template_id return self._post( 'merchan...
[ "增加邮费模板" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L185-L197
[ "def", "update_express", "(", "self", ",", "template_id", ",", "delivery_template", ")", ":", "delivery_template", "[", "'template_id'", "]", "=", "template_id", "return", "self", ".", "_post", "(", "'merchant/express/update'", ",", "data", "=", "delivery_template",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.update_group_property
修改分组属性 :param group_id: 商品分组ID :param group_properties: 商品分组属性 :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def update_group_property(self, group_id, group_properties): """ 修改分组属性 :param group_id: 商品分组ID :param group_properties: 商品分组属性 :return: 返回的 JSON 数据包 """ group_properties['group_id'] = group_id return self._post( 'merchant/group/propertymod', ...
def update_group_property(self, group_id, group_properties): """ 修改分组属性 :param group_id: 商品分组ID :param group_properties: 商品分组属性 :return: 返回的 JSON 数据包 """ group_properties['group_id'] = group_id return self._post( 'merchant/group/propertymod', ...
[ "修改分组属性" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L250-L262
[ "def", "update_group_property", "(", "self", ",", "group_id", ",", "group_properties", ")", ":", "group_properties", "[", "'group_id'", "]", "=", "group_id", "return", "self", ".", "_post", "(", "'merchant/group/propertymod'", ",", "data", "=", "group_properties", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.update_group_product
修改分组商品 :param group_id: 商品分组ID :param product_data: 分组商品信息 :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def update_group_product(self, group_id, product_data): """ 修改分组商品 :param group_id: 商品分组ID :param product_data: 分组商品信息 :return: 返回的 JSON 数据包 """ product_data['group_id'] = group_id return self._post( 'merchant/group/productmod', da...
def update_group_product(self, group_id, product_data): """ 修改分组商品 :param group_id: 商品分组ID :param product_data: 分组商品信息 :return: 返回的 JSON 数据包 """ product_data['group_id'] = group_id return self._post( 'merchant/group/productmod', da...
[ "修改分组商品" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L264-L276
[ "def", "update_group_product", "(", "self", ",", "group_id", ",", "product_data", ")", ":", "product_data", "[", "'group_id'", "]", "=", "group_id", "return", "self", ".", "_post", "(", "'merchant/group/productmod'", ",", "data", "=", "product_data", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.update_shelf
修改货架 :param shelf_id: 货架ID :param shelf_data: 货架详情 :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def update_shelf(self, shelf_id, shelf_data): """ 修改货架 :param shelf_id: 货架ID :param shelf_data: 货架详情 :return: 返回的 JSON 数据包 """ shelf_data['shelf_id'] = shelf_id return self._post( 'merchant/shelf/mod', data=shelf_data )
def update_shelf(self, shelf_id, shelf_data): """ 修改货架 :param shelf_id: 货架ID :param shelf_data: 货架详情 :return: 返回的 JSON 数据包 """ shelf_data['shelf_id'] = shelf_id return self._post( 'merchant/shelf/mod', data=shelf_data )
[ "修改货架" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L328-L340
[ "def", "update_shelf", "(", "self", ",", "shelf_id", ",", "shelf_data", ")", ":", "shelf_data", "[", "'shelf_id'", "]", "=", "shelf_id", "return", "self", ".", "_post", "(", "'merchant/shelf/mod'", ",", "data", "=", "shelf_data", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.query_order
根据订单状态/创建时间获取订单详情 :param status: 订单状态(不带该字段-全部状态, 2-待发货, 3-已发货, 5-已完成, 8-维权中, ) :param begintime: 订单创建时间起始时间(不带该字段则不按照时间做筛选) :param endtime: 订单创建时间终止时间(不带该字段则不按照时间做筛选) :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def query_order(self, status=None, begintime=None, endtime=None): """ 根据订单状态/创建时间获取订单详情 :param status: 订单状态(不带该字段-全部状态, 2-待发货, 3-已发货, 5-已完成, 8-维权中, ) :param begintime: 订单创建时间起始时间(不带该字段则不按照时间做筛选) :param endtime: 订单创建时间终止时间(不带该字段则不按照时间做筛选) :return: 返回的 JSON 数据包 """...
def query_order(self, status=None, begintime=None, endtime=None): """ 根据订单状态/创建时间获取订单详情 :param status: 订单状态(不带该字段-全部状态, 2-待发货, 3-已发货, 5-已完成, 8-维权中, ) :param begintime: 订单创建时间起始时间(不带该字段则不按照时间做筛选) :param endtime: 订单创建时间终止时间(不带该字段则不按照时间做筛选) :return: 返回的 JSON 数据包 """...
[ "根据订单状态", "/", "创建时间获取订单详情" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L380-L396
[ "def", "query_order", "(", "self", ",", "status", "=", "None", ",", "begintime", "=", "None", ",", "endtime", "=", "None", ")", ":", "return", "self", ".", "_post", "(", "'merchant/order/getbyfilter'", ",", "data", "=", "{", "'status'", ":", "status", ",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMerchant.set_delivery
修改货架 :param order_id: 订单ID :param delivery_data: 商品物流信息 :return: 返回的 JSON 数据包
wechatpy/client/api/merchant/__init__.py
def set_delivery(self, order_id, delivery_data): """ 修改货架 :param order_id: 订单ID :param delivery_data: 商品物流信息 :return: 返回的 JSON 数据包 """ delivery_data['order_id'] = order_id return self._post( 'merchant/shelf/setdeliverymod', data=de...
def set_delivery(self, order_id, delivery_data): """ 修改货架 :param order_id: 订单ID :param delivery_data: 商品物流信息 :return: 返回的 JSON 数据包 """ delivery_data['order_id'] = order_id return self._post( 'merchant/shelf/setdeliverymod', data=de...
[ "修改货架" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/merchant/__init__.py#L398-L410
[ "def", "set_delivery", "(", "self", ",", "order_id", ",", "delivery_data", ")", ":", "delivery_data", "[", "'order_id'", "]", "=", "order_id", "return", "self", ".", "_post", "(", "'merchant/shelf/setdeliverymod'", ",", "data", "=", "delivery_data", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTools.short_url
长链接转短链接 :param long_url: 长链接 :return: 返回的结果数据
wechatpy/pay/api/tools.py
def short_url(self, long_url): """ 长链接转短链接 :param long_url: 长链接 :return: 返回的结果数据 """ data = { 'appid': self.appid, 'long_url': long_url, } return self._post('tools/shorturl', data=data)
def short_url(self, long_url): """ 长链接转短链接 :param long_url: 长链接 :return: 返回的结果数据 """ data = { 'appid': self.appid, 'long_url': long_url, } return self._post('tools/shorturl', data=data)
[ "长链接转短链接" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/tools.py#L10-L21
[ "def", "short_url", "(", "self", ",", "long_url", ")", ":", "data", "=", "{", "'appid'", ":", "self", ".", "appid", ",", "'long_url'", ":", "long_url", ",", "}", "return", "self", ".", "_post", "(", "'tools/shorturl'", ",", "data", "=", "data", ")" ]
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTools.download_bill
下载对账单 :param bill_date: 下载对账单的日期 :param bill_type: 账单类型,ALL,返回当日所有订单信息,默认值 SUCCESS,返回当日成功支付的订单, REFUND,返回当日退款订单, REVOKED,已撤销的订单 :param device_info: 微信支付分配的终端设备号,填写此字段,只下载该设备号的对账单 :return: 返回的结果数据
wechatpy/pay/api/tools.py
def download_bill(self, bill_date, bill_type='ALL', device_info=None): """ 下载对账单 :param bill_date: 下载对账单的日期 :param bill_type: 账单类型,ALL,返回当日所有订单信息,默认值 SUCCESS,返回当日成功支付的订单, REFUND,返回当日退款订单, REVOKED,已撤销的订单 ...
def download_bill(self, bill_date, bill_type='ALL', device_info=None): """ 下载对账单 :param bill_date: 下载对账单的日期 :param bill_type: 账单类型,ALL,返回当日所有订单信息,默认值 SUCCESS,返回当日成功支付的订单, REFUND,返回当日退款订单, REVOKED,已撤销的订单 ...
[ "下载对账单" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/tools.py#L23-L44
[ "def", "download_bill", "(", "self", ",", "bill_date", ",", "bill_type", "=", "'ALL'", ",", "device_info", "=", "None", ")", ":", "if", "isinstance", "(", "bill_date", ",", "(", "datetime", ",", "date", ")", ")", ":", "bill_date", "=", "bill_date", ".", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTools.download_fundflow
下载资金账单 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_18&index=7 :param bill_date: 下载对账单的日期 :param account_type: 账单的资金来源账户 Basic 基本账户 Operation 运营账户 Fees 手续费账户 :param tar_type: 非必传参数,固定值:...
wechatpy/pay/api/tools.py
def download_fundflow(self, bill_date, account_type='Basic', tar_type=None): """ 下载资金账单 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_18&index=7 :param bill_date: 下载对账单的日期 :param account_type: 账单的资金来源账户 Basic 基...
def download_fundflow(self, bill_date, account_type='Basic', tar_type=None): """ 下载资金账单 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_18&index=7 :param bill_date: 下载对账单的日期 :param account_type: 账单的资金来源账户 Basic 基...
[ "下载资金账单", "https", ":", "//", "pay", ".", "weixin", ".", "qq", ".", "com", "/", "wiki", "/", "doc", "/", "api", "/", "jsapi", ".", "php?chapter", "=", "9_18&index", "=", "7" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/tools.py#L46-L71
[ "def", "download_fundflow", "(", "self", ",", "bill_date", ",", "account_type", "=", "'Basic'", ",", "tar_type", "=", "None", ")", ":", "if", "isinstance", "(", "bill_date", ",", "(", "datetime", ",", "date", ")", ")", ":", "bill_date", "=", "bill_date", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatTools.auto_code_to_openid
授权码查询 openid 接口 :param auth_code: 扫码支付授权码,设备读取用户微信中的条码或者二维码信息 :return: 返回的结果数据
wechatpy/pay/api/tools.py
def auto_code_to_openid(self, auth_code): """ 授权码查询 openid 接口 :param auth_code: 扫码支付授权码,设备读取用户微信中的条码或者二维码信息 :return: 返回的结果数据 """ data = { 'appid': self.appid, 'auth_code': auth_code, } return self._post('tools/authcodetoopenid', da...
def auto_code_to_openid(self, auth_code): """ 授权码查询 openid 接口 :param auth_code: 扫码支付授权码,设备读取用户微信中的条码或者二维码信息 :return: 返回的结果数据 """ data = { 'appid': self.appid, 'auth_code': auth_code, } return self._post('tools/authcodetoopenid', da...
[ "授权码查询", "openid", "接口" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/pay/api/tools.py#L73-L84
[ "def", "auto_code_to_openid", "(", "self", ",", "auth_code", ")", ":", "data", "=", "{", "'appid'", ":", "self", ".", "appid", ",", "'auth_code'", ":", "auth_code", ",", "}", "return", "self", ".", "_post", "(", "'tools/authcodetoopenid'", ",", "data", "="...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatClient.fetch_access_token
Fetch access token
wechatpy/enterprise/client/__init__.py
def fetch_access_token(self): """ Fetch access token""" return self._fetch_access_token( url='https://qyapi.weixin.qq.com/cgi-bin/gettoken', params={ 'corpid': self.corp_id, 'corpsecret': self.secret } )
def fetch_access_token(self): """ Fetch access token""" return self._fetch_access_token( url='https://qyapi.weixin.qq.com/cgi-bin/gettoken', params={ 'corpid': self.corp_id, 'corpsecret': self.secret } )
[ "Fetch", "access", "token" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/enterprise/client/__init__.py#L40-L48
[ "def", "fetch_access_token", "(", "self", ")", ":", "return", "self", ".", "_fetch_access_token", "(", "url", "=", "'https://qyapi.weixin.qq.com/cgi-bin/gettoken'", ",", "params", "=", "{", "'corpid'", ":", "self", ".", "corp_id", ",", "'corpsecret'", ":", "self",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
parse_message
解析微信服务器推送的 XML 消息 :param xml: XML 消息 :return: 解析成功返回对应的消息或事件,否则返回 ``UnknownMessage``
wechatpy/parser.py
def parse_message(xml): """ 解析微信服务器推送的 XML 消息 :param xml: XML 消息 :return: 解析成功返回对应的消息或事件,否则返回 ``UnknownMessage`` """ if not xml: return message = xmltodict.parse(to_text(xml))['xml'] message_type = message['MsgType'].lower() event_type = None if message_type == 'event' o...
def parse_message(xml): """ 解析微信服务器推送的 XML 消息 :param xml: XML 消息 :return: 解析成功返回对应的消息或事件,否则返回 ``UnknownMessage`` """ if not xml: return message = xmltodict.parse(to_text(xml))['xml'] message_type = message['MsgType'].lower() event_type = None if message_type == 'event' o...
[ "解析微信服务器推送的", "XML", "消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/parser.py#L18-L52
[ "def", "parse_message", "(", "xml", ")", ":", "if", "not", "xml", ":", "return", "message", "=", "xmltodict", ".", "parse", "(", "to_text", "(", "xml", ")", ")", "[", "'xml'", "]", "message_type", "=", "message", "[", "'MsgType'", "]", ".", "lower", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_text
发送文本消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param content: 消息正文 :param account: 可选,客服账号 :return: 返回的 JSON 数据包 使用示例:: from wechatpy import WeChatClient ...
wechatpy/client/api/message.py
def send_text(self, user_id, content, account=None): """ 发送文本消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param content: 消息正文 :param account: 可选,客服账号 :return: 返回的 JSON 数据...
def send_text(self, user_id, content, account=None): """ 发送文本消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param content: 消息正文 :param account: 可选,客服账号 :return: 返回的 JSON 数据...
[ "发送文本消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L26-L51
[ "def", "send_text", "(", "self", ",", "user_id", ",", "content", ",", "account", "=", "None", ")", ":", "data", "=", "{", "'touser'", ":", "user_id", ",", "'msgtype'", ":", "'text'", ",", "'text'", ":", "{", "'content'", ":", "content", "}", "}", "re...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_image
发送图片消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 图片的媒体ID。 可以通过 :func:`upload_media` 上传。 :param account: 可选,客服账号 :return: 返回的 JSON 数据包 使用示例:: from we...
wechatpy/client/api/message.py
def send_image(self, user_id, media_id, account=None): """ 发送图片消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 图片的媒体ID。 可以通过 :func:`upload_media` 上传。 :param account:...
def send_image(self, user_id, media_id, account=None): """ 发送图片消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 图片的媒体ID。 可以通过 :func:`upload_media` 上传。 :param account:...
[ "发送图片消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L53-L80
[ "def", "send_image", "(", "self", ",", "user_id", ",", "media_id", ",", "account", "=", "None", ")", ":", "data", "=", "{", "'touser'", ":", "user_id", ",", "'msgtype'", ":", "'image'", ",", "'image'", ":", "{", "'media_id'", ":", "media_id", "}", "}",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_voice
发送语音消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 发送的语音的媒体ID。 可以通过 :func:`upload_media` 上传。 :param account: 可选,客服账号 :return: 返回的 JSON 数据包 使用示例:: from...
wechatpy/client/api/message.py
def send_voice(self, user_id, media_id, account=None): """ 发送语音消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 发送的语音的媒体ID。 可以通过 :func:`upload_media` 上传。 :param accou...
def send_voice(self, user_id, media_id, account=None): """ 发送语音消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 发送的语音的媒体ID。 可以通过 :func:`upload_media` 上传。 :param accou...
[ "发送语音消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L82-L109
[ "def", "send_voice", "(", "self", ",", "user_id", ",", "media_id", ",", "account", "=", "None", ")", ":", "data", "=", "{", "'touser'", ":", "user_id", ",", "'msgtype'", ":", "'voice'", ",", "'voice'", ":", "{", "'media_id'", ":", "media_id", "}", "}",...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_video
发送视频消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 发送的视频的媒体ID。 可以通过 :func:`upload_media` 上传。 :param title: 视频消息的标题 :param description: 视频消息的描述 :param account: 可选,客服...
wechatpy/client/api/message.py
def send_video(self, user_id, media_id, title=None, description=None, account=None): """ 发送视频消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 发送的视频的媒体ID。 可...
def send_video(self, user_id, media_id, title=None, description=None, account=None): """ 发送视频消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param media_id: 发送的视频的媒体ID。 可...
[ "发送视频消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L111-L146
[ "def", "send_video", "(", "self", ",", "user_id", ",", "media_id", ",", "title", "=", "None", ",", "description", "=", "None", ",", "account", "=", "None", ")", ":", "video_data", "=", "{", "'media_id'", ":", "media_id", ",", "}", "if", "title", ":", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_music
发送音乐消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param url: 音乐链接 :param hq_url: 高品质音乐链接,wifi环境优先使用该链接播放音乐 :param thumb_media_id: 缩略图的媒体ID。 可以通过 :func:`upload_media` 上传。 :param ti...
wechatpy/client/api/message.py
def send_music(self, user_id, url, hq_url, thumb_media_id, title=None, description=None, account=None): """ 发送音乐消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param url:...
def send_music(self, user_id, url, hq_url, thumb_media_id, title=None, description=None, account=None): """ 发送音乐消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param url:...
[ "发送音乐消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L148-L180
[ "def", "send_music", "(", "self", ",", "user_id", ",", "url", ",", "hq_url", ",", "thumb_media_id", ",", "title", "=", "None", ",", "description", "=", "None", ",", "account", "=", "None", ")", ":", "music_data", "=", "{", "'musicurl'", ":", "url", ","...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_articles
发送图文消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param articles: 一个包含至多10个图文的数组, 或者微信图文消息素材 media_id :param account: 可选,客服账号 :return: 返回的 JSON 数据包
wechatpy/client/api/message.py
def send_articles(self, user_id, articles, account=None): """ 发送图文消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param articles: 一个包含至多10个图文的数组, 或者微信图文消息素材 media_id :param account:...
def send_articles(self, user_id, articles, account=None): """ 发送图文消息 详情请参考 http://mp.weixin.qq.com/wiki/7/12a5a320ae96fecdf0e15cb06123de9f.html :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param articles: 一个包含至多10个图文的数组, 或者微信图文消息素材 media_id :param account:...
[ "发送图文消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L182-L218
[ "def", "send_articles", "(", "self", ",", "user_id", ",", "articles", ",", "account", "=", "None", ")", ":", "if", "isinstance", "(", "articles", ",", "(", "tuple", ",", "list", ")", ")", ":", "articles_data", "=", "[", "]", "for", "article", "in", "...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_card
发送卡券消息 详情请参参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547 :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param card_id: 卡券 ID :param card_ext: 可选,卡券扩展信息 :param account: 可选,客服账号 :return: 返回的 JSON 数据包
wechatpy/client/api/message.py
def send_card(self, user_id, card_id, card_ext=None, account=None): """ 发送卡券消息 详情请参参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547 :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param card_id: 卡券 ID :param card_ext: 可选,卡券扩展信息 :pa...
def send_card(self, user_id, card_id, card_ext=None, account=None): """ 发送卡券消息 详情请参参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547 :param user_id: 用户 ID 。 就是你收到的 `Message` 的 source :param card_id: 卡券 ID :param card_ext: 可选,卡券扩展信息 :pa...
[ "发送卡券消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L220-L243
[ "def", "send_card", "(", "self", ",", "user_id", ",", "card_id", ",", "card_ext", "=", "None", ",", "account", "=", "None", ")", ":", "wxcard", "=", "{", "'card_id'", ":", "card_id", ",", "}", "if", "card_ext", ":", "wxcard", "[", "'card_ext'", "]", ...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_mini_program_page
发送小程序卡片(要求小程序与公众号已关联) 详情请参参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547 :param user_id: 用户 ID openid :param miniprogrampage: 小程序卡片信息 :param account: 可选,客服账号 :return: 返回的 JSON 数据包
wechatpy/client/api/message.py
def send_mini_program_page(self, user_id, miniprogrampage, account=None): """发送小程序卡片(要求小程序与公众号已关联) 详情请参参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547 :param user_id: 用户 ID openid :param miniprogrampage: 小程序卡片信息 :param account: 可选,客服账号 :retu...
def send_mini_program_page(self, user_id, miniprogrampage, account=None): """发送小程序卡片(要求小程序与公众号已关联) 详情请参参考 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547 :param user_id: 用户 ID openid :param miniprogrampage: 小程序卡片信息 :param account: 可选,客服账号 :retu...
[ "发送小程序卡片(要求小程序与公众号已关联)" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L245-L261
[ "def", "send_mini_program_page", "(", "self", ",", "user_id", ",", "miniprogrampage", ",", "account", "=", "None", ")", ":", "data", "=", "{", "'touser'", ":", "user_id", ",", "'msgtype'", ":", "'miniprogrampage'", ",", "'miniprogrampage'", ":", "miniprogrampage...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_mass_text
群发文本消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型数字时为按分组群发,值为列表/元组时为按 OpenID 列表群发 当 is_to_all 为 True 时,传入 None 即对所有用户发送。 :param content: 消息正文 :param is_to_all: 用于设定是否向全部用户发送,值为true或false,选择true该消息群发给所有用户 ...
wechatpy/client/api/message.py
def send_mass_text(self, group_or_users, content, is_to_all=False, preview=False, send_ignore_reprint=0, client_msg_id=None): """ 群发文本消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型数字时为按分组群发,...
def send_mass_text(self, group_or_users, content, is_to_all=False, preview=False, send_ignore_reprint=0, client_msg_id=None): """ 群发文本消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型数字时为按分组群发,...
[ "群发文本消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L327-L366
[ "def", "send_mass_text", "(", "self", ",", "group_or_users", ",", "content", ",", "is_to_all", "=", "False", ",", "preview", "=", "False", ",", "send_ignore_reprint", "=", "0", ",", "client_msg_id", "=", "None", ")", ":", "return", "self", ".", "_send_mass_m...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_mass_video
群发视频消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型数字时为按分组群发,值为列表/元组时为按 OpenID 列表群发 当 is_to_all 为 True 时,传入 None 即对所有用户发送。 :param media_id: 视频的媒体 ID。可以通过 :func:`upload_video` 上传。 :param title: 视频标题 ...
wechatpy/client/api/message.py
def send_mass_video(self, group_or_users, media_id, title=None, description=None, is_to_all=False, preview=False, send_ignore_reprint=0, client_msg_id=None): """ 群发视频消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :pa...
def send_mass_video(self, group_or_users, media_id, title=None, description=None, is_to_all=False, preview=False, send_ignore_reprint=0, client_msg_id=None): """ 群发视频消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :pa...
[ "群发视频消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L450-L496
[ "def", "send_mass_video", "(", "self", ",", "group_or_users", ",", "media_id", ",", "title", "=", "None", ",", "description", "=", "None", ",", "is_to_all", "=", "False", ",", "preview", "=", "False", ",", "send_ignore_reprint", "=", "0", ",", "client_msg_id...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa
train
WeChatMessage.send_mass_article
群发图文消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型数字时为按分组群发,值为列表/元组时为按 OpenID 列表群发 当 is_to_all 为 True 时,传入 None 即对所有用户发送。 :param media_id: 图文的媒体 ID。可以通过 :func:`upload_articles` 上传。 :param is_to_all: 用于设定是否...
wechatpy/client/api/message.py
def send_mass_article(self, group_or_users, media_id, is_to_all=False, preview=False, send_ignore_reprint=0, client_msg_id=None): """ 群发图文消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型...
def send_mass_article(self, group_or_users, media_id, is_to_all=False, preview=False, send_ignore_reprint=0, client_msg_id=None): """ 群发图文消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型...
[ "群发图文消息" ]
jxtech/wechatpy
python
https://github.com/jxtech/wechatpy/blob/4df0da795618c0895a10f1c2cde9e9d5c0a93aaa/wechatpy/client/api/message.py#L498-L537
[ "def", "send_mass_article", "(", "self", ",", "group_or_users", ",", "media_id", ",", "is_to_all", "=", "False", ",", "preview", "=", "False", ",", "send_ignore_reprint", "=", "0", ",", "client_msg_id", "=", "None", ")", ":", "return", "self", ".", "_send_ma...
4df0da795618c0895a10f1c2cde9e9d5c0a93aaa