             [polismath.poller :as poll]))
 
 
+
+(defn gets
+  "Like get, but gives a coll mapped from all the keys"
+  [m ks & [not-found]]
+  (mapv #(get m % not-found) ks))
+
+
 (def intercom-http-params
   {:accept :json
    :basic-auth ["nb5hla8s" (env/env :intercom-api-key)]
    :content-type :json})
- 
-
-(defn get-intercom-users
+
+
+(defn parse-json-resp
+  [resp]
+  (->> resp
+       :body
+       ch/parse-string
+       (into {})))
+
+
+(defn get-icusers
   "Get the list of users from intercom (don't want to create intercom users for users that haven't
   actually signed up"
   [& [page]]

    (sort-by 
      (fn [u] (int (get u "created_at")))
      (if next-page
        (into users (get-intercom-users next-page))
        users))))


(defn gets
  "Like get, but gives a coll mapped from all the keys"
  [m ks & [not-found]]
  (mapv #(get m % not-found) ks))


(defn update-icuser

(defn backup-intercom-users
  "Backup intercom users to json file specified by filename arg."
  [filename]
  (let [icusers (get-icusers)]
    (spit filename (ch/generate-string icusers))))


