python的twitch模块

twitch-python的Python项目详细描述


抽搐Python

DiscordBuild Status

pip install --user twitch-python

一种面向对象的方法,用于访问TwitchAPI,并使用关系和智能缓存进行实时聊天。

要求

使用量

# Twitch APIimporttwitchhelix=twitch.Helix('client-id')
# Usersforuserinhelix.users('sodapoppin','reckful',24250859):print(user.display_name)print(helix.user('zarlach').display_name)
# Videosforvideoinhelix.videos([318017128,317650435]):print(video.title)print(helix.video(318017128).title)
# Video Comments (VOD chat)forcommentinhelix.video(318017128).comments:print(comment.commenter.display_name)forvideo,commentsinhelix.videos([318017128,317650435]).comments:forcommentincomments:print(comment.commenter.display_name,comment.message.body)forvideo,commentsinhelix.user('sodapoppin').videos().comments:forcommentincomments:print(comment.commenter.display_name,comment.message.body)foruser,videosinhelix.users('sodapoppin','reckful').videos(first=5):forvideo,commentsinvideos.comments:forcommentincomments:print(comment.commenter.display_name,comment.message.body)
# Twitch Chattwitch.Chat(channel='#sodapoppin',nickname='zarlach',oauth='oauth:xxxxxx').subscribe(lambdamessage:print(message.channel,message.user.display_name,message.text))

功能

  • 面向对象关系
  • 智能缓存
  • 新的Twitch API(螺旋)
  • 来自Twitch API V5的视频点播聊天

DocumentationTwitch APITwitch-Chat-Downloader

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Docker&SeleniumJava:无法在Docker容器上运行的chrome浏览器中上载图像/文件   在python中运行java命令   Java垃圾收集器异常行为   java java是否根据底层操作系统执行字节码级优化?   java是否可以休眠自定义查询返回映射而不是列表?   java Spring引导RabbitMQ接收器Jackson反序列化到POJO   apache flex在ActionScript3中创建对象相等“HashMap”作为java HashMap   java如何在Eclipse集成中切换JProfiler启动器   缓存JSP页面结果的java最佳实践?   java集成jaxb绑定文件,使用CXF生成基于WSDL的客户端   java为什么在上传操作结束之前,客户端没有检测到HttpServletResponse的PrintWriter内容?   java在接口内创建类和在类内创建接口有什么用   java向文件写入错误Android Studio   java合并多个RealmList并对结果列表排序?   谷歌API视觉java。lang.NoSuchMethodError   java如何使用逗号分别存储每个值,然后将它们存储到单独的数组中?