Liking cljdoc? Tell your friends :D

com.adgoji.vistarmedia


close-clientclj

(close-client {:com.adgoji.vistarmedia/keys [http-client executor]})

Close the internal HTTP connection pool and executor.

NOTE: if custom executor was provided during client initialization, it won't be closed.

Close the internal HTTP connection pool and executor.

NOTE: if custom executor was provided during client initialization,
it won't be closed.
sourceraw docstring

default-middlewareclj

source

invokeclj

(invoke client {:com.adgoji.vistarmedia/keys [op payload wrap-request]})

Invoke the op operation and return the response body as Clojure map.

Authentication is handled automatically, if operation itself returns 403 error, login operation is called and the requested operation is retried. If login operation fails, an exception is thrown.

payload can optionally include :query-params, :body or named path parameters. If requested operation is a :get operation, only :query-params is passed to the request, otherwise, only :body. If operation's path contains any named parameters, those parameters must be present in the payload with the same name, for example if path is '/advertisers/{id}' then payload must contain :id keys with a valid advertiser ID. Inspect the [ops] map to figure out operation's method and presence of named path parameters.

Optionally a wrapper can be provided for the requested operation, it will temporary override the global wrapper stored in the client. This should be used carefully, especially with rate limiters since it can ignore global client rate limiter. The provided wrapper has no effect on login call.

Invoke the `op` operation and return the response body as Clojure map.

Authentication is handled automatically, if operation itself returns
403 error, login operation is called and the requested operation is
retried.  If login operation fails, an exception is thrown.

`payload` can optionally include `:query-params`, `:body` or named
path parameters.  If requested operation is a `:get` operation, only
`:query-params` is passed to the request, otherwise, only `:body`.
If operation's path contains any named parameters, those parameters
must be present in the `payload` with the same name, for example if
path is '/advertisers/{id}' then payload must contain `:id` keys
with a valid advertiser ID.  Inspect the [ops] map to figure out
operation's method and presence of named path parameters.

Optionally a wrapper can be provided for the requested operation, it
will temporary override the global wrapper stored in the `client`.
This should be used carefully, especially with rate limiters since
it can ignore global `client` rate limiter.  The provided wrapper
has no effect on login call.
sourceraw docstring

new-clientclj

(new-client {:com.adgoji.vistarmedia/keys! [credential]
             :com.adgoji.vistarmedia/keys [http-opts base-url wrap-request]})

Returns new VistarMedia DSP API client.

The only mandatory parameter is credential which is a map with :email and :password keys. The user must have API access.

Optional parameters:

  • base-url - in case you want to override it and use another environment.
  • http-opts - overrides for the internal hato HTTP client. The options are merged with the default options map, but :cookie-policy is always set to :all (it's necessary for authentication to work).
  • wrap-request allows to provide a wrapper for a request call. This might be useful to setup default retry or rate limiter policies. The wrapper should accept a thunk that takes no args and returns the full HTTP response, including headers, status code etc.
Returns new VistarMedia DSP API client.

The only mandatory parameter is `credential` which is a map with
`:email` and `:password` keys.  The user must have API access.

Optional parameters:

- `base-url` - in case you want to override it and use another
  environment.
- `http-opts` - overrides for the internal hato HTTP client.  The
  options are merged with the default options map, but
  `:cookie-policy` is always set to `:all` (it's necessary for
  authentication to work).
- `wrap-request` allows to provide a wrapper for a request call.
  This might be useful to setup default retry or rate limiter
  policies.  The wrapper should accept a thunk that takes no args and
  returns the full HTTP response, including headers, status code etc.
sourceraw docstring

opsclj

Map of all supported operations to paths and required HTTP methods.

Map of all supported operations to paths and required HTTP methods.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close