Liking cljdoc? Tell your friends :D

shopify.friend

Provides a workflow for friend.

Provides a workflow for [friend](https://github.com/cemerick/friend).
raw docstring

build-access-token-requestclj

(build-access-token-request api-client shop code)

Takes an api-client map, a myshopify domain, and a temporary code. Returns a request map for a POST to Shopify to get a permanent token

Takes an api-client map, a myshopify domain, and a temporary code.
Returns a request map for a POST to Shopify to get a permanent token
sourceraw docstring

callback-request-matcherclj

(callback-request-matcher callback-path request)

Returns whether or not the request is an auth callback, for a given callback path.

Returns whether or not the request is an auth callback, for a given
callback path.
sourceraw docstring

fetch-access-tokenclj

(fetch-access-token api-client shop code)

Takes an api-client map, a myshopify domain, and a temporary access code. Fires off a POST to Shopify requesting a permanent token, which is then returned.

Takes an api-client map, a myshopify domain, and a temporary access code.
Fires off a POST to Shopify requesting a permanent token, which is
then returned.
sourceraw docstring

handle-callback-requestclj

(handle-callback-request api-client request)

Uses the temporary code from an auth callback to fetch a permanent access token from Shopify and return it in an auth map.

Uses the temporary code from an auth callback to fetch a permanent
access token from Shopify and return it in an auth map.
sourceraw docstring

handle-login-requestclj

(handle-login-request api-client request callback-path)

Returns a redirect response to the user auth URL for the shop specified in the query params.

Returns a redirect response to the user auth URL for the shop
specified in the query params.
sourceraw docstring

login-request-matcherclj

(login-request-matcher login-path request)

Returns whether or not the request is a login, for a given login path.

Returns whether or not the request is a login, for a given login path.
sourceraw docstring

normalize-shop-domainclj

(normalize-shop-domain domain)

Puts in the .myshopify.com if necessary.

Puts in the .myshopify.com if necessary.
sourceraw docstring

shopify-authsclj

(shopify-auths request)

Takes a ring request and returns a sequence of the current Shopify auth maps.

Takes a ring request and returns a sequence of the current Shopify auth maps.
sourceraw docstring

user-auth-urlclj

(user-auth-url api-client shop & [redirect-path])

Takes an api-client map, a shop domain, and a redirect path and returns the URL where the user can grant access the api-client.

Takes an api-client map, a shop domain, and a redirect path and returns
the URL where the user can grant access the api-client.
sourceraw docstring

workflowclj

(workflow {:keys [api-client] :as config})

Takes a config map and returns a friend workflow. The only required config key is :api-client. Optional keys are :login-path (defaults to "/auth/shopify") and :callback-path (defaults to "/auth/shopify/callback"). Here's a typical config:

{:api-client
 {:url "http://myapp.com"
  :key "01abfc750a0c942167651c40d088531d"
  :secret "dc2e817cb95adce7164db4767a13a53f"
  :scope [:read_orders, :write_content]}
 :login-path "/login"}
Takes a config map and returns a friend workflow. The only required
config key is `:api-client`. Optional keys are `:login-path` (defaults to
"/auth/shopify") and `:callback-path` (defaults to
"/auth/shopify/callback"). Here's a typical config:

    {:api-client
     {:url "http://myapp.com"
      :key "01abfc750a0c942167651c40d088531d"
      :secret "dc2e817cb95adce7164db4767a13a53f"
      :scope [:read_orders, :write_content]}
     :login-path "/login"}
sourceraw docstring

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

× close