some more npm magic

This commit is contained in:
jem 2020-04-24 18:04:25 +02:00
parent c24a07f01e
commit c7af7ed650
3 changed files with 23 additions and 10 deletions

21
package-lock.json generated
View file

@ -25,12 +25,14 @@
} }
}, },
"ajv": { "ajv": {
"version": "4.11.8", "version": "6.12.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=", "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
"requires": { "requires": {
"co": "^4.6.0", "fast-deep-equal": "^3.1.1",
"json-stable-stringify": "^1.0.1" "fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
} }
}, },
"ajv-keywords": { "ajv-keywords": {
@ -2117,6 +2119,15 @@
"string-width": "^2.0.0" "string-width": "^2.0.0"
}, },
"dependencies": { "dependencies": {
"ajv": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
"requires": {
"co": "^4.6.0",
"json-stable-stringify": "^1.0.1"
}
},
"ansi-regex": { "ansi-regex": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",

View file

@ -7,6 +7,7 @@
"source-map-support": "^0.5.19" "source-map-support": "^0.5.19"
}, },
"dependencies": { "dependencies": {
"ajv": "^6.12.2",
"mastodon-api": "^1.3.0" "mastodon-api": "^1.3.0"
} }
} }

View file

@ -15,11 +15,12 @@
(let [config (js-obj "api_url" "https://social.meissa-gmbh.de/api/v1/" "access_token" "...") (let [config (js-obj "api_url" "https://social.meissa-gmbh.de/api/v1/" "access_token" "...")
masto (new Mastodon config) masto (new Mastodon config)
rest-endpoint "accounts/:id/statuses" rest-endpoint "accounts/:id/statuses"
id-config (js-obj "id" "2")] id-config (js-obj "id" "2")
(pprint result (go
(go (let [response (<p! (.get masto rest-endpoint id-config))]
(let [response (<p! (.get masto rest-endpoint id-config))] (get-content-seq response)))]
(get-content-seq response)))))) (pprint result)
result))
(defn add-one [a] (defn add-one [a]
(+ a 1)) (+ a 1))