本文整理汇总了Python中api.API.unread方法的典型用法代码示例。如果您正苦于以下问题:Python API.unread方法的具体用法?Python API.unread怎么用?Python API.unread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api.API
的用法示例。
在下文中一共展示了API.unread方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SinaAPI
# 需要导入模块: from api import API [as 别名]
# 或者: from api.API import unread [as 别名]
#.........这里部分代码省略.........
@check_remain_requests('Too many requests in getCommentsToMe')
def getShortStatus(self, url_short):
'''
获取短链的微博分享数
'''
return self.api.short_status(url_short=url_short)
@check_remain_requests('Too many requests in getCommentsToMe')
def getShorten(self, url_long):
'''
根据长链接获取微博的短链接
'''
return self.api.shorten(url_long=url_long)
@check_remain_requests('Too many requests in getCommentsToMe')
def getUserCount(self, uids):
'''
批量得到用户信息
'''
logger.info('api-nail')
return self.api.users_count(uids=uids)
@check_remain_requests('Too many requests in getCommentsToMe')
def getCommentsByMe(self, since_id, count=200, page=1):
logger.info('api-nail')
return self.api.comments_by_me(since_id=since_id, count=count, page=page)
@check_remain_requests('Too many requests in getComments')
def getUnread(self):
logger.info('api-nail')
return self.api.unread()
@check_remain_requests('Too many requests in getComments')
def getEmotions(self):
logger.info('api-nail')
return self.api.emotions()
@check_remain_requests('Too many requests in getComments')
def getComments(self, status_id, count=200, page=1):
logger.info('api-nail')
return self.api.comments(status_id, count=count, page=page)
@check_remain_requests('Too many requests in getComments')
def getMentions(self, since_id, count=200, page=1):
logger.info('api-nail')
return self.api.mentions(since_id=since_id, count=count, page=page)
@check_remain_requests('Too many requests in getLimitedFriendsIds')
def getLimitedFriendsIds(self, cursor=-1, count=20):
logger.info('api-nail')
status = self.api.friends_ids(cursor=cursor, count=count)
return {'ids':status.ids, 'next_cursor':status.next_cursor}
@check_remain_requests('Too many requests in getUser')
def getUser(self,user_id):
#logger.info('api-nail')
status = self.api.get_user(uid=user_id)
return status
@check_remain_requests('Too many requests in getUser')
def getUserByName(self, screen_name=None):