Skip to main content

用于 Python 3 的 Hatena Haiku

项目描述

https://img.shields.io/pypi/v/hatena-haiker.svg

hatena-haiker 是Hatena Haiku API 的非官方库。

例子

import haiker
api = haiker.Haiker()
for status in api.public_timeline(count=3, body_formats=['haiku']):
    created_at = status.created_at.strftime('%Y-%m-%d %H:%M:%S')
    print(created_at, status.user.id, status.keyword)
    print(status.haiku_text)
    print()
import haiker
auth = haiker.OAuth('MyConsumerKey', 'MyConsumerSecret',
                    'MyAccessToken', 'MyAccessTokenSecret')
api = haiker.Haiker(auth)
status = api.update_status('BOT', 'Hello, world!', source='API')
api.add_star(status.id)

安装

pip3 install --upgrade hatena-haiker

文档

安装完成后,执行以下命令:

python3 -m pydoc haiker

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

hatena-haiker-0.4.0.tar.gz (13.3 kB 查看哈希)

已上传 source