| Conditions | 2 |
| Total Lines | 19 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 33 | 10 | def get_wechat_ips(self): |
|
| 34 | """ |
||
| 35 | 获取微信服务器 IP 地址列表 |
||
| 36 | |||
| 37 | :return: IP 地址列表 |
||
| 38 | |||
| 39 | 使用示例:: |
||
| 40 | |||
| 41 | from wechatpy import WeChatClient |
||
| 42 | |||
| 43 | client = WeChatClient('appid', 'secret') |
||
| 44 | ips = client.misc.get_wechat_ips() |
||
| 45 | |||
| 46 | """ |
||
| 47 | 10 | res = self._get( |
|
| 48 | 'getcallbackip', |
||
| 49 | result_processor=lambda x: x['ip_list'] |
||
| 50 | ) |
||
| 51 | return res |
||
| 52 |