             [clojure.core.memoize :as memo]
             [compojure.core :refer [GET POST defroutes]]
             [ring.adapter.jetty :as jetty]
-            [ring.middleware.file-info :as file-info]
+            [ring.middleware.file-info :refer [wrap-file-info]]
             [ring.middleware.format-params :refer [wrap-restful-params]]
             [ring.middleware.format-response :refer [wrap-restful-response]]
-            [ring.middleware.keyword-params :as keyword-params]
             [ring.middleware.params :as params]
             [ring.middleware.reload :as reload]
             [ring.middleware.resource :as resource]


(def nyc-terminal? (partial contains? #{"Penn Station"}))

(defn peak?
  [step]
  {:pre [(transit-step? step)]}
  #_
  (or (and (nyc-terminal? departure-stop)
           (<= 6 arrival-hour 10))
      (and (nyc-terminal? arrival-stop)
           (<= 16 departure-hour 20))))

(defn reformat-directions [body]
  (let [directions (get-in body [:routes 0 :legs 0])]

                  :towards     (get-in step [:transit_details :headsign])
                  :route       (get-in step [:transit_details :line :name])
                  :departure   (epoch-seconds->date (get-in step [:transit_details :departure_time :value]))
                  :arrival     (epoch-seconds->date (get-in step [:transit_details :arrival_time :value]))}))
          (map (fn [step]
                 (assoc step :peak (peak? step)))))}))

#_ ;; example response
{:summary
