Liking cljdoc? Tell your friends :D

chart-api.core


*api-context*clj

Dynamic API context to be applied in API calls.

Dynamic API context to be applied in API calls.
raw docstring

auth->optsclj

(auth->opts {:keys [type in param-name]} value)

Process the given auth to an option map that might conatin request options and parameters.

Process the given auth to an option map that might conatin request options and parameters.
raw docstring

auth-definitionsclj


auths->optsclj

(auths->opts auth-names)

Process the given auth names to an option map that might conatin request options and parameters.

Process the given auth names to an option map that might conatin request options and parameters.
raw docstring

call-apiclj

(call-api path
          method
          {:keys [path-params body-param content-types accepts auth-names]
           :as opts})

Call an API by making HTTP request and return its response.

Call an API by making HTTP request and return its response.
raw docstring

check-required-paramscljmacro

(check-required-params & params)

Throw exception if any of the given parameters is nil.

Throw exception if any of the given parameters is nil.
raw docstring

default-api-contextclj

Default API context.

Default API context.
raw docstring

deserializeclj

(deserialize {:keys [body] {:keys [content-type]} :headers})

Deserialize the given HTTP response according to the Content-Type header.

Deserialize the given HTTP response according to the Content-Type header.
raw docstring

form-params->multipartclj

(form-params->multipart form-params)

Convert the given form parameters map into a vector as clj-http's :multipart option.

Convert the given form parameters map into a vector as clj-http's :multipart option.
raw docstring

format-dateclj

(format-date date)

Format the given Date object with the :date-format defined in api-options. NOTE: The UTC time zone is used.

Format the given Date object with the :date-format defined in *api-options*.
NOTE: The UTC time zone is used.
raw docstring

format-datetimeclj

(format-datetime date)
(format-datetime date time-zone)

Format the given Date object with the :datetime-format defined in api-options. NOTE: The system's default time zone is used when not provided.

Format the given Date object with the :datetime-format defined in *api-options*.
NOTE: The system's default time zone is used when not provided.
raw docstring

json-mime?clj

(json-mime? mime)

Check if the given MIME is a standard JSON MIME or :json.

Check if the given MIME is a standard JSON MIME or :json.
raw docstring

json-preferred-mimeclj

(json-preferred-mime mimes)

Choose a MIME from the given MIMEs with JSON preferred, i.e. return JSON if included, otherwise return the first one.

Choose a MIME from the given MIMEs with JSON preferred,
i.e. return JSON if included, otherwise return the first one.
raw docstring

make-urlclj

(make-url path path-params)

Make full URL by adding base URL and filling path parameters.

Make full URL by adding base URL and filling path parameters.
raw docstring

normalize-array-paramclj

(normalize-array-param xs)

Normalize array paramater according to :collection-format specified in the parameter's meta data. When the parameter contains File, a seq is returned so as to keep File parameters. For :multi collection format, a seq is returned which will be handled properly by clj-http. For other cases, a string is returned.

Normalize array paramater according to :collection-format specified in the parameter's meta data.
When the parameter contains File, a seq is returned so as to keep File parameters.
For :multi collection format, a seq is returned which will be handled properly by clj-http.
For other cases, a string is returned.
raw docstring

normalize-paramclj

(normalize-param param)

Normalize parameter value, handling three cases: for sequential value, apply normalize-array-param which handles collection format; for File value, use current value; otherwise, apply param->str.

Normalize parameter value, handling three cases:
for sequential value, apply `normalize-array-param` which handles collection format;
for File value, use current value;
otherwise, apply `param->str`.
raw docstring

normalize-paramsclj

(normalize-params params)

Normalize parameters values: remove nils, format to string with param->str.

Normalize parameters values: remove nils, format to string with `param->str`.
raw docstring

param->strclj

(param->str param)

Format the given parameter value to string.

Format the given parameter value to string.
raw docstring

parse-dateclj

(parse-date s)

Parse the given string to a Date object with the :date-format defined in api-options. NOTE: The UTC time zone is used.

Parse the given string to a Date object with the :date-format defined in *api-options*.
NOTE: The UTC time zone is used.
raw docstring

parse-datetimeclj

(parse-datetime s)
(parse-datetime s time-zone)

Parse the given string to a Date object with the :datetime-format defined in api-options. NOTE: The system's default time zone is used when not provided.

Parse the given string to a Date object with the :datetime-format defined in *api-options*.
NOTE: The system's default time zone is used when not provided.
raw docstring

process-authclj

(process-auth opts auth-name)

Process the given auth name into options, which is merged into the given opts.

Process the given auth name into options, which is merged into the given opts.
raw docstring

serializeclj

(serialize data content-type)

Serialize the given data according to content-type. Only JSON is supported for now.

Serialize the given data according to content-type.
Only JSON is supported for now.
raw docstring

with-api-contextcljmacro

(with-api-context api-context & body)

A helper macro to wrap api-context with default values.

A helper macro to wrap *api-context* with default values.
raw docstring

with-collection-formatclj

(with-collection-format param collection-format)

Attach collection-format to meta data of the given parameter.

Attach collection-format to meta data of the given parameter.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close