safeApiCall
Safely makes an API call and returns the result.
This method executes the provided API request and checks if the response is successful. If successful, it returns the response body wrapped in a NetworkResult.Success. If the response is not successful or an exception occurs, it returns an error wrapped in a NetworkResult.Error.
Return
A NetworkResult containing the result of the API call.
Parameters
apiRequest
A suspend function that represents the API request to be made.