Skip to main content

BOCCO API Client

Project description

https://app.wercker.com/status/4c4b21fefec1c211cd3961f72d1b9078/s/master

コミュニケーションロボット BOCCO を操作するための BOCCO API を Python から操作するためのライブラリです。

ドキュメント: https://yukai.github.io/bocco-api-python/

セットアップ

$ git clone https://github.com/YUKAI/bocco-api-python.git
$ cd bocco-api-python
$ python setup.py install

サンプル

api = bocco.api.Client('ACCESS TOKEN')
# 新しいセッションを開始する場合
#api = bocco.api.Client.signin('API KEY', 'test@example.com', 'pass')
#print(api.access_token)

# 全ての部屋にメッセージを送る
for room in api.get_rooms()
    api.post_text_message(room['uuid'], 'hello')

コマンドラインツール

Usage: boccotools.py [OPTIONS] COMMAND [ARGS]...

  BOCCO API http://api-docs.bocco.me/ を CLI で操作するツール

Options:
  --config PATH
  --access-token TEXT
  --help               Show this message and exit.

Commands:
  messages  指定した部屋のメッセージを表示
  rooms     部屋一覧を表示
  send      テキストメッセージを送信.
  web       Web サーバ上で API クライアントを起

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bocco-0.1.2.tar.gz (8.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page