| Conditions | 2 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | |||
| 22 | def __init__(self, response, json_output=True, data=None): |
||
| 23 | self.raw = response |
||
| 24 | if json_output: |
||
| 25 | self.full_data = response.json() |
||
| 26 | self.meta = self.full_data['ocs']['meta'] |
||
| 27 | self.status_code = self.full_data['ocs']['meta']['statuscode'] |
||
| 28 | self.data = self.full_data['ocs']['data'] |
||
| 29 | else: |
||
| 30 | self.data = response.content.decode("UTF-8") |
||
| 31 | |||
| 34 |