shakearound.py 694 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import, unicode_literals
  3. from wechatpy.client.api.base import BaseWeChatAPI
  4. class WeChatShakeAround(BaseWeChatAPI):
  5. def get_shake_info(self, ticket):
  6. """
  7. 获取摇周边的设备及用户信息
  8. https://qydev.weixin.qq.com/wiki/index.php?title=获取设备及用户信息
  9. :param ticket: 摇周边业务的ticket,可在摇到的 URL 中得到,ticket 生效时间为30分钟
  10. :return: 设备及用户信息
  11. """
  12. res = self._post(
  13. 'shakearound/getshakeinfo',
  14. data={
  15. 'ticket': ticket
  16. }
  17. )
  18. return res['data']