def query(calendar_ids, start_time, end_time)
      query_content = json_for_query(calendar_ids, start_time, end_time)
      response = @connection.send("/freeBusy", :post, query_content)

      return nil if response.status != 200 || response.body.empty?

      parse_freebusy_response(response.body)
    end
def query(calendar_ids, start_time, end_time)
      query_content = json_for_query(calendar_ids, start_time, end_time)
      response = @connection.send("/freeBusy", :post, query_content)

      return nil if response.status != 200 || response.body.empty?

      parse_freebusy_response(response.body)
    end
Setup and query the free/busy status of a collection of calendars.

 The +params+ parameter accepts
 * :client_id => the client ID that you received from Google after registering your application with them (https://console.developers.google.com/). REQUIRED
 * :client_secret => the client secret you received from Google after registering your application with them. REQUIRED
 * :redirect_url => the url where your users will be redirected to after they have successfully permitted access to their calendars. Use 'urn:ietf:wg:oauth:2.0:oob' if you are using an 'application'" REQUIRED
 * :refresh_token => if a user has already given you access to their calendars, you can specify their refresh token here and you will be 'logged on' automatically (i.e. they don't need to authorize access again). OPTIONAL

 See Readme.rdoc or readme_code.rb for an explication on the OAuth2 authorization process.


 Find the busy times of the supplied calendar IDs, within the boundaries
 of the supplied start_time and end_time

 The arguments supplied are
 * calendar_ids => array of Google calendar IDs as strings
 * start_time => a Time object, the start of the interval for the query.
 * end_time => a Time object, the end of the interval for the query.