1234567891011121314151617181920212223242526272829303132333435363738394041 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- from __future__ import absolute_import, unicode_literals
- from library.wechatpy.client.api.base import BaseWeChatAPI
- class WeChatNewtmpl(BaseWeChatAPI):
- API_BASE_URL = 'https://api.weixin.qq.com/wxaapi/newtmpl/'
- pass
- def get_category(self):
- return self._get(
- 'getcategory'
- )
- def get_pub_template_title_list(self, ids, start, limit):
- params = {
- 'ids': ids,
- 'start': start,
- 'limit': limit,
- }
- return self._get(
- 'getpubtemplatetitles', params=params
- )
- def get_pub_template_key_words_by_id(self, tid):
- params = {
- 'tid': tid
- }
- return self._get(
- 'getpubtemplatekeywords', params=params
- )
- def get_template_list(self):
- return self._get(
- 'gettemplate'
- )
|