Liking cljdoc? Tell your friends :D

com.stitchdata.client.core

Clojure Stitch Client

Usage:

(ns foo.bar (:require [com.stitchdata.client.core :as sc]))

;; Build a client in a with-open. The client accumulates records in ;; batches, and we should close it when we're done to avoid leaving ;; messages in an unsent batch. (with-open [stitch (sc/client {::sc/client-id 1234 ::sc/token "adfadfadfadfadfaadfadfadfagdfa" ::sc/namespace "event_tracking"})] (doseq [data some-source-of-data] ;; Send a record to Stitch (sc/push stitch {::sc/action ::sc/upsert ::sc/table-name "events" ::sc/key-names ["hostname" "timestamp"] ::sc/sequence (System/currentTimeMillis) ::sc/data data})))

Clojure Stitch Client

Usage:

(ns foo.bar
  (:require [com.stitchdata.client.core :as sc]))

;; Build a client in a with-open. The client accumulates records in
;; batches, and we should close it when we're done to avoid leaving
;; messages in an unsent batch.
(with-open [stitch (sc/client {::sc/client-id 1234
                               ::sc/token "adfadfadfadfadfaadfadfadfagdfa"
                               ::sc/namespace "event_tracking"})]
  (doseq [data some-source-of-data]
    ;; Send a record to Stitch
    (sc/push stitch {::sc/action ::sc/upsert
                     ::sc/table-name "events"
                     ::sc/key-names ["hostname" "timestamp"]
                     ::sc/sequence (System/currentTimeMillis)
                     ::sc/data data})))
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close