add missing source map ...

This commit is contained in:
jem 2020-04-24 15:27:41 +02:00
parent f6b9d4146a
commit 5fa832ecdb
2 changed files with 11 additions and 11 deletions

View file

@ -6,7 +6,7 @@ Embeds mastodon timline into a html page. Uses JS, no intermediate server requir
sudo npm install -g npx
sudo npm install -g shadow-cljs
npm install source-map-support
npm install source-map-support --save-dev
npm install mastodon-api
# Development

View file

@ -1,21 +1,21 @@
(ns dda.masto-embed.app
(:require ["mastodon-api" :as Mastodon]
[clojure.pprint :as pprint :refer [pprint]]
[cljs.core.async :refer [go]]
[cljs.core.async.interop :refer-macros [<p!]]))
(:require ["mastodon-api" :as Mastodon]
[clojure.pprint :as pprint :refer [pprint]]
[cljs.core.async :refer [go]]
[cljs.core.async.interop :refer-macros [<p!]]))
(defn get-content-seq [response]
(map
#(aget % "content")
(array-seq
(aget response "data"))))
(map
#(aget % "content")
(array-seq
(aget response "data"))))
(defn init []
(let [config (js-obj "api_url" "https://social.meissa-gmbh.de/api/v1/" "access_token" "...")
masto (new Mastodon config)
rest-endpoint "accounts/:id/statuses"
id-config (js-obj "id" "2")]
(pprint
(pprint
(go
(let [response (<p! (.get masto rest-endpoint id-config))]
(get-content-seq response))))))