浏览代码

api by key

Weihua Lu 4 年之前
父节点
当前提交
caba6d3c90
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/main/frontend/modules/zotero/api.cljs

+ 5 - 1
src/main/frontend/modules/zotero/api.cljs

@@ -40,7 +40,11 @@
            (throw (ex-info "Http error"
                            {:response response})))))))
 
+(defn item [key]
+  (get* config (str "/items/" key)))
 
 (comment
   (get* config "/collections" {:limit 1})
-  (get* config "/items" {:limit 3}))
+  (get* config "/items" {:limit 3})
+  (get* config "/items" {:item-type "journalArticle"})
+  (item "JZCIN4K5"))