From a077fc8b36fca982d8243a95bb16ce2a2e5ce17f Mon Sep 17 00:00:00 2001 From: Jakub Reczko Date: Sun, 12 Jun 2016 17:43:32 +0200 Subject: [PATCH] Extracted request wrapper to separated class --- voucherify/client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/voucherify/client.py b/voucherify/client.py index 4b9e7c5f..4960c181 100644 --- a/voucherify/client.py +++ b/voucherify/client.py @@ -11,7 +11,7 @@ TIMEOUT = 30 * 1000 -class Client(object): +class VoucherifyRequest(object): def __init__(self, application_id, client_secret_key): self.timeout = TIMEOUT self.headers = { @@ -47,6 +47,11 @@ def request(self, path, method='GET', **kwargs): return result + +class Client(VoucherifyRequest): + def __init__(self, *args, **kwargs): + super(Client, self).__init__(*args, **kwargs) + def list(self, query): path = '/vouchers/'