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