Clojure client implementation for VistarMedia DSP API.
See the clojars page for the latest version.
(require '[com.adgoji.vistarmedia :as vistarmedia])
(def client
(vistarmedia/new-client
{::vistarmedia/credential {:email "your@email.com" :password "your-password"}}))
The main entry point is vistarmedia/invoke function, which takes a
client instance and a parameters map, which should have at least
::vistarmedia/op key with a supported operation.
To see the list of available operations, inspect vistarmedia/ops
map.
Example:
(vistarmedia/invoke (client)
{::vistarmedia/op ::vistarmedia/advertiser-get
::vistarmedia/payload
{:id "123456"}})
;; => {:id "123456", :name "adgoji"}
See also documentation for vistarmedia/invoke for additional usage
information.
The library is very minimal and basically a small wrapper on top of hato HTTP client. The following features are out of scope:
total-size key, which can
be used to calculate total list of pages to provide proper page
query parameter.new-client and invoke functions accept an
optional wrap-request function, which can be used to wrap requests
into resilience-providing functions.Released under the MIT license: https://opensource.org/license/mit
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |