Skip to content

Instantly share code, notes, and snippets.

@maxp
Created November 19, 2016 03:04
Show Gist options
  • Save maxp/229f783968daed4e570b8aa223e81c0b to your computer and use it in GitHub Desktop.
Save maxp/229f783968daed4e570b8aa223e81c0b to your computer and use it in GitHub Desktop.
(defn courses [state evt]
(let [scns scn/scn-data]
{ :state (assoc state :wait nil)
:frames
[
{:attachment
{ :type "template"
:payload
{ :template_type "generic"
:elements
(for [[k s] scns]
{ :title (:title s)
:subtitle (:subtitle s)
:image_url (:image_url s)
:buttons
[{:type "postback"
:title "Enroll"
:payload (str "enroll " (:scn s))}]})}}}]}))
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment