Hatena Haiku for Python 3
Python
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
haiker
tests
.gitignore
LICENSE
MANIFEST.in
README.rst
check_api.py
setup-shippable.cfg
setup.py
shippable.yml

README.rst

hatena-haiker: Hatena Haiku for Python 3

hatena-haiker is an unofficial library for the Hatena Haiku API.

Examples

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)

Installation

pip3 install --upgrade hatena-haiker

Documentation

After completing the installation, execute the following:

python3 -m pydoc haiker