Functions to determine the endpoint of a resource. You probably don't need to use these; use the shopify.resources
namespace to make requests.
Functions to determine the endpoint of a resource. You probably don't need to use these; use the `shopify.resources` namespace to make requests.
(endpoint resource-type cardinality params)
Takes a resource type keword (e.g. :products
), a cardinality (:member
or :collection
), and a map of params. Returns a partial request map of :uri
and :params
.
Takes a resource type keword (e.g. `:products`), a cardinality (`:member` or `:collection`), and a map of params. Returns a partial request map of `:uri` and `:params`.
(extract-path-params resource-type member-attrs)
Takes a resource type-keyword and a map of member attributes, and returns a map of path params and a map of the remaining attributes
Takes a resource type-keyword and a map of member attributes, and returns a map of path params and a map of the remaining attributes
(pick-route routes params)
Pick the first satisfyable route template in a collection, given a collection of available keys.
Pick the first satisfyable route template in a collection, given a collection of available keys.
Takes a resource type keyword and a map of member attributes, and returns a possibly altered map suitable for extracting path params.
Takes a resource type keyword and a map of member attributes, and returns a possibly altered map suitable for extracting path params.
(render-route route params)
Given a route template and a map of params, return a partial request map of :uri
and :params
.
Given a route template and a map of params, return a partial request map of `:uri` and `:params`.
(routes-for-resource resource-type cardinality)
Takes a resource type keword (e.g. :products
) and cardinality (:member
or :collection
) and returns a sequence of routes.
Takes a resource type keword (e.g. `:products`) and cardinality (`:member` or `:collection`) and returns a sequence of routes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close