diff --git a/src/com/slothrop/clj_baseball/statcast/batter.clj b/src/com/slothrop/clj_baseball/statcast/batter.clj index ea3295c..2364c79 100644 --- a/src/com/slothrop/clj_baseball/statcast/batter.clj +++ b/src/com/slothrop/clj_baseball/statcast/batter.clj @@ -1,19 +1,29 @@ (ns com.slothrop.clj-baseball.statcast.batter {:doc "Contains the implementation for the Statcast query endpoint."} - (:require [clojure.java.io :as io] - [clojure.string :as string] + (:require [clojure.string :as string] [clojure.edn :as edn] [clojure.spec.alpha :as s] [charred.api :refer [read-csv]] - [tech.v3.dataset :as d] + [tech.v3.dataset :as d] [clj-http.client :as client]) (:import [java.net URLEncoder])) (def query-defaults "The default map of query parameter values. Can be changed to modify the scope and size of your Statcast query." - (with-open [rdr (-> "public/query.edn" io/resource io/reader)] - (edn/read-string (slurp rdr)))) + {:sort-col "pitches" :hfSit nil :hfPT nil, + :hfOutfield nil :game-date-gt nil :min-pitches "0", + :metric-1 nil :hfSA nil :hfInn nil, + :hfTeam nil :game-date-lt nil :batter-stands nil, + :sort-order "desc" :hfOuts nil :hfStadium nil, + :player-event-sort "api_p_release_speed" :hfZ nil :type "details", + :player-type "batter" :hfGT "R|" :hfC nil, + :home-road nil :min-results "0" :hfRO nil, + :hfOpponent nil :pitcher-throws nil :hfPull nil, + :hfFlag nil :min-pas "0" :group-by "name", + :hfBBT nil :position nil :hfSea nil , + :hfInfield nil :hfMo nil :hfPR nil, + :hfBBL nil :hfAB nil :hfNewZones nil}) (defn make-query-map {:doc "Modifies the query map stored in query-defaults with a user-specified