群发卡券消息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 :param group_or_users: 值为整型数字时为按分组群发,值为列表/元组时为按 OpenID 列表群发 当 is_to_all 为 True 时,传入 None 即对所有用户发送。 :param card_id: 卡券 ID :param is_to_all: 用于设定是否向全部用户发送,
(self, group_or_users, card_id,
is_to_all=False, preview=False,
send_ignore_reprint=0, client_msg_id=None)
| 631 | return self._get('get_current_autoreply_info') |
| 632 | |
| 633 | def send_mass_card(self, group_or_users, card_id, |
| 634 | is_to_all=False, preview=False, |
| 635 | send_ignore_reprint=0, client_msg_id=None): |
| 636 | """ |
| 637 | 群发卡券消息 |
| 638 | |
| 639 | 详情请参考 |
| 640 | https://mp.weixin.qq.com/wiki?id=mp1481187827_i0l21 |
| 641 | |
| 642 | :param group_or_users: 值为整型数字时为按分组群发,值为列表/元组时为按 OpenID 列表群发 |
| 643 | 当 is_to_all 为 True 时,传入 None 即对所有用户发送。 |
| 644 | :param card_id: 卡券 ID |
| 645 | :param is_to_all: 用于设定是否向全部用户发送,值为true或false,选择true该消息群发给所有用户 |
| 646 | 选择false可根据group_id发送给指定群组的用户 |
| 647 | :type is_to_all: bool |
| 648 | :param preview: 是否发送预览,此时 group_or_users 参数应为一个openid字符串 |
| 649 | :type preview: bool |
| 650 | :param send_ignore_reprint: 指定待群发的文章被判定为转载时,是否继续群发。 |
| 651 | 当 send_ignore_reprint 参数设置为1时,文章被判定为转载时,且原创文允许转载时,将继续进行群发操作。 |
| 652 | 当 send_ignore_reprint 参数设置为0时,文章被判定为转载时,将停止群发操作。 |
| 653 | send_ignore_reprint 默认为0。 |
| 654 | :type send_ignore_reprint: int |
| 655 | :param client_msg_id: 开发者侧群发 msgid,长度限制 64 字节 |
| 656 | :type client_msg_id: str |
| 657 | |
| 658 | :return: 返回的 JSON 数据包 |
| 659 | """ |
| 660 | return self._send_mass_message( |
| 661 | group_or_users, |
| 662 | 'wxcard', |
| 663 | { |
| 664 | 'wxcard': { |
| 665 | 'card_id': card_id |
| 666 | } |
| 667 | }, |
| 668 | is_to_all, |
| 669 | preview, |
| 670 | send_ignore_reprint, |
| 671 | client_msg_id, |
| 672 | ) |
| 673 | |
| 674 | def get_subscribe_authorize_url(self, scene, template_id, redirect_url, reserved=None): |
| 675 | """ |