title: Query events from Google Calendar API v3 using Java client library?
body: <p>v1 Calendar API client library that <a href="https://github.com/home-climate-control/dz/tree/master/dz3-master/dz3-scheduler-gcal" rel="nofollow">my project</a> used for years (and which is being shut down in a couple of weeks) had a clearly defined <a href="https://developers.google.com/gdata/javadoc/com/google/gdata/client/calendar/CalendarQuery" rel="nofollow">CalendarQuery</a>, however, v3 doesn't seem to have any client library objects dedicated for this purpose.</p>
  
  <p>Of course, I can use their <a href="https://developers.google.com/google-apps/calendar/v3/reference/events/list" rel="nofollow">JSON HTTP request</a> and parse the response, but it would be a shame to do if the client library can do it.</p>
  
  <p>Anyone out there found the way to provide query parameters to <code>list()</code> call?</p>
  
  <p><strong>UPDATE (based on user32116's comments):</strong></p>
  
  <p>So the missing piece is that <code>list()</code> and <code>execute()</code> can and need to be separated.</p>
  
  <p>Actual query code will look like this:</p>
  
  <pre><code>Calendar.Events.List events = calendarClient.events().list(id);
  
  events.setTimeMin(start);
  events.setTimeMax(end);
  events.set... // your criteria here
  
  Events result = events.execute();
  </code></pre>