def do_http_get(query_string)
      response, data = @http.get(query_string, @headers)
      
      # error checking
      if response.code != '200'
        case response.code
        when '400'
          raise GatticaError::AnalyticsError, response.body + " (status code: #{response.code})"
        when '401'
          raise GatticaError::InvalidToken, "Your authorization token is invalid or has expired (status code: #{response.code})"
        else  # some other unknown error
          raise GatticaError::UnknownAnalyticsError, response.body + " (status code: #{response.code})"
        end
      end
      
      return data
    end
def do_http_get(query_string)
      response, data = @http.get(query_string, @headers)
      
      # error checking
      if response.code != '200'
        case response.code
        when '400'
          raise GatticaError::AnalyticsError, response.body + " (status code: #{response.code})"
        when '401'
          raise GatticaError::InvalidToken, "Your authorization token is invalid or has expired (status code: #{response.code})"
        else  # some other unknown error
          raise GatticaError::UnknownAnalyticsError, response.body + " (status code: #{response.code})"
        end
      end
      
      return data
    end
Does the work of making HTTP calls and then going through a suite of tests on the response to make
 sure it's valid and not an error