Yodlee is manually refreshable

This commit is contained in:
Bryce Covert
2020-12-22 13:59:50 -08:00
parent 6930a8c7c2
commit bbdb9602aa
6 changed files with 114 additions and 92 deletions

View File

@@ -1,8 +1,8 @@
(ns auto-ap.datomic.clients
(:require [datomic.api :as d]
[auto-ap.datomic :refer [uri]]
(:require [auto-ap.datomic :refer [conn uri]]
[clj-time.coerce :as coerce]
[clojure.tools.logging :as log]
[clj-time.coerce :as coerce]))
[datomic.api :as d]))
(defn cleanse [e]
(-> e
@@ -31,21 +31,14 @@
))
(defn get-by-id [id]
(->>
(d/query (-> {:query {:find ['(pull ?e [*
{:client/bank-accounts [* {:bank-account/type [*]
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]}]}
{:yodlee-provider-account/_client [*]}])]
:in ['$ '?e]
:where [['?e]]}
:args [(d/db (d/connect uri)) id]}
))
(first)
(first)
(cleanse)
#_(map first)
#_(first)))
(d/pull (d/db conn )
'[* {:client/bank-accounts [* {:bank-account/type [*]
:bank-account/yodlee-account [:yodlee-account/name :yodlee-account/id :yodlee-account/number]}]}
{:yodlee-provider-account/_client [*]}]
id)
(cleanse)))
(defn code->id [code]
(->>