def get_items_since(query, since_date, until_date)
      url = @server_url+'/items/search.json?q='+query+'&since='+since_date+'&until='+until_date+'&per_page=500'
      json = self.get_json(url)
      results = []
      result = json["nyplAPI"]["response"]["result"]
      results << result
      totalPages = json["nyplAPI"]["request"]["totalPages"].to_i
      
      if totalPages >= 2
        puts "total pages " + totalPages.to_s if @debug
        (2..totalPages).each do | page |
          puts "page: "+page.to_s if @debug
          newurl = url + "&page=#{page}"
          json = self.get_json(newurl)
          newresult = json["nyplAPI"]["response"]["result"]
          results << newresult
        end
      end
      results.flatten!
     
      results
    end
def get_items_since(query, since_date, until_date)
      url = @server_url+'/items/search.json?q='+query+'&since='+since_date+'&until='+until_date+'&per_page=500'
      json = self.get_json(url)
      results = []
      result = json["nyplAPI"]["response"]["result"]
      results << result
      totalPages = json["nyplAPI"]["request"]["totalPages"].to_i
      
      if totalPages >= 2
        puts "total pages " + totalPages.to_s if @debug
        (2..totalPages).each do | page |
          puts "page: "+page.to_s if @debug
          newurl = url + "&page=#{page}"
          json = self.get_json(newurl)
          newresult = json["nyplAPI"]["response"]["result"]
          results << newresult
        end
      end
      results.flatten!
     
      results
    end
NyplRepo::Client.new(ENV["API_TOKEN"], {:debug=>true, :server_url => "http://api.nypl/api/v1/"})

date format: YYYY-MM-DD
physical_location  i.e "Map%20Division"&field=physicalLocation