Giter VIP home page Giter VIP logo

twitcaspy's People

Contributors

alma-field avatar

Watchers

 avatar

twitcaspy's Issues

get_supporting_statusでのtarget_user_idパラメータの追加

詳細

リクエストURLは /users/:user_id/supporting_status?target_user_id=:target_user_id であり
現在APIリクエストには target_user_id を送信する手段がありません。

  • 修正され次第 v1.0.1 リリースを行います。

対処

  • endpoint_parametersに target_user_id を追加する
  • ドキュメントを更新
  • テストを追加
  • v1.0.1 の準備

関連

ドキュメントの追加・更新

追加するドキュメントリスト

  • Getting started
  • Authentication Tutorial
  • Realtime API
  • Running Tests
  • Changelog
  • example
  • #7

更新するドキュメント

api.rst

Get Live Thumbnail Image / 公式ドキュメント

  • [戻り値]追加: 「ユーザーが配信中でない場合はオフライン画像を返します。」(ja only)

[戻り値]変更: movie_id のクラスを strへ変更(ja only)

Set Current Live Subtitle / 公式ドキュメント

  • [戻り値]変更: subtitle のクラスを strへ変更

Get Gifts / 公式ドキュメント

  • [パラメータ]削除: 「0以上の範囲で指定できます。」
  • [パラメータ]変更: slice_idのデフォルトを-1に変更

[パラメータ]変更: target_user_ids のデフォルト None を削除(with program)

Supporter List / 公式ドキュメント

  • [パラメータ]変更: sort を一番下へ移動

Search Live Movies / 公式ドキュメント

  • [パラメータ]変更: contextint クラスへ変更
  • [パラメータ]変更: type=category の際の contextstrクラスへ変更

Get RTMP Url / 公式ドキュメント

  • [パラメータ]変更: stream_key / of を or に変更

models.rst

Movie

Gift

unit testの追加

不足しているunit test の追加を行う
後日追加予定

追加するテスト

Comment

  • delete_comment

e.g.

  • メソッド名(特機事項/エラーチェックなど)

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

追加するメソッド

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

examplesの追加

追加する例

Authorization examples

  • GrantAuthHandler
  • ImplicitAuthHandler

Realtime API examples

  • lives

Release workflow の修正

原因

secretsが正常に渡されていないため下記エラーが発生している
これは v1.0.1リリースの一部になる予定です。

HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/
Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information.

詳細

修正内容

  • Project Secretに TWINE_PASSWORD を追加
  • deploy.ymlから PYPI_USERNAME を削除

READMEファイルの修正

修正内容

  • Documentation Statusの重複状態の修正
  • Deploy workflowバッジの追加
  • v1.0.0 ドキュメントへのリンクを削除

datetime型を分離

現在 複数のクラスにて intdatetime型へ変換している。
これを LateLimit クラスと同様に datetimeint 型へ戻し、
_time サフィックス(接尾辞) を付加したメンバを追加、 datetimeint 型として提供する。

対象クラス

  • Movie
  • Comment

post_commentでのmovie_idパラメータの追加

詳細

リクエストURLは /movies/:movie_id/comments であり
現在APIリクエストには movie_id を指定する手段がありません。

  • これは v1.0.2 リリースの一部となる予定です。

対処

  • movie_idパラメータ を追加する
  • ドキュメントを更新
  • テストを追加

関連

set_access_tokenメソッドの追加

既にAccessTokenを所持している際に再度APIインスタンスを作成する場合

from twitcaspy import API, GrantAuthHandler
from twitcaspy.auth.oauth import OAuth2Bearer

auth = GrantAuthHandler(client_id, client_secret)
auth.auth = OAuth2Bearer(access_token)
api = API(auth)

となる。これを以下のように改善したい。

from twitcaspy import API, GrantAuthHandler

auth = GrantAuthHandler(client_id, client_secret)
auth.set_access_token(access_token)
api = API(auth)
  • これは v1.1 リリースの一部となる予定です。

参考

tweepyでの実装

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.