Last active
July 2, 2017 18:06
-
-
Save wilkerlucio/918bcc75b0044fb59df5c5139fb4559f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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