Liking cljdoc? Tell your friends :D

barebuild.utils


build-scoped-urlcljs

(build-scoped-url search pathname resource-id new-params)

Build the url from the resource's params, scoped by its resource-id. A named resource owns <id>.-prefixed keys (e.g. tasks.sort=start); an unnamed (blank id) resource owns the bare keys and writes them without a prefix (sort=start).

Build the url from the resource's params, scoped by its resource-id. A named resource owns
`<id>.`-prefixed keys (e.g. tasks.sort=start); an unnamed (blank id) resource owns the bare
keys and writes them without a prefix (sort=start).
sourceraw docstring

canonicalize-querycljs

(canonicalize-query q)

Public function that ensures all query keys are keywords and values are non-blank strings. Entries whose value is nil or blank are dropped

Public function that ensures all query keys are keywords and values are non-blank strings.
Entries whose value is nil or blank are dropped
sourceraw docstring

owned-url-keyscljs

(owned-url-keys resource-id all-keys)

The keys in all-keys a resource owns: its <id>.-prefixed keys when named, or the bare undotted keys when unnamed (blank id). Bare and namespaced keys never overlap, so an unnamed root resource and named siblings can share one URL without colliding.

The keys in `all-keys` a resource owns: its `<id>.`-prefixed keys when named, or the bare
undotted keys when unnamed (blank id). Bare and namespaced keys never overlap, so an unnamed
root resource and named siblings can share one URL without colliding.
sourceraw docstring

requestcljs

(request {:keys [endpoint segment method query body request-id]})

build a request value for the executor from the parts provided .e.g. -> {:method "GET" :url "/api/tasks?requestId=tasks:1&sort=owner&direction=asc"}

build a request value for the executor from the parts provided
.e.g. -> {:method "GET" :url "/api/tasks?requestId=tasks:1&sort=owner&direction=asc"}
sourceraw docstring

url-prefixcljs

(url-prefix resource-id)

The URL key prefix for a resource id: <id>. for a named resource, or "" for the unnamed root resource, whose keys are bare.

The URL key prefix for a resource id: `<id>.` for a named resource, or "" for the unnamed
root resource, whose keys are bare.
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