LoginSignup
2
1

More than 3 years have passed since last update.

2019-04-25 Qiitadon (Mastodon) > create_app()のto_fileで保存されるclient_id.txtの中身 | AnyPointSystem始めました

Last updated at Posted at 2019-04-25
動作環境
Ubuntu 18.04 LTS
Jupyter notebook
Python 3

QiitadonのAPIの練習中....

上記を参考にQiitadonへの接続を練習中

そもそも(in the first place)、client_id.txtのファイルフォーマットって?

公式ドキュメント

よくわからない
3行読んで眠杉謙信

公式(ソース)ドキュメント

https://github.com/halcy/Mastodon.py/blob/master/mastodon/Mastodon.py

create_app()

228行目の実装

(追記: 2019-04-28 ソースが変更され、228行ではなくなりました)

        if to_file is not None:
            with open(to_file, 'w') as secret_file:
                secret_file.write(response['client_id'] + '\n')
                secret_file.write(response['client_secret'] + '\n')

client_idとclient_secretのwriteか

なるほど

まとめ > client_id.txtの形式

  • 1行目: client_id
  • 2行目: client_secret

(client_id.txtという名前になっているのはわかりにくい原因?)

あとがき

その後、QiitadonでTootでき、過去のTootを取得できましたとさ。
めでたしめでたし

Special Thanks

@KEINOS さん
Qiitadonにて情報ありがとうございます。

AnyPointSystem始めました

2019-04-25 冷やし中華はまだ始まってないようですが、AnyPointSystem始めました。

詳細はそのうち公開しますが。

  • QiitadonのTootをデータとする
  • ポイント加算、表示システム

出荷(未定)

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1