Skip to content

Commit

Permalink
Merge pull request #35 from Alma-field/develop
Browse files Browse the repository at this point in the history
Release v1.1.0
  • Loading branch information
Alma-field committed Oct 5, 2021
2 parents 8627435 + cc8d519 commit 25f3e85
Show file tree
Hide file tree
Showing 33 changed files with 519 additions and 104 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Twitcaspy
# Copyright 2021 Alma-field
# See LICENSE for details.
#
# based on tweepy(https://github.com/tweepy/tweepy)
# Copyright (c) 2009-2021 Joshua Roesslein

name: Deploy

on:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Twitcaspy
# Copyright 2021 Alma-field
# See LICENSE for details.
#
# based on tweepy(https://github.com/tweepy/tweepy)
# Copyright (c) 2009-2021 Joshua Roesslein

name: test

on: [push, pull_request]
Expand All @@ -18,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev,test]
pip install .[test]
- name: Run tests
run: |
python setup.py nosetests
5 changes: 5 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

based on tweepy(https://github.com/tweepy/tweepy):
Copyright (c) 2009-2021 Joshua Roesslein
Released under the MIT license
https://github.com/tweepy/tweepy/blob/master/LICENSE
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
[![Python Versions](https://img.shields.io/pypi/pyversions/twitcaspy?label=Python)](https://pypi.org/project/twitcaspy/)

Twitcatting for Python
Python 3.7 - 3.9 are supported.

## Other language version
- [English](https://github.com/Alma-field/twitcaspy/blob/master/README.md)
- [Japanese](https://github.com/Alma-field/twitcaspy/blob/master/README_JA.md)

## Document
- [develop](https://twitcaspy.alma-field.com/en/latest)
- [latest (v1.0.2)](https://twitcaspy.alma-field.com/en/stable)
- [develop version](https://twitcaspy.alma-field.com/en/latest)
- [latest version(v1.1.0)](https://twitcaspy.alma-field.com/en/stable)
- [v1.1.0](https://twitcaspy.alma-field.com/en/1.1.0)
- [v1.0.2](https://twitcaspy.alma-field.com/en/1.0.2)
- [v1.0.1](https://twitcaspy.alma-field.com/en/1.0.1)
- [v1.0.0](https://twitcaspy.alma-field.com/en/1.0.0)
Expand All @@ -40,7 +42,28 @@ Alternatively, install directly from the GitHub repository:
pip install git+https://github.com/Alma-field/twitcaspy.git
```

Python 3.7 - 3.9 are supported.
## Examples
This is an execution example in the application scope.
Get the account name of ***@twitcasting_jp***.
```python
from twitcaspy import API, AppAuthHandler
auth = AppAuthHandler(client_id, client_secret)
api = API(auth)

print(api.get_user_info(id='twitcasting_jp').user.name)
# > ツイキャス公式
```

See in [examples](https://github.com/Alma-field/twitcaspy/tree/master/examples) for other examples and the entire code.
### Included example
- [Authorization](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth)
- [AppAuthHandler](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth/app.py)
- [GrantAuthHandler](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth/grant.py)
- [ImplicitAuthHandler](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth/implicit.py)
- [Realtime API](https://github.com/Alma-field/twitcaspy/blob/master/examples/realtime)
- [Webhook](https://github.com/Alma-field/twitcaspy/blob/master/examples/webhook)
- [Server](https://github.com/Alma-field/twitcaspy/blob/master/examples/webhook/server.py)
- [Client](https://github.com/Alma-field/twitcaspy/blob/master/examples/webhook/client.py)

## Source
This library is based on:
Expand Down
27 changes: 25 additions & 2 deletions README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
[![Python Versions](https://img.shields.io/pypi/pyversions/twitcaspy?label=Python)](https://pypi.org/project/twitcaspy/)

Python用Twitcattingクライアントライブラリ
Python 3.7 - 3.9 がサポートされています。

## Other language version/他言語版
- [English/英語](README.md)
- [Japanese/日本語](README_JA.md)

## ドキュメント
- [開発版](https://twitcaspy.alma-field.com/ja/latest)
- [最新版 (v1.0.2)](https://twitcaspy.alma-field.com/ja/stable)
- [最新版 (v1.1.0)](https://twitcaspy.alma-field.com/ja/stable)
- [v1.1.0](https://twitcaspy.alma-field.com/ja/1.1.0)
- [v1.0.2](https://twitcaspy.alma-field.com/ja/1.0.2)
- [v1.0.1](https://twitcaspy.alma-field.com/ja/1.0.1)
- [v1.0.0](https://twitcaspy.alma-field.com/ja/1.0.0)
Expand All @@ -39,7 +41,28 @@ pip install .
pip install git+https://github.com/Alma-field/twitcaspy.git
```

Python 3.7 - 3.9 がサポートされています。
##
アプリケーションスコープでの実行例です。
***@twitcasting_jp*** のアカウント名を取得します。
```python
from twitcaspy import API, AppAuthHandler
auth = AppAuthHandler(client_id, client_secret)
api = API(auth)

print(api.get_user_info(id='twitcasting_jp').user.name)
# > ツイキャス公式
```

その他の例やコード全体は[examples](https://github.com/Alma-field/twitcaspy/tree/master/examples)内のコードをご覧ください。
### 含まれている例
- [Authorization](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth)
- [AppAuthHandler](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth/app.py)
- [GrantAuthHandler](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth/grant.py)
- [ImplicitAuthHandler](https://github.com/Alma-field/twitcaspy/tree/master/examples/auth/implicit.py)
- [Realtime API](https://github.com/Alma-field/twitcaspy/blob/master/examples/realtime)
- [Webhook](https://github.com/Alma-field/twitcaspy/blob/master/examples/webhook)
- [Server](https://github.com/Alma-field/twitcaspy/blob/master/examples/webhook/server.py)
- [Client](https://github.com/Alma-field/twitcaspy/blob/master/examples/webhook/client.py)

## 出典
このライブラリは以下を参考にしています:
Expand Down
52 changes: 34 additions & 18 deletions docs/locale/ja/LC_MESSAGES/api.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: twitcaspy 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-02 16:29+0900\n"
"POT-Creation-Date: 2021-10-05 14:12+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Alma-field\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -93,10 +93,10 @@ msgstr "指定されたparserがParserインスタンスではない場合"
#: twitcaspy.api.API.get_current_live:26 twitcaspy.api.API.get_gifts:16
#: twitcaspy.api.API.get_live_thumbnail_image:24
#: twitcaspy.api.API.get_movie_info:20 twitcaspy.api.API.get_movies_by_user:33
#: twitcaspy.api.API.get_rtmp_url:16 twitcaspy.api.API.get_supporting_status:23
#: twitcaspy.api.API.get_rtmp_url:16 twitcaspy.api.API.get_supporting_status:30
#: twitcaspy.api.API.get_user_info:22 twitcaspy.api.API.get_webhook_list:34
#: twitcaspy.api.API.get_webm_url:14 twitcaspy.api.API.incoming_webhook:27
#: twitcaspy.api.API.post_comment:26 twitcaspy.api.API.register_webhook:31
#: twitcaspy.api.API.post_comment:28 twitcaspy.api.API.register_webhook:31
#: twitcaspy.api.API.remove_webhook:31 twitcaspy.api.API.search_live_movies:37
#: twitcaspy.api.API.search_users:25
#: twitcaspy.api.API.set_current_live_hashtag:18
Expand Down Expand Up @@ -481,10 +481,10 @@ msgstr "戻り値の型"
#: twitcaspy.api.API.get_comments:29 twitcaspy.api.API.get_current_live:21
#: twitcaspy.api.API.get_gifts:13 twitcaspy.api.API.get_movie_info:17
#: twitcaspy.api.API.get_movies_by_user:28 twitcaspy.api.API.get_rtmp_url:13
#: twitcaspy.api.API.get_supporting_status:18
#: twitcaspy.api.API.get_supporting_status:25
#: twitcaspy.api.API.get_user_info:17 twitcaspy.api.API.get_webhook_list:31
#: twitcaspy.api.API.get_webm_url:11 twitcaspy.api.API.incoming_webhook:22
#: twitcaspy.api.API.post_comment:21 twitcaspy.api.API.register_webhook:25
#: twitcaspy.api.API.post_comment:23 twitcaspy.api.API.register_webhook:25
#: twitcaspy.api.API.remove_webhook:25 twitcaspy.api.API.search_live_movies:29
#: twitcaspy.api.API.search_users:18
#: twitcaspy.api.API.set_current_live_hashtag:13
Expand All @@ -500,7 +500,7 @@ msgstr ""
#: of twitcaspy.api.API.get_current_live:23
#: twitcaspy.api.API.get_live_thumbnail_image:21
#: twitcaspy.api.API.get_movies_by_user:30
#: twitcaspy.api.API.get_supporting_status:20
#: twitcaspy.api.API.get_supporting_status:27
#: twitcaspy.api.API.get_user_info:19 twitcaspy.api.API.supporting_list:26
msgid "If both id and screen_id are not specified"
msgstr "idとscreen_idの両方が指定されていないとき"
Expand Down Expand Up @@ -611,7 +611,7 @@ msgid "Returns information about the specified movie."
msgstr "ライブ情報を取得します。"

#: of twitcaspy.api.API.delete_comment:9 twitcaspy.api.API.get_comments:4
#: twitcaspy.api.API.get_movie_info:3
#: twitcaspy.api.API.get_movie_info:3 twitcaspy.api.API.post_comment:4
msgid "|movie_id|"
msgstr "ライブのID"

Expand Down Expand Up @@ -997,7 +997,7 @@ msgstr "コメントを投稿します。"
msgid "It can be executed only on a user-by-user basis."
msgstr "ユーザ単位でのみ実行可能です。"

#: of twitcaspy.api.API.post_comment:4
#: of twitcaspy.api.API.post_comment:6
msgid "| Comment text to post. | Must be 1 to 140 characters."
msgstr ""

Expand All @@ -1009,7 +1009,7 @@ msgstr "投稿するコメント文章"
msgid "Must be 1 to 140 characters."
msgstr "1〜140文字である必要があります。"

#: of twitcaspy.api.API.post_comment:7
#: of twitcaspy.api.API.post_comment:9
msgid ""
"| Simultaneous posting to SNS. | (Valid only when the user is linked with"
" Twitter or Facebook.) | 'reply' : Post in a format that replies to the "
Expand All @@ -1036,7 +1036,7 @@ msgstr "'normal' : 通常の投稿"
msgid "'none' : No SNS posts."
msgstr "'none' : SNS投稿無し"

#: of twitcaspy.api.API.post_comment:14
#: of twitcaspy.api.API.post_comment:16
msgid ""
"| |attribute| | |latelimit| | **movie_id** : "
":class:`~twitcaspy.models.Raw` (:class:`str`) |movie_id| | "
Expand All @@ -1048,11 +1048,11 @@ msgstr ""
msgid "**comment** : :class:`~twitcaspy.models.Comment`"
msgstr ""

#: of twitcaspy.api.API.post_comment:23
#: of twitcaspy.api.API.post_comment:25
msgid "When comment is not 1-140 characters."
msgstr "comment が 1-140 文字でないとき"

#: of twitcaspy.api.API.post_comment:27
#: of twitcaspy.api.API.post_comment:29
msgid "https://apiv2-doc.twitcasting.tv/#post-comment"
msgstr ""

Expand Down Expand Up @@ -1169,27 +1169,43 @@ msgstr "対象ユーザの id または screen_id"
msgid "target user id or screen_id"
msgstr "対象ユーザの id または screen_id"

#: of twitcaspy.api.API.get_supporting_status:12
#: of twitcaspy.api.API.get_supporting_status:14
msgid ""
"Note that unlike :class:`~twitcaspy.models.Supporter`, there is no "
"supported_time attribute."
msgstr ":class:`~twitcaspy.models.Supporter` とは異なり、supported_time 属性がないことに注意してください。"

#: of twitcaspy.api.API.get_supporting_status:17
msgid ""
"| |attribute| | |latelimit| | **is_supporting** : "
":class:`~twitcaspy.models.Raw` (:class:`bool`) The status of whether "
"(id/screen_id) supported target_user_id. | **target_user** : "
":class:`~twitcaspy.models.User` Target user information"
"(id/screen_id) supported target_user_id. | **supported** : "
":class:`~twitcaspy.models.Raw` (:class:`int`) Unix time stamp of "
"supported datetime | **target_user** : :class:`~twitcaspy.models.User` "
"Target user information"
msgstr ""

#: of twitcaspy.api.API.get_supporting_status
msgid ""
"**is_supporting** : :class:`~twitcaspy.models.Raw` (:class:`bool`) "
"The status of whether (id/screen_id) supported target_user_id."
"**is_supporting** : :class:`~twitcaspy.models.Raw` (:class:`bool`) The "
"status of whether (id/screen_id) supported target_user_id."
msgstr ""
"**is_supporting** : :class:`~twitcaspy.models.Raw` (:class:`bool`) "
"(id/screen_id)がtarget_user_idをサポートしているかの状況を取得します。"

#: of twitcaspy.api.API.get_supporting_status
msgid ""
"**supported** : :class:`~twitcaspy.models.Raw` (:class:`int`) Unix time "
"stamp of supported datetime"
msgstr ""
"**supported** : :class:`~twitcaspy.models.Raw` (:class:`int`) "
"サポートした日時のunixタイムスタンプ"

#: of twitcaspy.api.API.get_supporting_status
msgid "**target_user** : :class:`~twitcaspy.models.User` Target user information"
msgstr "**target_user** : :class:`~twitcaspy.models.User` 対象ユーザ情報"

#: of twitcaspy.api.API.get_supporting_status:24
#: of twitcaspy.api.API.get_supporting_status:31
msgid "https://apiv2-doc.twitcasting.tv/#get-supporting-status"
msgstr ""

Expand Down
29 changes: 28 additions & 1 deletion docs/locale/ja/LC_MESSAGES/auth.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: twitcaspy 0.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-06-20 17:17+0900\n"
"POT-Creation-Date: 2021-10-04 15:58+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -34,7 +34,9 @@ msgstr ""

#: of twitcaspy.auth.app.AppAuthHandler twitcaspy.auth.auth.AuthHandler
#: twitcaspy.auth.grant.GrantAuthHandler
#: twitcaspy.auth.grant.GrantAuthHandler.set_access_token
#: twitcaspy.auth.implicit.ImplicitAuthHandler
#: twitcaspy.auth.implicit.ImplicitAuthHandler.set_access_token
#: twitcaspy.auth.oauth.basic.OAuth2Basic
#: twitcaspy.auth.oauth.bearer.OAuth2Bearer
msgid "Parameters"
Expand Down Expand Up @@ -107,6 +109,31 @@ msgstr ""
msgid "Get the authorization URL to redirect the user"
msgstr "ユーザー認証のためのリダイレクトURLを取得します"

#: of twitcaspy.auth.grant.GrantAuthHandler.set_access_token:1
#: twitcaspy.auth.implicit.ImplicitAuthHandler.set_access_token:1
msgid "Set bearer_token."
msgstr "Bearerトークンをセットします。"

#: of twitcaspy.auth.grant.GrantAuthHandler.set_access_token:3
#: twitcaspy.auth.implicit.ImplicitAuthHandler.set_access_token:3
msgid "bearer_token to use"
msgstr "使用するBearerトークン"

#: of twitcaspy.auth.grant.GrantAuthHandler.set_access_token
#: twitcaspy.auth.implicit.ImplicitAuthHandler.set_access_token
msgid "Returns"
msgstr ""

#: of twitcaspy.auth.grant.GrantAuthHandler.set_access_token
#: twitcaspy.auth.implicit.ImplicitAuthHandler.set_access_token
msgid "Return type"
msgstr ""

#: of twitcaspy.auth.grant.GrantAuthHandler.set_access_token:7
#: twitcaspy.auth.implicit.ImplicitAuthHandler.set_access_token:7
msgid ":class:`None`"
msgstr ""

#: ../../auth.rst:35
msgid "Implicit handler"
msgstr ""
Expand Down
Loading

0 comments on commit 25f3e85

Please sign in to comment.