Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Realtime API用のヘルパーメソッドを追加 #32

Open
Alma-field opened this issue Oct 4, 2021 · 0 comments
Open

Realtime API用のヘルパーメソッドを追加 #32

Alma-field opened this issue Oct 4, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Alma-field
Copy link
Owner

追加するメソッド

twitcaspy.auth.app 以下各クラス

  • get_token: 各トークンを取得するメソッド
  • get_authorization: Authorizationヘッダーに使用する文字列を取得(e.g. Bearer <bearer_token>)

twitcaspy.api.API.wss_url(include_token=False) : returns wss_url

  • Realtime API用の接続URLを取得するメソッド
  • include_token パラメータで ?token=... を付加するか制御(デフォルト: False)
  • include_token がFalseの場合

twitcaspy.api.API.incoming_wss(data)

  • data はdict型 or str型
  • data がstrの場合json.loadsを行う
  • 返却値は twitcaspy.api.API.search_live_movies と同じ
  • その他は twitcaspy.api.API.incoming_webhookを参考にする

その他更新

  • examples/realtime/live.py
@Alma-field Alma-field added the enhancement New feature or request label Oct 4, 2021
@Alma-field Alma-field added this to the v1.3 - Add Helper Method milestone Oct 4, 2021
Alma-field added a commit that referenced this issue Oct 16, 2021
@Alma-field Alma-field modified the milestones: v1.3, v2.0 Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant