Total Complexity | 2 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Coverage | 50% |
1 | # -*- coding: utf-8 -*- |
||
6 | 10 | class MerchantCommon(BaseWeChatAPI): |
|
7 | |||
8 | 10 | def upload_image(self, filename, image_data): |
|
9 | res = self._post( |
||
10 | 'merchant/common/upload_img', |
||
11 | params={ |
||
12 | 'filename': filename |
||
13 | }, |
||
14 | data=image_data, |
||
15 | result_processor=lambda x: x['image_url'] |
||
16 | ) |
||
17 | return res |
||
18 |