 
 ;;;; API - batch ops
 
-(defn- keys-and-attrs [{:keys [key vals attrs consistent?] :as request}]
-  (doto (KeysAndAttributes.)
-    (.setKeys (for [v vals] {(name key) (clj-val->db-val v)}))
-    (.setAttributesToGet (when attrs (mapv name attrs)))
-    (.setConsistentRead  consistent?)))
-
-(defn- batch-request-items [requests]
-  (into {} (for [[table request] requests]
-             [(name table) (keys-and-attrs request)])))
-
-;;;; TODO Continue code walk-through below
-
 (defn batch-get-item
-  "Retrieve a batch of items in a single request. DynamoDB limits
-   apply - 100 items and 1MB total size limit. Requested items
-   which were elided by Amazon are available in the returned map
-   key :unprocessed-keys.
-
-  Example:
-  (batch-get-item cred
-    {:users {:key-name :names
-             :keys [\"alice\" \"bob\"]}
-     :posts {:key-name :id
-             :keys [1 2 3]
+  "Retrieves a batch of items in a single request.
+  Limits apply, Ref. http://goo.gl/Bj9TC.
+
+  (batch-get-item creds
+    {:users {:key  :names
+             :vals [\"alice\" \"bob\"]}
+     :posts {:key   :id
+             :vals  [1 2 3]
              :attrs [:timestamp :subject]
              :consistent? true}})"
   [creds requests]

              (ExpectedAttributeValue. (clj-val->db-val %)))
     expected)))

;;;; Coercion - objects

(defprotocol AsMap (as-map [x]))


;;;; TODO
;; * Finish up code walk-through.
;; * Finish up outstanding API: as-map types, update-item, scan+query stuff.
;; * Go through Rotary PRs, non-PR forks.
;; * README docs, benchmarks, further tests.
;; * Long-term: async API, auto throughput adjusting, ...?

;;;; API - exceptions

