Skip to content

Instantly share code, notes, and snippets.

@wilkerlucio
Last active July 2, 2017 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilkerlucio/918bcc75b0044fb59df5c5139fb4559f to your computer and use it in GitHub Desktop.
Save wilkerlucio/918bcc75b0044fb59df5c5139fb4559f to your computer and use it in GitHub Desktop.
(ns ygq.popup.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [untangled.client.core :as uc]
[cljs.core.async :as async :refer [<!]]
[chrome.rpc :as rpc]
[google.api :refer [get-auth-token]]
[untangled.client.network :as un]))
(defrecord Network [complete-app]
un/NetworkBehavior
(serialize-requests? [this] true)
un/UntangledNetwork
(send [this edn ok error]
(go
(let [res (<! (rpc/send [:app/graph edn]))]
(ok res))))
(start [this app]
(assoc this :complete-app app)))
(defn make-network [] (map->Network {}))
(defonce app
(atom (uc/new-untangled-client
:networking (make-network))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment