本文整理汇总了Python中flickrapi.FlickrAPI.favorites_getList方法的典型用法代码示例。如果您正苦于以下问题:Python FlickrAPI.favorites_getList方法的具体用法?Python FlickrAPI.favorites_getList怎么用?Python FlickrAPI.favorites_getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flickrapi.FlickrAPI
的用法示例。
在下文中一共展示了FlickrAPI.favorites_getList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FlickrAPI
# 需要导入模块: from flickrapi import FlickrAPI [as 别名]
# 或者: from flickrapi.FlickrAPI import favorites_getList [as 别名]
import sys
from flickrapi import FlickrAPI
# flickr auth information:
flickrSecret = "3fbf7144be7eca28" # shared "secret"
flickrAPIKey = "f8aa9917a9ae5e44a87cae657924f42d" # API key
# make a new FlickrAPI instance
fapi = FlickrAPI(flickrAPIKey, flickrSecret)
# do the whole whatever-it-takes to get a valid token:
token = fapi.getToken(browser="/usr/bin/firefox")
# get my favorites
rsp = fapi.favorites_getList(api_key=flickrAPIKey,auth_token=token)
fapi.testFailure(rsp)
#print 'Photosets: '
print fapi.photosets_getList(api_key=flickrAPIKey, auth_token=token)
rsp = fapi.photosets_getList(api_key=flickrAPIKey, auth_token=token)
fapi.testFailure(rsp)
#print photoSets
#print ', '.join([str(set.title) for set in photoSets])
#person = fapi.flickr_people_getInfo(user_id="tuxmann")
#print person.username
# and print them
if hasattr(rsp.photosets[0], "photoset"):
print 'yeup!'