2
2
# -*- coding: utf-8 -*-
3
3
4
4
import os
5
- import ujson
6
- import requests
7
5
8
6
from . import exceptions
9
- from .core .handler_response import SDHandlerResponse
10
7
from .core .requester import Requester
11
8
12
9
@@ -33,16 +30,6 @@ def __init__(
33
30
master_key , custom_key , read_key , write_key )
34
31
self ._api_key = self ._get_key ()[0 ]
35
32
self ._requester = Requester (use_ssl , timeout )
36
- self .__status_code = None
37
- self .__headers = None
38
-
39
- @property
40
- def status_code (self ):
41
- return self .__status_code
42
-
43
- @property
44
- def headers (self ):
45
- return self .__headers
46
33
47
34
@staticmethod
48
35
def _organize_keys (master_key , custom_key , read_key , write_key ):
@@ -122,24 +109,3 @@ async def _make_request(self, url, req_type, key_level, json_data=None,
122
109
123
110
status , result = await req
124
111
return result
125
-
126
- @staticmethod
127
- def _check_request (request ):
128
- """Check if the request was successful
129
-
130
- Keyword arguments:
131
- request -- A object request result
132
- """
133
- if request .status_code is not requests .codes .ok :
134
- raise exceptions .SlicingDiceHTTPError (
135
- "HTTP status code: {}" .format (request .status_code ))
136
- return True
137
-
138
- def _set_properties_values (self , sd_response ):
139
- """Set current status code and header request response in objects
140
-
141
- Keyword arguments:
142
- sd_response -- A request object
143
- """
144
- self .__status_code = int (sd_response .status_code )
145
- self .__headers = dict (sd_response .headers )
0 commit comments