         }
     }
     
-    func refresh(formId: Int, _ callback: ((Bool) -> Void)?) {
-        let url = URL(string: SecondHand.refreshUrl + String(formId))!
+    func refresh(formIds: Array<Int>, _ callback: ((Bool) -> Void)?) {
+        let formIdsString = formIds
+            .map{String($0)}
+            .joined(separator: ",")
+        
+        let url = URL(string: SecondHand.refreshUrl + formIdsString)!
         
         URLSession.shared.dataTask(with: url, completionHandler:{(data, response, error) -> Void in
 

            }
            
            DispatchQueue.main.async {
                if (forms.count == 0) {
                    callback?(false)
                    return
                }
                
                // Remove the form if it already existed
                if let formToRemove = self.forms.index(where: ({$0.id == formId})) {
                    self.cache.forms[formToRemove] = forms.first!
                } else {
                    self.cache.forms.append(forms.first!)
                }

                self.cache.lastRefresh = Date.now()
                self.save()
                print("downloaded form " + String(formId))
                
                callback?(true)
            }
        }).resume()
    }
        
    func refresh(force: Bool, _ callback: ((Bool) -> Void)?) {

import Foundation

class SecondHand {
    private static let refreshUrl = "https://api.sf-f.org.il/yad2/form?formIds="
    private static let fileName = Convention.name + "SecondHand.json";
    private static let cacheFile = NSHomeDirectory() + "/Library/Caches/" + "1_" + fileName;
    
    var cache = Cache(forms: [], lastRefresh: nil)
    var forms: Array<SecondHand.Form> {
