简体   繁体   English

Flickr API Java / Clojure

[英]Flickr API Java/Clojure

I am trying to get a list of all the photo sets in my account. 我正在尝试获取帐户中所有照片集的列表。 I gave my application write access i can verify this has write access by creating an photo set but when ever i try to read the list i only get my public lists not my privates. 我给了我的应用程序写访问权限,我可以通过创建照片集来验证它是否具有写访问权限,但是每当我尝试阅读列表时,我只会得到我的公开列表,而不是我的私人列表。


(def flickr (new Flickr api-key shared-sercret (new REST)))

(defn get-photo-sets [ ] 
  (let  [;prefs      (.getPrefsInterface flickr)
     user-id    (get-user-id) 
     photo-sets (.getPhotosets 
             (.getList (.getPhotosetsInterface flickr) user-id)) ]    
    (doseq [photo photo-sets] (println (.getTitle photo) ))))

According to the discussions I've seen on the API forums, you should be able to get a list of private photosets by making an authenticated call without passing in a userID to getLists . 按照讨论中我见过的API论坛,你应该能够通过进行验证的呼叫,而不在用户ID传递给获得私人的photosets列表getLists

The userID is optional and if it isn't specified, it uses the authenticated user. userID是可选的,如果未指定,则使用经过身份验证的用户。 The fact that it returns public in one case but private in another isn't too clearly documented from where I stand. 从我的立场来看,它在一种情况下返回公开,而在另一种情况下返回私有的事实并没有被清楚地记录下来。

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM