def filter(query, type = nil)
      checking_filter_type(type)
      filter_type = set_filter_type(type) unless type.nil?
      json = JSON.parse(connect_google(@api_key,nil,query,filter_type))
      @total_count = json["totalItems"]
      @items = json["items"]
    end
def filter(query, type = nil)
      checking_filter_type(type)
      filter_type = set_filter_type(type) unless type.nil?
      json = JSON.parse(connect_google(@api_key,nil,query,filter_type))
      @total_count = json["totalItems"]
      @items = json["items"]
    end
Google books filtration