baseendpoint.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:betdaq 作者: rozzac90 项目源码 文件源码
def request(self, method, params, secure=False):
        """
        :param method: The endpoint to be requested.
        :param params: Params to be used in request.
        :param secure: Whether the method belongs to the secure or readonly service.
        """
        try:
            if secure:
                response = self.client.secure_client.service[method](params)
            else:
                response = self.client.readonly_client.service[method](params)
        except ConnectionError:
            raise APIError(None, method, params, 'ConnectionError')
        except Exception as e:
            raise APIError(None, method, params, e)
        data = serialize_object(response)
        check_status_code(data)
        return data
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号