Flickr API Java/Clojure
我正在尝试获取我帐户中所有照片集的列表。 我给了我的应用程序写入权限,我可以通过创建照片集来验证它是否具有写入权限,但是当我尝试读取列表时,我只能得到我的公共列表,而不是我的私人列表。
(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) ))))
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) ))))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我在 API 论坛上看到的 讨论,您应该能够通过进行经过身份验证的调用来获取私人照片集列表,而无需将用户 ID 传递给
getLists
。userID 是可选的,如果未指定,则使用经过身份验证的用户。 从我的立场来看,它在一种情况下返回公开,而在另一种情况下返回私有这一事实并没有太清楚地记录下来。
希望这可以帮助。
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
.The userID is optional and if it isn't specified, it uses the authenticated user. 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.