本文整理汇总了Python中flickrapi.FlickrAPI.groups_pools_remove方法的典型用法代码示例。如果您正苦于以下问题:Python FlickrAPI.groups_pools_remove方法的具体用法?Python FlickrAPI.groups_pools_remove怎么用?Python FlickrAPI.groups_pools_remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flickrapi.FlickrAPI
的用法示例。
在下文中一共展示了FlickrAPI.groups_pools_remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: remove_from_group
# 需要导入模块: from flickrapi import FlickrAPI [as 别名]
# 或者: from flickrapi.FlickrAPI import groups_pools_remove [as 别名]
def remove_from_group(self, token):
fapi = FlickrAPI(config["api_key"], config["api_secret"], token=token)
try:
rsp = fapi.groups_pools_remove(photo_id=self.image, group_id=config["group_id"])
except Exception, msg:
log.debug("Exception removing from group: %s" % (msg))
return False
示例2: FlickrAPI
# 需要导入模块: from flickrapi import FlickrAPI [as 别名]
# 或者: from flickrapi.FlickrAPI import groups_pools_remove [as 别名]
#!/usr/bin/env python
#test comment
import sys
from flickrapi import FlickrAPI
# Autenticazione
flickrAPIKey = "ea9b8730af07cd76f6dc4fde27744b74" # API key
flickrSecret = "45dfeeb5abec1ff9" # shared "secret"
gruppo='[email protected]'
# crea una istanza di FlickrAPI
fapi = FlickrAPI(flickrAPIKey, flickrSecret)
# ottieni un token valido
token = fapi.getToken(browser="firefox", perms="write")
rsp = fapi.auth_checkToken(api_key=flickrAPIKey, auth_token=token)
fapi.testFailure(rsp)
#grabba tutte le foto con il group id specificato
rsp = fapi.groups_pools_getPhotos(auth_token=token,api_key=flickrAPIKey,group_id=gruppo)
fapi.testFailure(rsp)
for a in rsp.photos[0].photo:
rsp = fapi.groups_pools_remove(api_key=flickrAPIKey,photo_id=a['id'],auth_token=token,group_id=gruppo)
fapi.testFailure(rsp,exit=0)