Me 用户操作类¶
敬告:本类提供的点赞,反对功能,请在使用前三思,并且绝对不要用于批量点赞,批量反对等不甚道德的脚本。和谐知乎,你我共建,谢谢理解。
-
class
zhihu.me.
Me
(url, name, motto, photo_url, session)[源代码]¶ 封装了相关操作(如点赞,关注问题)的类。 请使用
ZhihuClient.me()
方法获取实例。-
add_comment
(answer, content)[源代码]¶ 给指定答案添加评论
参数: - answer (Answer) – 答案对象
- content (string) – 评论内容
返回: 成功返回 True,失败返回 False
返回类型: bool
-
block
(something, block=True)[源代码]¶ 屏蔽某个用户、话题
参数: - something (Author/Topic) –
- block – True–>屏蔽,False–>取消屏蔽
返回: 成功返回 True,失败返回 False
返回类型: bool
-
follow
(something, follow=True)[源代码]¶ 关注用户、问题、话题或收藏夹
参数: - something (Author/Question/Topic) – 需要关注的对象
- follow (bool) – True–>关注,False–>取消关注
返回: 成功返回True,失败返回False
返回类型: bool
-
send_message
(author, content)[源代码]¶ 发送私信给一个用户
参数: - author (Author) – 接收私信用户对象
- content (string) – 发送给用户的私信内容
返回: 成功返回 True,失败返回 False
返回类型: bool
-
thanks
(answer, thanks=True)[源代码]¶ 感谢或取消感谢回答
参数: - answer (Answer) – 要感谢或取消感谢的回答
- thanks – True–>感谢,False–>取消感谢
返回: 成功返回True,失败返回False
返回类型: bool
-