anchor.diff:  	  "channel" (do-urlencode:urlencode channel)
   	  "leave" (do-urlencode:urlencode (format nil "{'uuid':~S,'auth':''}" uuid))))
   
  -(defun history-url(channel)
  +(defun history-url (channel &key (count 10)
  +			    (start nil)
  +			    (end nil)
  +			    (reverse "false")
  +			    (string-message-token "true")
  +			    (include-token "true")
  +			    (params "")
  +			    (auth "auth"))
  +
     (to-url "v2" "history" "sub-key" +sub-key+ "channel"
  -	  (do-urlencode:urlencode channel)
  -	  ;;(do-urlencode:urlencode "{'string_message_token':'true'}") TBA if uncommented, it shows 0 items
  -	  ) )
  +	  (format nil "~A~A" (do-urlencode:urlencode channel)
  +		  (format nil "?~{~{~A=~A~}~^&~}"
  +			  (remove-if-not #'second
  +					 `(("string_message_token"  ,string-message-token)
  +					   ("include_token" ,include-token)
  +					   ("reverse" ,reverse)
  +					   ("count" ,count)
  +					   ("start" ,start)
  +					   ("end" ,end))))
  +	  ) ))
  +
   (defun replay-url(source-channel dest-channel)
     (to-url "v1" "replay" +pub-key+ +sub-key+
   	  (do-urlencode:urlencode source-channel)
   	  (do-urlencode:urlencode dest-channel)
   	  ;;(do-urlencode:urlencode "{'count':1}") TBA - result: not-found?!
   	  ))
  +
   (defun here-now-url ()
     (to-url "v2" "presence" "sub_key" +sub-key+) ;; TBA - should we restrict to max 100 items?
     )
  
positive.code: ;;;; cl-pubnub.lisp
  
  (in-package #:cl-pubnub)
  (defconstant +pub-key+ "demo")
  (defconstant +sub-key+ "demo")
  (defconstant +host+ "http://pubsub.pubnub.com")
  (defun to-url(&rest params)
    (format nil "~{~A~^/~}" (list* +host+ params)))
  
  (defun peek-url (channel message)
    (to-url "publish" +pub-key+
  	  0 ;; signature
  	  channel
  	  0 ;; callback
  	  message))
  
  (defun time-url()(to-url "time" 0))
  
  
negative.code: (defun audit-url ()
    (to-url
     "v1/auth/audit/sub-key" +sub-key+
     (do-urlencode:urlencode (format nil "{'timestamp' : 0}" ))))
  
  (defun presence-heartbeat-url (channel uuid auth)
      (to-url
     "v2/presence/sub-key" +sub-key+ "channel" (do-urlencode:urlencode channel)  "heartbeat"
     (do-urlencode:urlencode (format nil "{'uuid':'~A', 'auth':'~A'}"uuid auth )))
    )
  
  (defun publish-url (channel message)
    (to-url "publish" +pub-key+ +sub-key+
  	  0 ;; signature
  	  channel
  	  0 ;; callback
  	  (do-urlencode:urlencode (format nil "~A" message))))
  
  (defun subscribe-url(channel timetoken)
    (to-url "subscribe" +sub-key+
  