优化工单模块,增加企微模块

This commit is contained in:
mgw
2024-07-10 15:58:47 +08:00
parent e8512b23e4
commit 6b140fe6dd
134 changed files with 12830 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
class BaseWeChatAPI(object):
API_BASE_URL = ''
""" WeChat API base class """
def __init__(self, client=None):
self._client = client
def _get(self, url, **kwargs):
if getattr(self, 'API_BASE_URL', None):
kwargs['api_base_url'] = self.API_BASE_URL
return self._client.get(url, **kwargs)
def _post(self, url, **kwargs):
if getattr(self, 'API_BASE_URL', None):
kwargs['api_base_url'] = self.API_BASE_URL
return self._client.post(url, **kwargs)
@property
def access_token(self):
return self._client.access_token
@property
def session(self):
return self._client.session