code: public Query queryEntitiesRequest(HttpMethod method,
              Map<String, Object> params, Object data, String... segments) {
          ApiResponse response = apiRequest(method, params, data, segments);
          return new EntityQuery(response, method, params, data, segments);
      }
docs: Perform a query request and return a query object. The Query object
  provides a simple way of dealing with result sets that need to be
  iterated or paged through.
  
  @param method
  @param params
  @param data
  @param segments
  @return