A connector for SMS brána https://www.smsbrana.cz
[smsbrana "0.2.0"]
All functions are designed to return errors instead of throwing exceptions.
All API calls return a tuple within following structure: [keyword response http-response] where keyword can be:
A response
is a parsed body of an original HTTP response.
To be able to run examples this line is needed:
(require '[smsbrana.core :as sms])
Sends a SMS within opts
.
(sms/send {:login "login", :password "password", :message "TEST", :number "+420777666555"})
;; [:ok
;; {:credit 1523.32, :price 1.1, :sms_count 1, :sms_id "377351", :err 0}
;; {:request-time 386, ...
Example of an error response:
(sms/send {:login "login", :password "password", :message "TEST", :number "+420777666555"})
;; [:error
;; {:err 4}
;; {:request-time 386, ...
Or
(sms/send {:login "login", :password "password", :message "TEST", :number "+420777666555"})
;; [:error-unmarshalling
;; nil
;; {:request-time 386, ...
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close