| Total Complexity | 6 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 45.45% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # -*- coding: utf-8 -*- |
||
| 6 | 10 | class MerchantCategory(BaseWeChatAPI): |
|
| 7 | |||
| 8 | 10 | API_BASE_URL = 'https://api.weixin.qq.com/' |
|
| 9 | |||
| 10 | 10 | def get_sub_categories(self, cate_id): |
|
| 11 | res = self._post( |
||
| 12 | 'merchant/category/getsub', |
||
| 13 | data={'cate_id': cate_id}, |
||
| 14 | result_processor=lambda x: x['cate_list'] |
||
| 15 | ) |
||
| 16 | return res |
||
| 17 | |||
| 18 | 10 | def get_sku_list(self, cate_id): |
|
| 19 | res = self._post( |
||
| 20 | 'merchant/category/getsku', |
||
| 21 | data={'cate_id': cate_id}, |
||
| 22 | result_processor=lambda x: x['sku_table'] |
||
| 23 | ) |
||
| 24 | return res |
||
| 25 | |||
| 26 | 10 | def get_properties(self, cate_id): |
|
| 27 | res = self._post( |
||
| 28 | 'merchant/category/getproperty', |
||
| 29 | data={'cate_id': cate_id}, |
||
| 30 | result_processor=lambda x: x['properties'] |
||
| 31 | ) |
||
| 32 | return res |
||
| 33 |