Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: CL-2091
Pull request Compare This branch is 70 commits ahead, 529 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
src/clj_pubnub
README.md
project.clj

README.md

clj-pubnub

Original Author: DOO.net.

Clojure client for PubNub.

Usage

Publishing

;; The client should always be required with an alias
(require '[clj-pubnub.client :as pubnub])

;; Configuration can be passed directly
(pubnub/publish {:pub-key "demo" :sub-key "demo"} "my_channel" {:hello "world"})

;; ... or through a binding
(binding [pubnub/config {:pub-key "demo" :sub-key "demo"}]
  (pubnub/publish "my_channel" {:hello "world"}))

;; ... or by setting it globally
(pubnub/set-config! {:pub-key "demo" :sub-key "demo"})
(pubnub/publish "my_channel" {:hello "world"})

;; SSL and signing is also supported
(pubnub/publish {:pub-key "demo"
                 :sub-key "demo"
                 :secret-key "demo"
                 :ssl true}
                "my_channel"
                {:hello "world"})

License

Copyright (C) 2012 Moritz Heidkamp, doo GmbH

Distributed under the Eclipse Public License, the same as Clojure.

Something went wrong with that request. Please try again.