client_1c_timesheet/api.py
def parse(self) -> dict:
        """Return API response as dict. If the response encodes an API error, raise Exception

        Raises
        ------
        APIServer404:
            When the raw response describes an API code 404 exception
        APIServerException
            When the raw response describes any other API exception
        APIResponseParseException
            If the response cannot be parsed as JSON

        Returns
        -------
        Dict
            The parsed response

        """
        if self.raw_response.status_code in [200, 201]:
            if 'value' in self.parse_json(self.raw_response).keys():
                return self.parse_json(self.raw_response)['value']
            else:
                return self.parse_json(self.raw_response)
        else:
            error_response = self.parse_json_clockify_error(self.raw_response)
            msg = f"HTTP {self.raw_response.status_code} containing API error '{self.raw_response.text}'"
            if error_response.code == 404:
                raise APIServer404(msg, error_response=error_response)
            else:
                raise APIServerException(msg, error_response=error_response)
Return API response as dict. If the response encodes an API error, raise Exception

        Raises
        ------
        APIServer404:
            When the raw response describes an API code 404 exception
        APIServerException
            When the raw response describes any other API exception
        APIResponseParseException
            If the response cannot be parsed as JSON

        Returns
        -------
        Dict
            The parsed response

        
Return API response as dict. If the response encodes an API error, raise Exception
Raises

When the raw response describes an API code 404 exception
APIServerException
When the raw response describes any other API exception
APIResponseParseException
If the response cannot be parsed as JSON

Returns

Dict
The parsed response
Return API response as dict . If the response encodes an API error raise Exception Raises When the raw response describes an API code 404 exception APIServerException When the raw response describes any other API exception APIResponseParseException If the response cannot be parsed as JSON Returns Dict The parsed response
def parse(self) -> dict:
        if self.raw_response.status_code in [200, 201]:
            if 'value' in self.parse_json(self.raw_response).keys():
                return self.parse_json(self.raw_response)['value']
            else:
                return self.parse_json(self.raw_response)
        else:
            error_response = self.parse_json_clockify_error(self.raw_response)
            msg = f"HTTP {self.raw_response.status_code} containing API error '{self.raw_response.text}'"
            if error_response.code == 404:
                raise APIServer404(msg, error_response=error_response)
            else:
                raise APIServerException(msg, error_response=error_response)
def parse ( self ) -> dict : if self . raw_response . status_code in [ 200 , 201 ] : if 'value' in self . parse_json ( self . raw_response ) . keys ( ) : return self . parse_json ( self . raw_response ) [ 'value' ] else : return self . parse_json ( self . raw_response ) else : error_response = self . parse_json_clockify_error ( self . raw_response ) msg = f"HTTP {self.raw_response.status_code} containing API error '{self.raw_response.text}'" if error_response . code == 404 : raise APIServer404 ( msg , error_response = error_response ) else : raise APIServerException ( msg , error_response = error_response )
Return API response as dict.
Return API response as dict .
"""Return API response as dict. If the response encodes an API error, raise Exception

        Raises
        ------
        APIServer404:
            When the raw response describes an API code 404 exception
        APIServerException
            When the raw response describes any other API exception
        APIResponseParseException
            If the response cannot be parsed as JSON

        Returns
        -------
        Dict
            The parsed response

        """
self