aiotraq 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aiotraq-0.1.0/PKG-INFO +141 -0
- aiotraq-0.1.0/README.md +117 -0
- aiotraq-0.1.0/aiotraq/__init__.py +8 -0
- aiotraq-0.1.0/aiotraq/api/__init__.py +1 -0
- aiotraq-0.1.0/aiotraq/api/activity/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/activity/get_activity_timeline.py +208 -0
- aiotraq-0.1.0/aiotraq/api/activity/get_online_users.py +129 -0
- aiotraq-0.1.0/aiotraq/api/authentication/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/authentication/get_my_external_accounts.py +139 -0
- aiotraq-0.1.0/aiotraq/api/authentication/get_my_sessions.py +139 -0
- aiotraq-0.1.0/aiotraq/api/authentication/link_external_account.py +113 -0
- aiotraq-0.1.0/aiotraq/api/authentication/login.py +129 -0
- aiotraq-0.1.0/aiotraq/api/authentication/logout.py +116 -0
- aiotraq-0.1.0/aiotraq/api/authentication/revoke_my_session.py +99 -0
- aiotraq-0.1.0/aiotraq/api/authentication/unlink_external_account.py +109 -0
- aiotraq-0.1.0/aiotraq/api/bot/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/bot/activate_bot.py +103 -0
- aiotraq-0.1.0/aiotraq/api/bot/change_bot_icon.py +123 -0
- aiotraq-0.1.0/aiotraq/api/bot/connect_bot_ws.py +151 -0
- aiotraq-0.1.0/aiotraq/api/bot/create_bot.py +182 -0
- aiotraq-0.1.0/aiotraq/api/bot/delete_bot.py +103 -0
- aiotraq-0.1.0/aiotraq/api/bot/edit_bot.py +124 -0
- aiotraq-0.1.0/aiotraq/api/bot/get_bot.py +206 -0
- aiotraq-0.1.0/aiotraq/api/bot/get_bot_icon.py +161 -0
- aiotraq-0.1.0/aiotraq/api/bot/get_bot_logs.py +209 -0
- aiotraq-0.1.0/aiotraq/api/bot/get_bots.py +171 -0
- aiotraq-0.1.0/aiotraq/api/bot/get_channel_bots.py +166 -0
- aiotraq-0.1.0/aiotraq/api/bot/inactivate_bot.py +101 -0
- aiotraq-0.1.0/aiotraq/api/bot/let_bot_join_channel.py +124 -0
- aiotraq-0.1.0/aiotraq/api/bot/let_bot_leave_channel.py +122 -0
- aiotraq-0.1.0/aiotraq/api/bot/reissue_bot.py +168 -0
- aiotraq-0.1.0/aiotraq/api/channel/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/channel/create_channel.py +181 -0
- aiotraq-0.1.0/aiotraq/api/channel/edit_channel.py +126 -0
- aiotraq-0.1.0/aiotraq/api/channel/edit_channel_subscribers.py +124 -0
- aiotraq-0.1.0/aiotraq/api/channel/edit_channel_topic.py +120 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel.py +161 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel_events.py +282 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel_pins.py +166 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel_stats.py +161 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel_subscribers.py +163 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel_topic.py +161 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channel_viewers.py +166 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_channels.py +162 -0
- aiotraq-0.1.0/aiotraq/api/channel/get_messages.py +282 -0
- aiotraq-0.1.0/aiotraq/api/channel/set_channel_subscribers.py +124 -0
- aiotraq-0.1.0/aiotraq/api/clip/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/clip/clip_message.py +190 -0
- aiotraq-0.1.0/aiotraq/api/clip/create_clip_folder.py +175 -0
- aiotraq-0.1.0/aiotraq/api/clip/delete_clip_folder.py +99 -0
- aiotraq-0.1.0/aiotraq/api/clip/edit_clip_folder.py +118 -0
- aiotraq-0.1.0/aiotraq/api/clip/get_clip_folder.py +161 -0
- aiotraq-0.1.0/aiotraq/api/clip/get_clip_folders.py +139 -0
- aiotraq-0.1.0/aiotraq/api/clip/get_clips.py +226 -0
- aiotraq-0.1.0/aiotraq/api/clip/unclip_message.py +108 -0
- aiotraq-0.1.0/aiotraq/api/file/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/file/delete_file.py +103 -0
- aiotraq-0.1.0/aiotraq/api/file/get_file.py +189 -0
- aiotraq-0.1.0/aiotraq/api/file/get_file_meta.py +168 -0
- aiotraq-0.1.0/aiotraq/api/file/get_files.py +300 -0
- aiotraq-0.1.0/aiotraq/api/file/get_thumbnail_image.py +194 -0
- aiotraq-0.1.0/aiotraq/api/file/post_file.py +180 -0
- aiotraq-0.1.0/aiotraq/api/group/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/group/add_user_group_admin.py +122 -0
- aiotraq-0.1.0/aiotraq/api/group/add_user_group_member.py +122 -0
- aiotraq-0.1.0/aiotraq/api/group/change_user_group_icon.py +121 -0
- aiotraq-0.1.0/aiotraq/api/group/create_user_group.py +181 -0
- aiotraq-0.1.0/aiotraq/api/group/delete_user_group.py +103 -0
- aiotraq-0.1.0/aiotraq/api/group/edit_user_group.py +124 -0
- aiotraq-0.1.0/aiotraq/api/group/edit_user_group_member.py +129 -0
- aiotraq-0.1.0/aiotraq/api/group/get_user_group.py +161 -0
- aiotraq-0.1.0/aiotraq/api/group/get_user_group_admins.py +160 -0
- aiotraq-0.1.0/aiotraq/api/group/get_user_group_members.py +166 -0
- aiotraq-0.1.0/aiotraq/api/group/get_user_groups.py +139 -0
- aiotraq-0.1.0/aiotraq/api/group/remove_user_group_admin.py +114 -0
- aiotraq-0.1.0/aiotraq/api/group/remove_user_group_member.py +112 -0
- aiotraq-0.1.0/aiotraq/api/me/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/me/add_my_star.py +113 -0
- aiotraq-0.1.0/aiotraq/api/me/add_my_user_tag.py +174 -0
- aiotraq-0.1.0/aiotraq/api/me/change_my_icon.py +110 -0
- aiotraq-0.1.0/aiotraq/api/me/change_my_notify_citation.py +109 -0
- aiotraq-0.1.0/aiotraq/api/me/change_my_password.py +111 -0
- aiotraq-0.1.0/aiotraq/api/me/edit_me.py +109 -0
- aiotraq-0.1.0/aiotraq/api/me/get_me.py +130 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_channel_subscriptions.py +139 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_icon.py +137 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_notify_citation.py +134 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_qr_code.py +166 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_stars.py +129 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_unread_channels.py +139 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_user_tags.py +139 -0
- aiotraq-0.1.0/aiotraq/api/me/get_my_view_states.py +139 -0
- aiotraq-0.1.0/aiotraq/api/me/get_oidc_user_info.py +134 -0
- aiotraq-0.1.0/aiotraq/api/me/get_user_settings.py +130 -0
- aiotraq-0.1.0/aiotraq/api/me/read_channel.py +97 -0
- aiotraq-0.1.0/aiotraq/api/me/register_fcm_device.py +109 -0
- aiotraq-0.1.0/aiotraq/api/me/remove_my_star.py +97 -0
- aiotraq-0.1.0/aiotraq/api/me/set_channel_subscribe_level.py +120 -0
- aiotraq-0.1.0/aiotraq/api/message/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/message/add_message_stamp.py +125 -0
- aiotraq-0.1.0/aiotraq/api/message/create_pin.py +168 -0
- aiotraq-0.1.0/aiotraq/api/message/delete_message.py +105 -0
- aiotraq-0.1.0/aiotraq/api/message/edit_message.py +124 -0
- aiotraq-0.1.0/aiotraq/api/message/get_direct_messages.py +282 -0
- aiotraq-0.1.0/aiotraq/api/message/get_message.py +161 -0
- aiotraq-0.1.0/aiotraq/api/message/get_message_clips.py +166 -0
- aiotraq-0.1.0/aiotraq/api/message/get_message_stamps.py +166 -0
- aiotraq-0.1.0/aiotraq/api/message/get_pin.py +161 -0
- aiotraq-0.1.0/aiotraq/api/message/post_direct_message.py +187 -0
- aiotraq-0.1.0/aiotraq/api/message/post_message.py +195 -0
- aiotraq-0.1.0/aiotraq/api/message/remove_message_stamp.py +106 -0
- aiotraq-0.1.0/aiotraq/api/message/remove_pin.py +101 -0
- aiotraq-0.1.0/aiotraq/api/message/search_messages.py +409 -0
- aiotraq-0.1.0/aiotraq/api/notification/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/notification/ws.py +723 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/create_client.py +171 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/delete_client.py +103 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/edit_client.py +124 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/get_client.py +206 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/get_clients.py +175 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/get_my_tokens.py +139 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/get_o_auth_2_authorize.py +191 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/post_o_auth_2_authorize.py +111 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/post_o_auth_2_authorize_decide.py +111 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/post_o_auth_2_token.py +174 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/revoke_my_token.py +99 -0
- aiotraq-0.1.0/aiotraq/api/oauth2/revoke_o_auth_2_token.py +107 -0
- aiotraq-0.1.0/aiotraq/api/ogp/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/ogp/delete_ogp_cache.py +107 -0
- aiotraq-0.1.0/aiotraq/api/ogp/get_ogp.py +173 -0
- aiotraq-0.1.0/aiotraq/api/public/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/public/get_public_user_icon.py +161 -0
- aiotraq-0.1.0/aiotraq/api/public/get_server_version.py +130 -0
- aiotraq-0.1.0/aiotraq/api/stamp/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/stamp/change_stamp_image.py +119 -0
- aiotraq-0.1.0/aiotraq/api/stamp/create_stamp.py +176 -0
- aiotraq-0.1.0/aiotraq/api/stamp/create_stamp_palette.py +171 -0
- aiotraq-0.1.0/aiotraq/api/stamp/delete_stamp.py +103 -0
- aiotraq-0.1.0/aiotraq/api/stamp/delete_stamp_palette.py +103 -0
- aiotraq-0.1.0/aiotraq/api/stamp/edit_stamp.py +122 -0
- aiotraq-0.1.0/aiotraq/api/stamp/edit_stamp_palette.py +124 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_my_stamp_history.py +183 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_stamp.py +161 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_stamp_image.py +161 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_stamp_palette.py +161 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_stamp_palettes.py +139 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_stamp_stats.py +161 -0
- aiotraq-0.1.0/aiotraq/api/stamp/get_stamps.py +191 -0
- aiotraq-0.1.0/aiotraq/api/user/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/user/add_user_tag.py +197 -0
- aiotraq-0.1.0/aiotraq/api/user/change_user_icon.py +123 -0
- aiotraq-0.1.0/aiotraq/api/user/change_user_password.py +122 -0
- aiotraq-0.1.0/aiotraq/api/user/create_user.py +181 -0
- aiotraq-0.1.0/aiotraq/api/user/edit_user.py +122 -0
- aiotraq-0.1.0/aiotraq/api/user/edit_user_tag.py +127 -0
- aiotraq-0.1.0/aiotraq/api/user/get_user.py +161 -0
- aiotraq-0.1.0/aiotraq/api/user/get_user_dm_channel.py +165 -0
- aiotraq-0.1.0/aiotraq/api/user/get_user_icon.py +161 -0
- aiotraq-0.1.0/aiotraq/api/user/get_user_stats.py +161 -0
- aiotraq-0.1.0/aiotraq/api/user/get_user_tags.py +166 -0
- aiotraq-0.1.0/aiotraq/api/user/get_users.py +197 -0
- aiotraq-0.1.0/aiotraq/api/user/remove_user_tag.py +108 -0
- aiotraq-0.1.0/aiotraq/api/user_tag/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/user_tag/edit_my_user_tag.py +118 -0
- aiotraq-0.1.0/aiotraq/api/user_tag/get_tag.py +161 -0
- aiotraq-0.1.0/aiotraq/api/user_tag/remove_my_user_tag.py +99 -0
- aiotraq-0.1.0/aiotraq/api/webhook/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/webhook/change_webhook_icon.py +119 -0
- aiotraq-0.1.0/aiotraq/api/webhook/create_webhook.py +175 -0
- aiotraq-0.1.0/aiotraq/api/webhook/delete_webhook.py +101 -0
- aiotraq-0.1.0/aiotraq/api/webhook/edit_webhook.py +118 -0
- aiotraq-0.1.0/aiotraq/api/webhook/get_webhook.py +161 -0
- aiotraq-0.1.0/aiotraq/api/webhook/get_webhook_icon.py +161 -0
- aiotraq-0.1.0/aiotraq/api/webhook/get_webhook_messages.py +282 -0
- aiotraq-0.1.0/aiotraq/api/webhook/get_webhooks.py +175 -0
- aiotraq-0.1.0/aiotraq/api/webrtc/__init__.py +0 -0
- aiotraq-0.1.0/aiotraq/api/webrtc/get_web_rtc_state.py +141 -0
- aiotraq-0.1.0/aiotraq/api/webrtc/post_web_rtc_authenticate.py +174 -0
- aiotraq-0.1.0/aiotraq/client.py +268 -0
- aiotraq-0.1.0/aiotraq/errors.py +16 -0
- aiotraq-0.1.0/aiotraq/models/__init__.py +281 -0
- aiotraq-0.1.0/aiotraq/models/active_o_auth_2_token.py +95 -0
- aiotraq-0.1.0/aiotraq/models/activity_timeline_message.py +101 -0
- aiotraq-0.1.0/aiotraq/models/bot.py +134 -0
- aiotraq-0.1.0/aiotraq/models/bot_detail.py +172 -0
- aiotraq-0.1.0/aiotraq/models/bot_event_log.py +112 -0
- aiotraq-0.1.0/aiotraq/models/bot_event_result.py +11 -0
- aiotraq-0.1.0/aiotraq/models/bot_mode.py +9 -0
- aiotraq-0.1.0/aiotraq/models/bot_state.py +10 -0
- aiotraq-0.1.0/aiotraq/models/bot_tokens.py +67 -0
- aiotraq-0.1.0/aiotraq/models/bot_user.py +67 -0
- aiotraq-0.1.0/aiotraq/models/change_stamp_image_body.py +76 -0
- aiotraq-0.1.0/aiotraq/models/channel.py +113 -0
- aiotraq-0.1.0/aiotraq/models/channel_event.py +223 -0
- aiotraq-0.1.0/aiotraq/models/channel_event_type.py +16 -0
- aiotraq-0.1.0/aiotraq/models/channel_list.py +96 -0
- aiotraq-0.1.0/aiotraq/models/channel_stats.py +109 -0
- aiotraq-0.1.0/aiotraq/models/channel_stats_stamp.py +75 -0
- aiotraq-0.1.0/aiotraq/models/channel_stats_user.py +67 -0
- aiotraq-0.1.0/aiotraq/models/channel_subscribe_level.py +10 -0
- aiotraq-0.1.0/aiotraq/models/channel_topic.py +59 -0
- aiotraq-0.1.0/aiotraq/models/channel_view_state.py +10 -0
- aiotraq-0.1.0/aiotraq/models/channel_viewer.py +79 -0
- aiotraq-0.1.0/aiotraq/models/child_created_event.py +67 -0
- aiotraq-0.1.0/aiotraq/models/clip_folder.py +93 -0
- aiotraq-0.1.0/aiotraq/models/clipped_message.py +75 -0
- aiotraq-0.1.0/aiotraq/models/dm_channel.py +67 -0
- aiotraq-0.1.0/aiotraq/models/external_provider_user.py +75 -0
- aiotraq-0.1.0/aiotraq/models/file_info.py +190 -0
- aiotraq-0.1.0/aiotraq/models/file_info_thumbnail_type_0.py +81 -0
- aiotraq-0.1.0/aiotraq/models/forced_notification_changed_event.py +67 -0
- aiotraq-0.1.0/aiotraq/models/get_channel_events_order.py +9 -0
- aiotraq-0.1.0/aiotraq/models/get_clips_order.py +9 -0
- aiotraq-0.1.0/aiotraq/models/get_direct_messages_order.py +9 -0
- aiotraq-0.1.0/aiotraq/models/get_files_order.py +9 -0
- aiotraq-0.1.0/aiotraq/models/get_messages_order.py +9 -0
- aiotraq-0.1.0/aiotraq/models/get_notify_citation.py +59 -0
- aiotraq-0.1.0/aiotraq/models/get_stamps_type.py +9 -0
- aiotraq-0.1.0/aiotraq/models/get_webhook_messages_order.py +9 -0
- aiotraq-0.1.0/aiotraq/models/login_session.py +69 -0
- aiotraq-0.1.0/aiotraq/models/message.py +145 -0
- aiotraq-0.1.0/aiotraq/models/message_clip.py +69 -0
- aiotraq-0.1.0/aiotraq/models/message_pin.py +69 -0
- aiotraq-0.1.0/aiotraq/models/message_stamp.py +93 -0
- aiotraq-0.1.0/aiotraq/models/my_channel_view_state.py +77 -0
- aiotraq-0.1.0/aiotraq/models/my_user_detail.py +216 -0
- aiotraq-0.1.0/aiotraq/models/name_changed_event.py +75 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_authorization.py +148 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_client.py +101 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_client_detail.py +117 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_decide.py +58 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_prompt.py +8 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_response_type.py +10 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_revoke.py +59 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_scope.py +12 -0
- aiotraq-0.1.0/aiotraq/models/o_auth_2_token.py +104 -0
- aiotraq-0.1.0/aiotraq/models/ogp.py +121 -0
- aiotraq-0.1.0/aiotraq/models/ogp_media.py +115 -0
- aiotraq-0.1.0/aiotraq/models/oidc_traq_user_info.py +192 -0
- aiotraq-0.1.0/aiotraq/models/oidc_user_info.py +116 -0
- aiotraq-0.1.0/aiotraq/models/parent_changed_event.py +75 -0
- aiotraq-0.1.0/aiotraq/models/patch_bot_request.py +126 -0
- aiotraq-0.1.0/aiotraq/models/patch_channel_request.py +86 -0
- aiotraq-0.1.0/aiotraq/models/patch_channel_subscribers_request.py +72 -0
- aiotraq-0.1.0/aiotraq/models/patch_client_request.py +86 -0
- aiotraq-0.1.0/aiotraq/models/patch_clip_folder_request.py +68 -0
- aiotraq-0.1.0/aiotraq/models/patch_group_member_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/patch_me_request.py +87 -0
- aiotraq-0.1.0/aiotraq/models/patch_stamp_palette_request.py +79 -0
- aiotraq-0.1.0/aiotraq/models/patch_stamp_request.py +68 -0
- aiotraq-0.1.0/aiotraq/models/patch_user_group_request.py +77 -0
- aiotraq-0.1.0/aiotraq/models/patch_user_request.py +97 -0
- aiotraq-0.1.0/aiotraq/models/patch_user_tag_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/patch_webhook_request.py +95 -0
- aiotraq-0.1.0/aiotraq/models/pin.py +83 -0
- aiotraq-0.1.0/aiotraq/models/pin_added_event.py +67 -0
- aiotraq-0.1.0/aiotraq/models/pin_removed_event.py +67 -0
- aiotraq-0.1.0/aiotraq/models/post_bot_action_join_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_bot_action_leave_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_bot_request.py +100 -0
- aiotraq-0.1.0/aiotraq/models/post_channel_request.py +74 -0
- aiotraq-0.1.0/aiotraq/models/post_client_request.py +93 -0
- aiotraq-0.1.0/aiotraq/models/post_clip_folder_message_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_clip_folder_request.py +67 -0
- aiotraq-0.1.0/aiotraq/models/post_file_request.py +92 -0
- aiotraq-0.1.0/aiotraq/models/post_link_external_account.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_login_request.py +67 -0
- aiotraq-0.1.0/aiotraq/models/post_message_request.py +70 -0
- aiotraq-0.1.0/aiotraq/models/post_message_stamp_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_my_fcm_device_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_o_auth_2_token.py +141 -0
- aiotraq-0.1.0/aiotraq/models/post_stamp_palette_request.py +75 -0
- aiotraq-0.1.0/aiotraq/models/post_stamp_request.py +88 -0
- aiotraq-0.1.0/aiotraq/models/post_star_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_unlink_external_account.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_user_group_admin.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_user_group_request.py +75 -0
- aiotraq-0.1.0/aiotraq/models/post_user_request.py +70 -0
- aiotraq-0.1.0/aiotraq/models/post_user_tag_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_web_rtc_authenticate_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/post_webhook_request.py +83 -0
- aiotraq-0.1.0/aiotraq/models/put_channel_subscribe_level_request.py +64 -0
- aiotraq-0.1.0/aiotraq/models/put_channel_subscribers_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/put_channel_topic_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/put_my_password_request.py +67 -0
- aiotraq-0.1.0/aiotraq/models/put_notify_citation_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/put_user_icon_request.py +77 -0
- aiotraq-0.1.0/aiotraq/models/put_user_password_request.py +59 -0
- aiotraq-0.1.0/aiotraq/models/search_messages_message_search_result.py +81 -0
- aiotraq-0.1.0/aiotraq/models/search_messages_sort.py +11 -0
- aiotraq-0.1.0/aiotraq/models/stamp.py +109 -0
- aiotraq-0.1.0/aiotraq/models/stamp_history_entry.py +69 -0
- aiotraq-0.1.0/aiotraq/models/stamp_palette.py +109 -0
- aiotraq-0.1.0/aiotraq/models/stamp_stats.py +67 -0
- aiotraq-0.1.0/aiotraq/models/stamp_with_thumbnail.py +117 -0
- aiotraq-0.1.0/aiotraq/models/subscribers_changed_event.py +75 -0
- aiotraq-0.1.0/aiotraq/models/tag.py +75 -0
- aiotraq-0.1.0/aiotraq/models/thumbnail_info.py +87 -0
- aiotraq-0.1.0/aiotraq/models/thumbnail_type.py +9 -0
- aiotraq-0.1.0/aiotraq/models/topic_changed_event.py +75 -0
- aiotraq-0.1.0/aiotraq/models/unread_channel.py +101 -0
- aiotraq-0.1.0/aiotraq/models/user.py +114 -0
- aiotraq-0.1.0/aiotraq/models/user_account_state.py +10 -0
- aiotraq-0.1.0/aiotraq/models/user_detail.py +199 -0
- aiotraq-0.1.0/aiotraq/models/user_group.py +139 -0
- aiotraq-0.1.0/aiotraq/models/user_group_member.py +67 -0
- aiotraq-0.1.0/aiotraq/models/user_permission.py +89 -0
- aiotraq-0.1.0/aiotraq/models/user_settings.py +67 -0
- aiotraq-0.1.0/aiotraq/models/user_stats.py +91 -0
- aiotraq-0.1.0/aiotraq/models/user_stats_stamp.py +75 -0
- aiotraq-0.1.0/aiotraq/models/user_subscribe_state.py +72 -0
- aiotraq-0.1.0/aiotraq/models/user_tag.py +93 -0
- aiotraq-0.1.0/aiotraq/models/version.py +81 -0
- aiotraq-0.1.0/aiotraq/models/version_flags.py +66 -0
- aiotraq-0.1.0/aiotraq/models/visibility_changed_event.py +67 -0
- aiotraq-0.1.0/aiotraq/models/web_rtc_authenticate_result.py +83 -0
- aiotraq-0.1.0/aiotraq/models/web_rtc_user_state.py +89 -0
- aiotraq-0.1.0/aiotraq/models/web_rtc_user_state_sessions_item.py +66 -0
- aiotraq-0.1.0/aiotraq/models/webhook.py +125 -0
- aiotraq-0.1.0/aiotraq/py.typed +1 -0
- aiotraq-0.1.0/aiotraq/types.py +45 -0
- aiotraq-0.1.0/pyproject.toml +42 -0
aiotraq-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aiotraq
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Async ready traQ API Client
|
|
5
|
+
Home-page: https://github.com/toshi-pono/aiotraq
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: traQ,API,async,httpx
|
|
8
|
+
Author: toshi00
|
|
9
|
+
Requires-Python: >=3.8,<4.0
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Requires-Dist: attrs (>=21.3.0)
|
|
18
|
+
Requires-Dist: httpx (>=0.20.0,<0.28.0)
|
|
19
|
+
Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
|
|
20
|
+
Project-URL: Repository, https://github.com/toshi-pono/aiotraq
|
|
21
|
+
Project-URL: Source Code, https://github.com/toshi-pono/aiotraq/tree/main/libs/aiotraq
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# aiotraq
|
|
25
|
+
|
|
26
|
+
Async ready traQ API Client for Python
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
TODO
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
`AuthenticatedClient`を用いて API クライアントを作成し API を叩くことができます。
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
import os
|
|
38
|
+
from aiotraq import AuthenticatedClient
|
|
39
|
+
from aiotraq.api.channel import get_channels
|
|
40
|
+
|
|
41
|
+
BOT_ACCESS_TOKEN = os.getenv("BOT_ACCESS_TOKEN")
|
|
42
|
+
assert BOT_ACCESS_TOKEN is not None
|
|
43
|
+
|
|
44
|
+
client = AuthenticatedClient(base_url="https://q.trap.jp/api/v3", token=BOT_ACCESS_TOKEN)
|
|
45
|
+
|
|
46
|
+
with client as client:
|
|
47
|
+
channels = get_channels.sync_detailed(client=client)
|
|
48
|
+
print(channels.status_code)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
API の利用例: チャンネル一覧の取得
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
with client as client:
|
|
55
|
+
channels: ChannelList = get_channels.sync(client=client)
|
|
56
|
+
# status_code などの情報も利用したい場合
|
|
57
|
+
response: Response[ChannelList] = get_channels.sync_detailed(client=client)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
非同期版も利用可能です:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
with client as client:
|
|
64
|
+
channels: ChannelList = await get_channels.asyncio(client=client)
|
|
65
|
+
response: Response[ChannelList] = await get_channels.asyncio_detailed(client=client)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Advanced customizations
|
|
69
|
+
|
|
70
|
+
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
client = AuthenticatedClient(
|
|
74
|
+
base_url="https://internal_api.example.com",
|
|
75
|
+
token="SuperSecretToken",
|
|
76
|
+
verify_ssl="/path/to/certificate_bundle.pem",
|
|
77
|
+
)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
You can also disable certificate validation altogether, but beware that **this is a security risk**.
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
client = AuthenticatedClient(
|
|
84
|
+
base_url="https://internal_api.example.com",
|
|
85
|
+
token="SuperSecretToken",
|
|
86
|
+
verify_ssl=False
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Things to know:
|
|
91
|
+
|
|
92
|
+
1. Every path/method combo becomes a Python module with four functions:
|
|
93
|
+
|
|
94
|
+
1. `sync`: Blocking request that returns parsed data (if successful) or `None`
|
|
95
|
+
1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
|
|
96
|
+
1. `asyncio`: Like `sync` but async instead of blocking
|
|
97
|
+
1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
|
|
98
|
+
|
|
99
|
+
1. All path/query params, and bodies become method arguments.
|
|
100
|
+
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
|
|
101
|
+
1. Any endpoint which did not have a tag will be in `aiotraq.api.default`
|
|
102
|
+
|
|
103
|
+
### Customizing the client
|
|
104
|
+
|
|
105
|
+
There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
from aiotraq import Client
|
|
109
|
+
|
|
110
|
+
def log_request(request):
|
|
111
|
+
print(f"Request event hook: {request.method} {request.url} - Waiting for response")
|
|
112
|
+
|
|
113
|
+
def log_response(response):
|
|
114
|
+
request = response.request
|
|
115
|
+
print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
|
|
116
|
+
|
|
117
|
+
client = Client(
|
|
118
|
+
base_url="https://api.example.com",
|
|
119
|
+
httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
# Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
import httpx
|
|
129
|
+
from aiotraq import Client
|
|
130
|
+
|
|
131
|
+
client = Client(
|
|
132
|
+
base_url="https://api.example.com",
|
|
133
|
+
)
|
|
134
|
+
# Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
|
|
135
|
+
client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030"))
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Acknowledgements
|
|
139
|
+
|
|
140
|
+
This project is generated using [openapi-python-client](https://github.com/openapi-generators/openapi-python-client).
|
|
141
|
+
|
aiotraq-0.1.0/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# aiotraq
|
|
2
|
+
|
|
3
|
+
Async ready traQ API Client for Python
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
TODO
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
`AuthenticatedClient`を用いて API クライアントを作成し API を叩くことができます。
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
import os
|
|
15
|
+
from aiotraq import AuthenticatedClient
|
|
16
|
+
from aiotraq.api.channel import get_channels
|
|
17
|
+
|
|
18
|
+
BOT_ACCESS_TOKEN = os.getenv("BOT_ACCESS_TOKEN")
|
|
19
|
+
assert BOT_ACCESS_TOKEN is not None
|
|
20
|
+
|
|
21
|
+
client = AuthenticatedClient(base_url="https://q.trap.jp/api/v3", token=BOT_ACCESS_TOKEN)
|
|
22
|
+
|
|
23
|
+
with client as client:
|
|
24
|
+
channels = get_channels.sync_detailed(client=client)
|
|
25
|
+
print(channels.status_code)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
API の利用例: チャンネル一覧の取得
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
with client as client:
|
|
32
|
+
channels: ChannelList = get_channels.sync(client=client)
|
|
33
|
+
# status_code などの情報も利用したい場合
|
|
34
|
+
response: Response[ChannelList] = get_channels.sync_detailed(client=client)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
非同期版も利用可能です:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
with client as client:
|
|
41
|
+
channels: ChannelList = await get_channels.asyncio(client=client)
|
|
42
|
+
response: Response[ChannelList] = await get_channels.asyncio_detailed(client=client)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Advanced customizations
|
|
46
|
+
|
|
47
|
+
By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
client = AuthenticatedClient(
|
|
51
|
+
base_url="https://internal_api.example.com",
|
|
52
|
+
token="SuperSecretToken",
|
|
53
|
+
verify_ssl="/path/to/certificate_bundle.pem",
|
|
54
|
+
)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
You can also disable certificate validation altogether, but beware that **this is a security risk**.
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
client = AuthenticatedClient(
|
|
61
|
+
base_url="https://internal_api.example.com",
|
|
62
|
+
token="SuperSecretToken",
|
|
63
|
+
verify_ssl=False
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Things to know:
|
|
68
|
+
|
|
69
|
+
1. Every path/method combo becomes a Python module with four functions:
|
|
70
|
+
|
|
71
|
+
1. `sync`: Blocking request that returns parsed data (if successful) or `None`
|
|
72
|
+
1. `sync_detailed`: Blocking request that always returns a `Request`, optionally with `parsed` set if the request was successful.
|
|
73
|
+
1. `asyncio`: Like `sync` but async instead of blocking
|
|
74
|
+
1. `asyncio_detailed`: Like `sync_detailed` but async instead of blocking
|
|
75
|
+
|
|
76
|
+
1. All path/query params, and bodies become method arguments.
|
|
77
|
+
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
|
|
78
|
+
1. Any endpoint which did not have a tag will be in `aiotraq.api.default`
|
|
79
|
+
|
|
80
|
+
### Customizing the client
|
|
81
|
+
|
|
82
|
+
There are more settings on the generated `Client` class which let you control more runtime behavior, check out the docstring on that class for more info. You can also customize the underlying `httpx.Client` or `httpx.AsyncClient` (depending on your use-case):
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from aiotraq import Client
|
|
86
|
+
|
|
87
|
+
def log_request(request):
|
|
88
|
+
print(f"Request event hook: {request.method} {request.url} - Waiting for response")
|
|
89
|
+
|
|
90
|
+
def log_response(response):
|
|
91
|
+
request = response.request
|
|
92
|
+
print(f"Response event hook: {request.method} {request.url} - Status {response.status_code}")
|
|
93
|
+
|
|
94
|
+
client = Client(
|
|
95
|
+
base_url="https://api.example.com",
|
|
96
|
+
httpx_args={"event_hooks": {"request": [log_request], "response": [log_response]}},
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
# Or get the underlying httpx client to modify directly with client.get_httpx_client() or client.get_async_httpx_client()
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
You can even set the httpx client directly, but beware that this will override any existing settings (e.g., base_url):
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
import httpx
|
|
106
|
+
from aiotraq import Client
|
|
107
|
+
|
|
108
|
+
client = Client(
|
|
109
|
+
base_url="https://api.example.com",
|
|
110
|
+
)
|
|
111
|
+
# Note that base_url needs to be re-set, as would any shared cookies, headers, etc.
|
|
112
|
+
client.set_httpx_client(httpx.Client(base_url="https://api.example.com", proxies="http://localhost:8030"))
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Acknowledgements
|
|
116
|
+
|
|
117
|
+
This project is generated using [openapi-python-client](https://github.com/openapi-generators/openapi-python-client).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Contains methods for accessing the API"""
|
|
File without changes
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.activity_timeline_message import ActivityTimelineMessage
|
|
9
|
+
from ...types import UNSET, Response, Unset
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
limit: Union[Unset, int] = 50,
|
|
15
|
+
all_: Union[Unset, bool] = False,
|
|
16
|
+
per_channel: Union[Unset, bool] = False,
|
|
17
|
+
) -> Dict[str, Any]:
|
|
18
|
+
params: Dict[str, Any] = {}
|
|
19
|
+
|
|
20
|
+
params["limit"] = limit
|
|
21
|
+
|
|
22
|
+
params["all"] = all_
|
|
23
|
+
|
|
24
|
+
params["per_channel"] = per_channel
|
|
25
|
+
|
|
26
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
27
|
+
|
|
28
|
+
_kwargs: Dict[str, Any] = {
|
|
29
|
+
"method": "get",
|
|
30
|
+
"url": "/activity/timeline",
|
|
31
|
+
"params": params,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return _kwargs
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _parse_response(
|
|
38
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
39
|
+
) -> Optional[Union[Any, List["ActivityTimelineMessage"]]]:
|
|
40
|
+
if response.status_code == HTTPStatus.OK:
|
|
41
|
+
response_200 = []
|
|
42
|
+
_response_200 = response.json()
|
|
43
|
+
for response_200_item_data in _response_200:
|
|
44
|
+
response_200_item = ActivityTimelineMessage.from_dict(response_200_item_data)
|
|
45
|
+
|
|
46
|
+
response_200.append(response_200_item)
|
|
47
|
+
|
|
48
|
+
return response_200
|
|
49
|
+
if response.status_code == HTTPStatus.BAD_REQUEST:
|
|
50
|
+
response_400 = cast(Any, None)
|
|
51
|
+
return response_400
|
|
52
|
+
if client.raise_on_unexpected_status:
|
|
53
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
54
|
+
else:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _build_response(
|
|
59
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
60
|
+
) -> Response[Union[Any, List["ActivityTimelineMessage"]]]:
|
|
61
|
+
return Response(
|
|
62
|
+
status_code=HTTPStatus(response.status_code),
|
|
63
|
+
content=response.content,
|
|
64
|
+
headers=response.headers,
|
|
65
|
+
parsed=_parse_response(client=client, response=response),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def sync_detailed(
|
|
70
|
+
*,
|
|
71
|
+
client: Union[AuthenticatedClient, Client],
|
|
72
|
+
limit: Union[Unset, int] = 50,
|
|
73
|
+
all_: Union[Unset, bool] = False,
|
|
74
|
+
per_channel: Union[Unset, bool] = False,
|
|
75
|
+
) -> Response[Union[Any, List["ActivityTimelineMessage"]]]:
|
|
76
|
+
"""アクテビティタイムラインを取得
|
|
77
|
+
|
|
78
|
+
パブリックチャンネルの直近の投稿メッセージを作成日時の降順で取得します。
|
|
79
|
+
`all`が`true`でない場合、購読チャンネルのみのタイムラインを取得します
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
limit (Union[Unset, int]): Default: 50.
|
|
83
|
+
all_ (Union[Unset, bool]): Default: False.
|
|
84
|
+
per_channel (Union[Unset, bool]): Default: False.
|
|
85
|
+
|
|
86
|
+
Raises:
|
|
87
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
88
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
Response[Union[Any, List['ActivityTimelineMessage']]]
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
kwargs = _get_kwargs(
|
|
95
|
+
limit=limit,
|
|
96
|
+
all_=all_,
|
|
97
|
+
per_channel=per_channel,
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
response = client.get_httpx_client().request(
|
|
101
|
+
**kwargs,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
return _build_response(client=client, response=response)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def sync(
|
|
108
|
+
*,
|
|
109
|
+
client: Union[AuthenticatedClient, Client],
|
|
110
|
+
limit: Union[Unset, int] = 50,
|
|
111
|
+
all_: Union[Unset, bool] = False,
|
|
112
|
+
per_channel: Union[Unset, bool] = False,
|
|
113
|
+
) -> Optional[Union[Any, List["ActivityTimelineMessage"]]]:
|
|
114
|
+
"""アクテビティタイムラインを取得
|
|
115
|
+
|
|
116
|
+
パブリックチャンネルの直近の投稿メッセージを作成日時の降順で取得します。
|
|
117
|
+
`all`が`true`でない場合、購読チャンネルのみのタイムラインを取得します
|
|
118
|
+
|
|
119
|
+
Args:
|
|
120
|
+
limit (Union[Unset, int]): Default: 50.
|
|
121
|
+
all_ (Union[Unset, bool]): Default: False.
|
|
122
|
+
per_channel (Union[Unset, bool]): Default: False.
|
|
123
|
+
|
|
124
|
+
Raises:
|
|
125
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
126
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
Union[Any, List['ActivityTimelineMessage']]
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
return sync_detailed(
|
|
133
|
+
client=client,
|
|
134
|
+
limit=limit,
|
|
135
|
+
all_=all_,
|
|
136
|
+
per_channel=per_channel,
|
|
137
|
+
).parsed
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
async def asyncio_detailed(
|
|
141
|
+
*,
|
|
142
|
+
client: Union[AuthenticatedClient, Client],
|
|
143
|
+
limit: Union[Unset, int] = 50,
|
|
144
|
+
all_: Union[Unset, bool] = False,
|
|
145
|
+
per_channel: Union[Unset, bool] = False,
|
|
146
|
+
) -> Response[Union[Any, List["ActivityTimelineMessage"]]]:
|
|
147
|
+
"""アクテビティタイムラインを取得
|
|
148
|
+
|
|
149
|
+
パブリックチャンネルの直近の投稿メッセージを作成日時の降順で取得します。
|
|
150
|
+
`all`が`true`でない場合、購読チャンネルのみのタイムラインを取得します
|
|
151
|
+
|
|
152
|
+
Args:
|
|
153
|
+
limit (Union[Unset, int]): Default: 50.
|
|
154
|
+
all_ (Union[Unset, bool]): Default: False.
|
|
155
|
+
per_channel (Union[Unset, bool]): Default: False.
|
|
156
|
+
|
|
157
|
+
Raises:
|
|
158
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
159
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
160
|
+
|
|
161
|
+
Returns:
|
|
162
|
+
Response[Union[Any, List['ActivityTimelineMessage']]]
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
kwargs = _get_kwargs(
|
|
166
|
+
limit=limit,
|
|
167
|
+
all_=all_,
|
|
168
|
+
per_channel=per_channel,
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
172
|
+
|
|
173
|
+
return _build_response(client=client, response=response)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
async def asyncio(
|
|
177
|
+
*,
|
|
178
|
+
client: Union[AuthenticatedClient, Client],
|
|
179
|
+
limit: Union[Unset, int] = 50,
|
|
180
|
+
all_: Union[Unset, bool] = False,
|
|
181
|
+
per_channel: Union[Unset, bool] = False,
|
|
182
|
+
) -> Optional[Union[Any, List["ActivityTimelineMessage"]]]:
|
|
183
|
+
"""アクテビティタイムラインを取得
|
|
184
|
+
|
|
185
|
+
パブリックチャンネルの直近の投稿メッセージを作成日時の降順で取得します。
|
|
186
|
+
`all`が`true`でない場合、購読チャンネルのみのタイムラインを取得します
|
|
187
|
+
|
|
188
|
+
Args:
|
|
189
|
+
limit (Union[Unset, int]): Default: 50.
|
|
190
|
+
all_ (Union[Unset, bool]): Default: False.
|
|
191
|
+
per_channel (Union[Unset, bool]): Default: False.
|
|
192
|
+
|
|
193
|
+
Raises:
|
|
194
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
195
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
Union[Any, List['ActivityTimelineMessage']]
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
await asyncio_detailed(
|
|
203
|
+
client=client,
|
|
204
|
+
limit=limit,
|
|
205
|
+
all_=all_,
|
|
206
|
+
per_channel=per_channel,
|
|
207
|
+
)
|
|
208
|
+
).parsed
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Dict, List, Optional, Union, cast
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...types import Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs() -> Dict[str, Any]:
|
|
12
|
+
_kwargs: Dict[str, Any] = {
|
|
13
|
+
"method": "get",
|
|
14
|
+
"url": "/activity/onlines",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return _kwargs
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[List[str]]:
|
|
21
|
+
if response.status_code == HTTPStatus.OK:
|
|
22
|
+
response_200 = cast(List[str], response.json())
|
|
23
|
+
|
|
24
|
+
return response_200
|
|
25
|
+
if client.raise_on_unexpected_status:
|
|
26
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
27
|
+
else:
|
|
28
|
+
return None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[List[str]]:
|
|
32
|
+
return Response(
|
|
33
|
+
status_code=HTTPStatus(response.status_code),
|
|
34
|
+
content=response.content,
|
|
35
|
+
headers=response.headers,
|
|
36
|
+
parsed=_parse_response(client=client, response=response),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def sync_detailed(
|
|
41
|
+
*,
|
|
42
|
+
client: Union[AuthenticatedClient, Client],
|
|
43
|
+
) -> Response[List[str]]:
|
|
44
|
+
"""オンラインユーザーリストを取得
|
|
45
|
+
|
|
46
|
+
現在オンラインな(SSEまたはWSが接続中)ユーザーのUUIDのリストを返します。
|
|
47
|
+
|
|
48
|
+
Raises:
|
|
49
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
50
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
Response[List[str]]
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
kwargs = _get_kwargs()
|
|
57
|
+
|
|
58
|
+
response = client.get_httpx_client().request(
|
|
59
|
+
**kwargs,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
return _build_response(client=client, response=response)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def sync(
|
|
66
|
+
*,
|
|
67
|
+
client: Union[AuthenticatedClient, Client],
|
|
68
|
+
) -> Optional[List[str]]:
|
|
69
|
+
"""オンラインユーザーリストを取得
|
|
70
|
+
|
|
71
|
+
現在オンラインな(SSEまたはWSが接続中)ユーザーのUUIDのリストを返します。
|
|
72
|
+
|
|
73
|
+
Raises:
|
|
74
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
List[str]
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
return sync_detailed(
|
|
82
|
+
client=client,
|
|
83
|
+
).parsed
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
async def asyncio_detailed(
|
|
87
|
+
*,
|
|
88
|
+
client: Union[AuthenticatedClient, Client],
|
|
89
|
+
) -> Response[List[str]]:
|
|
90
|
+
"""オンラインユーザーリストを取得
|
|
91
|
+
|
|
92
|
+
現在オンラインな(SSEまたはWSが接続中)ユーザーのUUIDのリストを返します。
|
|
93
|
+
|
|
94
|
+
Raises:
|
|
95
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
96
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[List[str]]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
kwargs = _get_kwargs()
|
|
103
|
+
|
|
104
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
105
|
+
|
|
106
|
+
return _build_response(client=client, response=response)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
async def asyncio(
|
|
110
|
+
*,
|
|
111
|
+
client: Union[AuthenticatedClient, Client],
|
|
112
|
+
) -> Optional[List[str]]:
|
|
113
|
+
"""オンラインユーザーリストを取得
|
|
114
|
+
|
|
115
|
+
現在オンラインな(SSEまたはWSが接続中)ユーザーのUUIDのリストを返します。
|
|
116
|
+
|
|
117
|
+
Raises:
|
|
118
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
119
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
List[str]
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
await asyncio_detailed(
|
|
127
|
+
client=client,
|
|
128
|
+
)
|
|
129
|
+
).parsed
|
|
File without changes
|