slack-api-sdk-apimatic 1.1.1__py3-none-any.whl
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.
- slack_api_sdk_apimatic-1.1.1.dist-info/METADATA +206 -0
- slack_api_sdk_apimatic-1.1.1.dist-info/RECORD +433 -0
- slack_api_sdk_apimatic-1.1.1.dist-info/WHEEL +5 -0
- slack_api_sdk_apimatic-1.1.1.dist-info/licenses/LICENSE +28 -0
- slack_api_sdk_apimatic-1.1.1.dist-info/top_level.txt +1 -0
- slackwebapi/__init__.py +13 -0
- slackwebapi/api_helper.py +19 -0
- slackwebapi/configuration.py +252 -0
- slackwebapi/controllers/__init__.py +61 -0
- slackwebapi/controllers/admin_apps_approved_controller.py +101 -0
- slackwebapi/controllers/admin_apps_controller.py +153 -0
- slackwebapi/controllers/admin_apps_requests_controller.py +96 -0
- slackwebapi/controllers/admin_apps_restricted_controller.py +101 -0
- slackwebapi/controllers/admin_conversations_controller.py +895 -0
- slackwebapi/controllers/admin_conversations_ekm_controller.py +107 -0
- slackwebapi/controllers/admin_conversations_restrict_access_controller.py +231 -0
- slackwebapi/controllers/admin_emoji_controller.py +314 -0
- slackwebapi/controllers/admin_invite_requests_approved_controller.py +97 -0
- slackwebapi/controllers/admin_invite_requests_controller.py +209 -0
- slackwebapi/controllers/admin_invite_requests_denied_controller.py +97 -0
- slackwebapi/controllers/admin_teams_admins_controller.py +96 -0
- slackwebapi/controllers/admin_teams_controller.py +158 -0
- slackwebapi/controllers/admin_teams_owners_controller.py +97 -0
- slackwebapi/controllers/admin_teams_settings_controller.py +367 -0
- slackwebapi/controllers/admin_usergroups_controller.py +282 -0
- slackwebapi/controllers/admin_users_controller.py +555 -0
- slackwebapi/controllers/admin_users_session_controller.py +151 -0
- slackwebapi/controllers/api_controller.py +84 -0
- slackwebapi/controllers/apps_controller.py +88 -0
- slackwebapi/controllers/apps_event_authorizations_controller.py +96 -0
- slackwebapi/controllers/apps_permissions_controller.py +142 -0
- slackwebapi/controllers/apps_permissions_resources_controller.py +94 -0
- slackwebapi/controllers/apps_permissions_scopes_controller.py +80 -0
- slackwebapi/controllers/apps_permissions_users_controller.py +158 -0
- slackwebapi/controllers/auth_controller.py +136 -0
- slackwebapi/controllers/base_controller.py +72 -0
- slackwebapi/controllers/bots_controller.py +85 -0
- slackwebapi/controllers/calls_controller.py +304 -0
- slackwebapi/controllers/calls_participants_controller.py +149 -0
- slackwebapi/controllers/chat_controller.py +896 -0
- slackwebapi/controllers/chat_scheduled_messages_controller.py +107 -0
- slackwebapi/controllers/conversations_controller.py +1217 -0
- slackwebapi/controllers/dialog_controller.py +93 -0
- slackwebapi/controllers/dnd_controller.py +294 -0
- slackwebapi/controllers/emoji_controller.py +79 -0
- slackwebapi/controllers/files_comments_controller.py +90 -0
- slackwebapi/controllers/files_controller.py +470 -0
- slackwebapi/controllers/files_remote_controller.py +440 -0
- slackwebapi/controllers/migration_controller.py +98 -0
- slackwebapi/controllers/oauth_authorization_controller.py +159 -0
- slackwebapi/controllers/oauth_controller.py +168 -0
- slackwebapi/controllers/oauth_v_2_controller.py +96 -0
- slackwebapi/controllers/pins_controller.py +203 -0
- slackwebapi/controllers/reactions_controller.py +334 -0
- slackwebapi/controllers/reminders_controller.py +315 -0
- slackwebapi/controllers/rtm_controller.py +93 -0
- slackwebapi/controllers/search_controller.py +114 -0
- slackwebapi/controllers/stars_controller.py +246 -0
- slackwebapi/controllers/team_controller.py +294 -0
- slackwebapi/controllers/team_profile_controller.py +84 -0
- slackwebapi/controllers/usergroups_controller.py +384 -0
- slackwebapi/controllers/usergroups_users_controller.py +161 -0
- slackwebapi/controllers/users_controller.py +639 -0
- slackwebapi/controllers/users_profile_controller.py +165 -0
- slackwebapi/controllers/views_controller.py +287 -0
- slackwebapi/controllers/workflows_controller.py +237 -0
- slackwebapi/exceptions/__init__.py +108 -0
- slackwebapi/exceptions/admin_conversations_archive_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_convert_to_private_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_create_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_delete_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_disconnect_shared_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_get_teams_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_invite_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_search_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_set_conversation_prefs_error_schema_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_unarchive_error_schema_2_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_unarchive_error_schema_3_exception.py +56 -0
- slackwebapi/exceptions/admin_conversations_unarchive_error_schema_exception.py +56 -0
- slackwebapi/exceptions/api_exception.py +36 -0
- slackwebapi/exceptions/api_test_error_schema_exception.py +55 -0
- slackwebapi/exceptions/apps_permissions_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/apps_permissions_request_error_schema_exception.py +66 -0
- slackwebapi/exceptions/apps_permissions_resources_list_error_schema_exception.py +66 -0
- slackwebapi/exceptions/apps_permissions_scopes_list_error_schema_exception.py +66 -0
- slackwebapi/exceptions/apps_uninstall_error_schema_exception.py +65 -0
- slackwebapi/exceptions/auth_revoke_error_schema_exception.py +65 -0
- slackwebapi/exceptions/auth_test_error_schema_exception.py +65 -0
- slackwebapi/exceptions/bots_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_delete_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_delete_scheduled_message_error_schema_exception.py +66 -0
- slackwebapi/exceptions/chat_get_permalink_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_me_message_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_post_ephemeral_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_post_message_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_schedule_message_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_scheduled_messages_list_error_schema_exception.py +66 -0
- slackwebapi/exceptions/chat_unfurl_error_schema_exception.py +65 -0
- slackwebapi/exceptions/chat_update_error_schema_exception.py +65 -0
- slackwebapi/exceptions/conversations_archive_error_schema_exception.py +86 -0
- slackwebapi/exceptions/conversations_close_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_create_error_schema_exception.py +95 -0
- slackwebapi/exceptions/conversations_history_error_schema_exception.py +86 -0
- slackwebapi/exceptions/conversations_info_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_invite_error_schema_1_exception.py +107 -0
- slackwebapi/exceptions/conversations_join_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_kick_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_leave_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_list_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_mark_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_members_error_schema_exception.py +66 -0
- slackwebapi/exceptions/conversations_open_error_schema_exception.py +65 -0
- slackwebapi/exceptions/conversations_rename_error_schema_exception.py +85 -0
- slackwebapi/exceptions/conversations_replies_error_schema_exception.py +86 -0
- slackwebapi/exceptions/conversations_set_purpose_error_schema_exception.py +86 -0
- slackwebapi/exceptions/conversations_set_topic_error_schema_exception.py +86 -0
- slackwebapi/exceptions/conversations_unarchive_error_schema_exception.py +86 -0
- slackwebapi/exceptions/default_error_template_exception.py +49 -0
- slackwebapi/exceptions/dialog_open_error_schema_exception.py +65 -0
- slackwebapi/exceptions/dnd_end_dnd_error_schema_exception.py +65 -0
- slackwebapi/exceptions/dnd_end_snooze_error_schema_exception.py +65 -0
- slackwebapi/exceptions/dnd_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/dnd_set_snooze_error_schema_exception.py +65 -0
- slackwebapi/exceptions/files_comments_delete_error_schema_exception.py +65 -0
- slackwebapi/exceptions/files_delete_error_schema_exception.py +65 -0
- slackwebapi/exceptions/files_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/files_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/files_revoke_public_url_error_schema_exception.py +66 -0
- slackwebapi/exceptions/files_shared_public_url_error_schema_exception.py +66 -0
- slackwebapi/exceptions/files_upload_error_schema_exception.py +65 -0
- slackwebapi/exceptions/migration_exchange_error_schema_exception.py +65 -0
- slackwebapi/exceptions/oauth_provider_exception.py +73 -0
- slackwebapi/exceptions/pins_add_error_schema_exception.py +65 -0
- slackwebapi/exceptions/pins_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/pins_remove_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reactions_add_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reactions_get_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reactions_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reactions_remove_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reminders_add_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reminders_complete_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reminders_delete_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reminders_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/reminders_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/rtm_connect_error_schema_exception.py +65 -0
- slackwebapi/exceptions/stars_add_error_schema_exception.py +65 -0
- slackwebapi/exceptions/stars_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/stars_remove_error_schema_exception.py +65 -0
- slackwebapi/exceptions/team_access_logs_error_schema_exception.py +65 -0
- slackwebapi/exceptions/team_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/team_integration_logs_error_schema_exception.py +65 -0
- slackwebapi/exceptions/team_profile_get_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_create_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_disable_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_enable_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_update_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_users_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/usergroups_users_update_error_schema_exception.py +66 -0
- slackwebapi/exceptions/users_conversations_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_counts_error_schema_exception.py +55 -0
- slackwebapi/exceptions/users_delete_photo_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_identity_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_info_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_list_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_lookup_by_email_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_profile_get_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_profile_set_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_set_active_error_schema_exception.py +65 -0
- slackwebapi/exceptions/users_set_photo_error_schema_exception.py +95 -0
- slackwebapi/exceptions/users_set_presence_error_schema_exception.py +65 -0
- slackwebapi/http/__init__.py +11 -0
- slackwebapi/http/api_response.py +67 -0
- slackwebapi/http/auth/__init__.py +5 -0
- slackwebapi/http/auth/oauth_2.py +333 -0
- slackwebapi/http/http_call_back.py +20 -0
- slackwebapi/http/http_client_provider.py +23 -0
- slackwebapi/http/http_method_enum.py +25 -0
- slackwebapi/http/http_request.py +55 -0
- slackwebapi/http/http_response.py +45 -0
- slackwebapi/http/proxy_settings.py +50 -0
- slackwebapi/logging/__init__.py +6 -0
- slackwebapi/logging/configuration/__init__.py +5 -0
- slackwebapi/logging/configuration/api_logging_configuration.py +398 -0
- slackwebapi/logging/sdk_logger.py +28 -0
- slackwebapi/models/__init__.py +248 -0
- slackwebapi/models/admin_conversations_archive_schema.py +86 -0
- slackwebapi/models/admin_conversations_convert_to_private_schema.py +86 -0
- slackwebapi/models/admin_conversations_create_schema.py +112 -0
- slackwebapi/models/admin_conversations_delete_schema.py +86 -0
- slackwebapi/models/admin_conversations_get_conversation_prefs_schema.py +114 -0
- slackwebapi/models/admin_conversations_get_teams_schema.py +130 -0
- slackwebapi/models/admin_conversations_invite_schema.py +86 -0
- slackwebapi/models/admin_conversations_rename_schema.py +86 -0
- slackwebapi/models/admin_conversations_rename_schema_1.py +86 -0
- slackwebapi/models/admin_conversations_search_schema.py +111 -0
- slackwebapi/models/admin_conversations_set_conversation_prefs_schema.py +86 -0
- slackwebapi/models/admin_conversations_unarchive_schema.py +86 -0
- slackwebapi/models/api_method_users_get_presence.py +218 -0
- slackwebapi/models/api_permissions_scopes_list_success_schema.py +100 -0
- slackwebapi/models/api_test_success_schema.py +86 -0
- slackwebapi/models/app_home.py +131 -0
- slackwebapi/models/apps_permissions_info_schema.py +100 -0
- slackwebapi/models/apps_permissions_request_schema.py +86 -0
- slackwebapi/models/apps_permissions_resources_list_success_schema.py +133 -0
- slackwebapi/models/apps_uninstall_schema.py +86 -0
- slackwebapi/models/attachment.py +208 -0
- slackwebapi/models/auth_revoke_schema.py +99 -0
- slackwebapi/models/auth_test_success_schema.py +200 -0
- slackwebapi/models/block_kit_block.py +90 -0
- slackwebapi/models/bot.py +182 -0
- slackwebapi/models/bot_profile_object.py +169 -0
- slackwebapi/models/bots_info_schema.py +100 -0
- slackwebapi/models/can_thread.py +126 -0
- slackwebapi/models/channel.py +131 -0
- slackwebapi/models/channel_object.py +688 -0
- slackwebapi/models/chat_delete_scheduled_message_schema.py +86 -0
- slackwebapi/models/chat_delete_success_schema.py +112 -0
- slackwebapi/models/chat_get_permalink_success_schema.py +112 -0
- slackwebapi/models/chat_me_message_schema.py +135 -0
- slackwebapi/models/chat_post_ephemeral_success_schema.py +99 -0
- slackwebapi/models/chat_post_message_success_schema.py +128 -0
- slackwebapi/models/chat_schedule_message_success_schema.py +139 -0
- slackwebapi/models/chat_scheduled_messages_list_schema.py +122 -0
- slackwebapi/models/chat_unfurl_success_schema.py +86 -0
- slackwebapi/models/chat_update_success_schema.py +141 -0
- slackwebapi/models/conversations_archive_success_schema.py +86 -0
- slackwebapi/models/conversations_close_success_schema.py +135 -0
- slackwebapi/models/conversations_create_success_schema.py +99 -0
- slackwebapi/models/conversations_history_success_schema.py +157 -0
- slackwebapi/models/conversations_info_success_schema.py +99 -0
- slackwebapi/models/conversations_invite_error_schema.py +99 -0
- slackwebapi/models/conversations_join_success_schema.py +153 -0
- slackwebapi/models/conversations_kick_success_schema.py +86 -0
- slackwebapi/models/conversations_leave_success_schema.py +112 -0
- slackwebapi/models/conversations_list_success_schema.py +130 -0
- slackwebapi/models/conversations_mark_success_schema.py +86 -0
- slackwebapi/models/conversations_members_success_schema.py +116 -0
- slackwebapi/models/conversations_open_success_schema.py +149 -0
- slackwebapi/models/conversations_rename_success_schema.py +99 -0
- slackwebapi/models/conversations_replies_success_schema.py +125 -0
- slackwebapi/models/conversations_set_purpose_success_schema.py +99 -0
- slackwebapi/models/conversations_set_topic_success_schema.py +99 -0
- slackwebapi/models/conversations_unarchive_success_schema.py +86 -0
- slackwebapi/models/current.py +103 -0
- slackwebapi/models/default_success_template.py +87 -0
- slackwebapi/models/dialog_open_schema.py +86 -0
- slackwebapi/models/dnd_end_dnd_schema.py +86 -0
- slackwebapi/models/dnd_end_snooze_schema.py +138 -0
- slackwebapi/models/dnd_info_schema.py +197 -0
- slackwebapi/models/dnd_set_snooze_schema.py +125 -0
- slackwebapi/models/error.py +61 -0
- slackwebapi/models/error_1.py +64 -0
- slackwebapi/models/error_10.py +61 -0
- slackwebapi/models/error_11.py +61 -0
- slackwebapi/models/error_12.py +94 -0
- slackwebapi/models/error_13.py +106 -0
- slackwebapi/models/error_14.py +97 -0
- slackwebapi/models/error_16.py +103 -0
- slackwebapi/models/error_17.py +91 -0
- slackwebapi/models/error_18.py +79 -0
- slackwebapi/models/error_19.py +94 -0
- slackwebapi/models/error_2.py +61 -0
- slackwebapi/models/error_20.py +100 -0
- slackwebapi/models/error_21.py +106 -0
- slackwebapi/models/error_22.py +97 -0
- slackwebapi/models/error_23.py +109 -0
- slackwebapi/models/error_24.py +112 -0
- slackwebapi/models/error_25.py +85 -0
- slackwebapi/models/error_26.py +139 -0
- slackwebapi/models/error_27.py +100 -0
- slackwebapi/models/error_28.py +106 -0
- slackwebapi/models/error_29.py +112 -0
- slackwebapi/models/error_3.py +61 -0
- slackwebapi/models/error_30.py +115 -0
- slackwebapi/models/error_31.py +91 -0
- slackwebapi/models/error_32.py +115 -0
- slackwebapi/models/error_33.py +88 -0
- slackwebapi/models/error_34.py +85 -0
- slackwebapi/models/error_35.py +130 -0
- slackwebapi/models/error_37.py +106 -0
- slackwebapi/models/error_38.py +106 -0
- slackwebapi/models/error_39.py +112 -0
- slackwebapi/models/error_4.py +76 -0
- slackwebapi/models/error_40.py +79 -0
- slackwebapi/models/error_41.py +94 -0
- slackwebapi/models/error_42.py +91 -0
- slackwebapi/models/error_43.py +106 -0
- slackwebapi/models/error_44.py +112 -0
- slackwebapi/models/error_45.py +88 -0
- slackwebapi/models/error_46.py +100 -0
- slackwebapi/models/error_48.py +106 -0
- slackwebapi/models/error_49.py +118 -0
- slackwebapi/models/error_5.py +61 -0
- slackwebapi/models/error_50.py +97 -0
- slackwebapi/models/error_51.py +100 -0
- slackwebapi/models/error_52.py +94 -0
- slackwebapi/models/error_53.py +103 -0
- slackwebapi/models/error_54.py +85 -0
- slackwebapi/models/error_55.py +91 -0
- slackwebapi/models/error_56.py +91 -0
- slackwebapi/models/error_57.py +91 -0
- slackwebapi/models/error_58.py +100 -0
- slackwebapi/models/error_59.py +103 -0
- slackwebapi/models/error_6.py +61 -0
- slackwebapi/models/error_60.py +97 -0
- slackwebapi/models/error_61.py +97 -0
- slackwebapi/models/error_62.py +106 -0
- slackwebapi/models/error_63.py +85 -0
- slackwebapi/models/error_64.py +103 -0
- slackwebapi/models/error_65.py +103 -0
- slackwebapi/models/error_66.py +94 -0
- slackwebapi/models/error_67.py +88 -0
- slackwebapi/models/error_68.py +106 -0
- slackwebapi/models/error_69.py +112 -0
- slackwebapi/models/error_7.py +58 -0
- slackwebapi/models/error_70.py +103 -0
- slackwebapi/models/error_71.py +97 -0
- slackwebapi/models/error_74.py +88 -0
- slackwebapi/models/error_75.py +112 -0
- slackwebapi/models/error_77.py +112 -0
- slackwebapi/models/error_78.py +100 -0
- slackwebapi/models/error_8.py +58 -0
- slackwebapi/models/error_81.py +85 -0
- slackwebapi/models/error_82.py +100 -0
- slackwebapi/models/error_84.py +103 -0
- slackwebapi/models/error_86.py +106 -0
- slackwebapi/models/error_89.py +103 -0
- slackwebapi/models/error_9.py +67 -0
- slackwebapi/models/error_92.py +85 -0
- slackwebapi/models/error_93.py +91 -0
- slackwebapi/models/error_94.py +91 -0
- slackwebapi/models/error_95.py +97 -0
- slackwebapi/models/error_96.py +112 -0
- slackwebapi/models/error_97.py +91 -0
- slackwebapi/models/error_98.py +106 -0
- slackwebapi/models/error_99.py +94 -0
- slackwebapi/models/errors_is_returned_when_an_error_associates_an_user.py +124 -0
- slackwebapi/models/external_org_migrations.py +106 -0
- slackwebapi/models/file_comment_object.py +281 -0
- slackwebapi/models/file_object.py +1700 -0
- slackwebapi/models/files_comments_delete_schema.py +86 -0
- slackwebapi/models/files_delete_schema.py +86 -0
- slackwebapi/models/files_info_schema.py +216 -0
- slackwebapi/models/files_list_schema.py +118 -0
- slackwebapi/models/files_revoke_public_url_schema.py +100 -0
- slackwebapi/models/files_shared_public_url_schema.py +100 -0
- slackwebapi/models/files_upload_schema.py +100 -0
- slackwebapi/models/group.py +131 -0
- slackwebapi/models/icons.py +116 -0
- slackwebapi/models/icons_1.py +126 -0
- slackwebapi/models/im.py +131 -0
- slackwebapi/models/info.py +161 -0
- slackwebapi/models/log.py +263 -0
- slackwebapi/models/login.py +214 -0
- slackwebapi/models/message.py +195 -0
- slackwebapi/models/message_object.py +1035 -0
- slackwebapi/models/message_object_1.py +139 -0
- slackwebapi/models/migration_exchange_success_schema.py +161 -0
- slackwebapi/models/mpim.py +131 -0
- slackwebapi/models/mself.py +103 -0
- slackwebapi/models/mtype.py +55 -0
- slackwebapi/models/oauth_provider_error.py +67 -0
- slackwebapi/models/oauth_scope.py +240 -0
- slackwebapi/models/oauth_token.py +113 -0
- slackwebapi/models/objs_enterprise_user.py +155 -0
- slackwebapi/models/objs_icon.py +264 -0
- slackwebapi/models/objs_primary_owner.py +103 -0
- slackwebapi/models/objs_reminder.py +191 -0
- slackwebapi/models/objs_team_profile_field.py +242 -0
- slackwebapi/models/objs_team_profile_field_option.py +179 -0
- slackwebapi/models/objs_user_profile_short.py +247 -0
- slackwebapi/models/paging_object.py +198 -0
- slackwebapi/models/pins_add_schema.py +86 -0
- slackwebapi/models/pins_remove_schema.py +86 -0
- slackwebapi/models/plan.py +49 -0
- slackwebapi/models/prefs.py +103 -0
- slackwebapi/models/prefs_1.py +132 -0
- slackwebapi/models/profile.py +96 -0
- slackwebapi/models/profile_1.py +194 -0
- slackwebapi/models/purpose.py +116 -0
- slackwebapi/models/reaction_object.py +116 -0
- slackwebapi/models/reactions_add_schema.py +86 -0
- slackwebapi/models/reactions_list_schema.py +152 -0
- slackwebapi/models/reactions_remove_schema.py +86 -0
- slackwebapi/models/reminders_add_schema.py +102 -0
- slackwebapi/models/reminders_complete_schema.py +86 -0
- slackwebapi/models/reminders_delete_schema.py +86 -0
- slackwebapi/models/reminders_info_schema.py +102 -0
- slackwebapi/models/reminders_list_schema.py +104 -0
- slackwebapi/models/resource.py +126 -0
- slackwebapi/models/resources_in_info_from_apps_permissions_info.py +139 -0
- slackwebapi/models/response_metadata.py +90 -0
- slackwebapi/models/response_metadata_3.py +103 -0
- slackwebapi/models/rtm_connect_schema.py +127 -0
- slackwebapi/models/scheduled_message.py +155 -0
- slackwebapi/models/scopes.py +241 -0
- slackwebapi/models/shares.py +126 -0
- slackwebapi/models/sso_provider.py +149 -0
- slackwebapi/models/stars_add_schema.py +86 -0
- slackwebapi/models/stars_list_schema.py +129 -0
- slackwebapi/models/stars_remove_schema.py +86 -0
- slackwebapi/models/subteam_usergroup_object.py +384 -0
- slackwebapi/models/team.py +107 -0
- slackwebapi/models/team_1.py +116 -0
- slackwebapi/models/team_access_logs_schema.py +118 -0
- slackwebapi/models/team_info_schema.py +100 -0
- slackwebapi/models/team_integration_logs_schema.py +118 -0
- slackwebapi/models/team_object.py +715 -0
- slackwebapi/models/team_profile_get_success_schema.py +100 -0
- slackwebapi/models/topic.py +116 -0
- slackwebapi/models/user_profile_object.py +1005 -0
- slackwebapi/models/usergroups_create_schema.py +103 -0
- slackwebapi/models/usergroups_disable_schema.py +103 -0
- slackwebapi/models/usergroups_enable_schema.py +103 -0
- slackwebapi/models/usergroups_list_schema.py +105 -0
- slackwebapi/models/usergroups_update_schema.py +103 -0
- slackwebapi/models/usergroups_users_list_schema.py +99 -0
- slackwebapi/models/usergroups_users_update_schema.py +103 -0
- slackwebapi/models/users_conversations_success_schema.py +131 -0
- slackwebapi/models/users_delete_photo_schema.py +86 -0
- slackwebapi/models/users_info_success_schema.py +99 -0
- slackwebapi/models/users_list_schema.py +138 -0
- slackwebapi/models/users_lookup_by_email_success_schema.py +99 -0
- slackwebapi/models/users_profile_get_schema.py +102 -0
- slackwebapi/models/users_profile_set_schema.py +141 -0
- slackwebapi/models/users_set_active_schema.py +86 -0
- slackwebapi/models/users_set_photo_schema.py +100 -0
- slackwebapi/models/users_set_presence_schema.py +86 -0
- slackwebapi/models/who_can_post.py +126 -0
- slackwebapi/slackwebapi_client.py +522 -0
- slackwebapi/utilities/__init__.py +6 -0
- slackwebapi/utilities/file_wrapper.py +45 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
slackwebapi
|
|
4
|
+
|
|
5
|
+
This file was automatically generated by APIMATIC v3.0 (
|
|
6
|
+
https://www.apimatic.io ).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
|
|
11
|
+
from apimatic_core.authentication.header_auth import (
|
|
12
|
+
HeaderAuth,
|
|
13
|
+
)
|
|
14
|
+
from apimatic_core.utilities.auth_helper import (
|
|
15
|
+
AuthHelper,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
from slackwebapi.api_helper import APIHelper
|
|
19
|
+
from slackwebapi.configuration import Server
|
|
20
|
+
from slackwebapi.controllers.oauth_authorization_controller import (
|
|
21
|
+
OauthAuthorizationController,
|
|
22
|
+
)
|
|
23
|
+
from slackwebapi.models.oauth_token import OauthToken
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Oauth2(HeaderAuth):
|
|
27
|
+
"""
|
|
28
|
+
An authentication handler that applies `AuthorizationCodeAuth` to
|
|
29
|
+
outgoing requests. It constructs the required credential values and integrates
|
|
30
|
+
with the core authentication framework.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def error_message(self):
|
|
35
|
+
"""Return reason about the authentication failure."""
|
|
36
|
+
return "AuthorizationCodeAuth: OAuthToken is undefined or expired."
|
|
37
|
+
|
|
38
|
+
def __init__(self, auth_credentials_model, config):
|
|
39
|
+
"""
|
|
40
|
+
Initialize the authentication handler with credential data.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
auth_credentials_model: The credentials object used to generate
|
|
44
|
+
the authorization header.
|
|
45
|
+
config: The configuration instance.
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
self._oauth_client_id = auth_credentials_model.oauth_client_id \
|
|
49
|
+
if auth_credentials_model is not None else None
|
|
50
|
+
self._oauth_client_secret = auth_credentials_model.oauth_client_secret \
|
|
51
|
+
if auth_credentials_model is not None else None
|
|
52
|
+
self._oauth_redirect_uri = auth_credentials_model.oauth_redirect_uri \
|
|
53
|
+
if auth_credentials_model is not None else None
|
|
54
|
+
if auth_credentials_model is not None \
|
|
55
|
+
and isinstance(auth_credentials_model.oauth_token, OauthToken):
|
|
56
|
+
self._oauth_token = OauthToken.from_dictionary(
|
|
57
|
+
APIHelper.to_dictionary(auth_credentials_model.oauth_token))
|
|
58
|
+
else:
|
|
59
|
+
self._oauth_token = auth_credentials_model.oauth_token \
|
|
60
|
+
if auth_credentials_model is not None else None
|
|
61
|
+
if auth_credentials_model is not None \
|
|
62
|
+
and isinstance(auth_credentials_model.oauth_scopes, list):
|
|
63
|
+
self._oauth_scopes = auth_credentials_model.oauth_scopes
|
|
64
|
+
else:
|
|
65
|
+
self._oauth_scopes = None
|
|
66
|
+
self._config = config
|
|
67
|
+
self._o_auth_api = OauthAuthorizationController(config)
|
|
68
|
+
auth_params = {}
|
|
69
|
+
if (isinstance(self._oauth_token, OauthToken)
|
|
70
|
+
and hasattr(self._oauth_token, "access_token")):
|
|
71
|
+
auth_params = {"Authorization": f"Bearer {self._oauth_token.access_token}"}
|
|
72
|
+
super().__init__(auth_params=auth_params)
|
|
73
|
+
|
|
74
|
+
def is_valid(self):
|
|
75
|
+
"""
|
|
76
|
+
Validate credentials for authentication.
|
|
77
|
+
|
|
78
|
+
Returns:
|
|
79
|
+
bool: True if the credentials are valid, False otherwise.
|
|
80
|
+
|
|
81
|
+
"""
|
|
82
|
+
return (self._oauth_token and isinstance(self._oauth_token, OauthToken)
|
|
83
|
+
and not self.is_token_expired(self._oauth_token))
|
|
84
|
+
|
|
85
|
+
def get_authorization_url(self, state=None, additional_params=None):
|
|
86
|
+
"""
|
|
87
|
+
Build and return an authorization URL. The user is expected to
|
|
88
|
+
obtain an authorization code from this URL and then call the authorize
|
|
89
|
+
function with that authorization code.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
state (str): An opaque state string.
|
|
93
|
+
additional_params (dict): Any additional query parameters
|
|
94
|
+
to be added to the URL.
|
|
95
|
+
|
|
96
|
+
Returns:
|
|
97
|
+
str: The authorization URL.
|
|
98
|
+
|
|
99
|
+
"""
|
|
100
|
+
auth_url = self._config.get_base_uri(Server.AUTH_SERVER)
|
|
101
|
+
auth_url += "/authorize"
|
|
102
|
+
query_params = {
|
|
103
|
+
"response_type": "code",
|
|
104
|
+
"client_id": self._oauth_client_id,
|
|
105
|
+
"redirect_uri": self._oauth_redirect_uri,
|
|
106
|
+
}
|
|
107
|
+
if self._o_auth_scopes:
|
|
108
|
+
query_params["scope"] = " ".join(self._o_auth_scopes)
|
|
109
|
+
if state:
|
|
110
|
+
query_params["state"] = state
|
|
111
|
+
if additional_params:
|
|
112
|
+
query_params.update(additional_params)
|
|
113
|
+
auth_url = APIHelper.append_url_with_query_parameters(auth_url, query_params)
|
|
114
|
+
return APIHelper.clean_url(auth_url)
|
|
115
|
+
|
|
116
|
+
def build_basic_auth_header(self):
|
|
117
|
+
"""
|
|
118
|
+
Build the basic auth header for endpoints in the
|
|
119
|
+
OAuth Authorization Controller.
|
|
120
|
+
|
|
121
|
+
Returns:
|
|
122
|
+
str: The value of the Authentication header.
|
|
123
|
+
|
|
124
|
+
"""
|
|
125
|
+
encoded = AuthHelper.get_base64_encoded_value(
|
|
126
|
+
self._oauth_client_id,
|
|
127
|
+
self._oauth_client_secret,
|
|
128
|
+
)
|
|
129
|
+
return f"Basic {encoded}"
|
|
130
|
+
|
|
131
|
+
def fetch_token(self, auth_code, additional_params=None):
|
|
132
|
+
"""
|
|
133
|
+
Execute call to fetch the OAuth token.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
auth_code (str): The authentication code.
|
|
137
|
+
additional_params (dict): Any additional form parameters.
|
|
138
|
+
|
|
139
|
+
Returns:
|
|
140
|
+
OAuthToken: The OAuth token.
|
|
141
|
+
|
|
142
|
+
"""
|
|
143
|
+
token = self._o_auth_api.request_token(
|
|
144
|
+
self.build_basic_auth_header(),
|
|
145
|
+
auth_code,
|
|
146
|
+
self._oauth_redirect_uri,
|
|
147
|
+
_optional_form_parameters=additional_params,
|
|
148
|
+
).body
|
|
149
|
+
if hasattr(token, "expires_in"):
|
|
150
|
+
current_utc_timestamp = AuthHelper.get_current_utc_timestamp()
|
|
151
|
+
token.expiry = AuthHelper.get_token_expiry(
|
|
152
|
+
current_utc_timestamp,
|
|
153
|
+
token.expires_in,
|
|
154
|
+
)
|
|
155
|
+
return token
|
|
156
|
+
|
|
157
|
+
def is_token_expired(self, oauth_token=None):
|
|
158
|
+
"""
|
|
159
|
+
Check if OAuth token has expired.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
oauth_token (OauthToken): The OAuth token whose expiry is to be checked.
|
|
163
|
+
|
|
164
|
+
Returns:
|
|
165
|
+
bool: True if OAuth token has expired, False otherwise.
|
|
166
|
+
|
|
167
|
+
"""
|
|
168
|
+
if oauth_token is None:
|
|
169
|
+
return (hasattr(self._oauth_token, "expiry")
|
|
170
|
+
and AuthHelper.is_token_expired(
|
|
171
|
+
self._oauth_token.expiry))
|
|
172
|
+
|
|
173
|
+
return (hasattr(oauth_token, "expiry")
|
|
174
|
+
and AuthHelper.is_token_expired(
|
|
175
|
+
oauth_token.expiry))
|
|
176
|
+
|
|
177
|
+
def refresh_token(self, additional_params=None):
|
|
178
|
+
"""
|
|
179
|
+
Execute call to refresh the OAuth token.
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
additional_params (dict): Any additional form parameters.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
OAuthToken: The refreshed OAuth token.
|
|
186
|
+
|
|
187
|
+
"""
|
|
188
|
+
token = self._o_auth_api.refresh_token(
|
|
189
|
+
self.build_basic_auth_header(),
|
|
190
|
+
self._oauth_token.refresh_token,
|
|
191
|
+
" ".join(self._oauth_scopes) if self._oauth_scopes else None,
|
|
192
|
+
_optional_form_parameters=additional_params,
|
|
193
|
+
).body
|
|
194
|
+
if hasattr(token, "expires_in"):
|
|
195
|
+
current_utc_timestamp = AuthHelper.get_current_utc_timestamp()
|
|
196
|
+
token.expiry = AuthHelper.get_token_expiry(
|
|
197
|
+
current_utc_timestamp,
|
|
198
|
+
token.expires_in,
|
|
199
|
+
)
|
|
200
|
+
return token
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class AuthorizationCodeAuthCredentials:
|
|
204
|
+
"""
|
|
205
|
+
A model for authentication credentials. Provides simple validation,
|
|
206
|
+
cloning support, and optional construction from environment variables.
|
|
207
|
+
Suitable as a pattern for other auth models.
|
|
208
|
+
"""
|
|
209
|
+
|
|
210
|
+
@property
|
|
211
|
+
def oauth_client_id(self):
|
|
212
|
+
"""
|
|
213
|
+
OAuth 2 Client ID.
|
|
214
|
+
"""
|
|
215
|
+
return self._oauth_client_id
|
|
216
|
+
|
|
217
|
+
@property
|
|
218
|
+
def oauth_client_secret(self):
|
|
219
|
+
"""
|
|
220
|
+
OAuth 2 Client Secret.
|
|
221
|
+
"""
|
|
222
|
+
return self._oauth_client_secret
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def oauth_redirect_uri(self):
|
|
226
|
+
"""
|
|
227
|
+
OAuth 2 Redirection endpoint or Callback Uri.
|
|
228
|
+
"""
|
|
229
|
+
return self._oauth_redirect_uri
|
|
230
|
+
|
|
231
|
+
@property
|
|
232
|
+
def oauth_token(self):
|
|
233
|
+
"""
|
|
234
|
+
Object for storing information about the OAuth token.
|
|
235
|
+
"""
|
|
236
|
+
return self._oauth_token
|
|
237
|
+
|
|
238
|
+
@property
|
|
239
|
+
def oauth_scopes(self):
|
|
240
|
+
"""
|
|
241
|
+
List of scopes that apply to the OAuth token.
|
|
242
|
+
"""
|
|
243
|
+
return self._oauth_scopes
|
|
244
|
+
|
|
245
|
+
def __init__(self, oauth_client_id, oauth_client_secret, oauth_redirect_uri,
|
|
246
|
+
oauth_token=None, oauth_scopes=None):
|
|
247
|
+
"""
|
|
248
|
+
Initialize the credentials.
|
|
249
|
+
|
|
250
|
+
Args:
|
|
251
|
+
oauth_client_id: The oauth_client_id property value to set.
|
|
252
|
+
oauth_client_secret: The oauth_client_secret property value to set.
|
|
253
|
+
oauth_redirect_uri: The oauth_redirect_uri property value to set.
|
|
254
|
+
oauth_token: The oauth_token property value to set.
|
|
255
|
+
oauth_scopes: The oauth_scopes property value to set.
|
|
256
|
+
|
|
257
|
+
Raises:
|
|
258
|
+
ValueError: If any required value is missing.
|
|
259
|
+
|
|
260
|
+
"""
|
|
261
|
+
if oauth_client_id is None:
|
|
262
|
+
raise ValueError("oauth_client_id cannot be None")
|
|
263
|
+
if oauth_client_secret is None:
|
|
264
|
+
raise ValueError("oauth_client_secret cannot be None")
|
|
265
|
+
if oauth_redirect_uri is None:
|
|
266
|
+
raise ValueError("oauth_redirect_uri cannot be None")
|
|
267
|
+
self._oauth_client_id = oauth_client_id
|
|
268
|
+
self._oauth_client_secret = oauth_client_secret
|
|
269
|
+
self._oauth_redirect_uri = oauth_redirect_uri
|
|
270
|
+
self._oauth_token = oauth_token
|
|
271
|
+
self._oauth_scopes = oauth_scopes
|
|
272
|
+
|
|
273
|
+
def clone_with(self, oauth_client_id=None, oauth_client_secret=None,
|
|
274
|
+
oauth_redirect_uri=None, oauth_token=None,
|
|
275
|
+
oauth_scopes=None):
|
|
276
|
+
"""
|
|
277
|
+
Return a new instance with optional value overrides.
|
|
278
|
+
|
|
279
|
+
Args:
|
|
280
|
+
oauth_client_id: The oauth_client_id property value to set.
|
|
281
|
+
oauth_client_secret: The oauth_client_secret property value to set.
|
|
282
|
+
oauth_redirect_uri: The oauth_redirect_uri property value to set.
|
|
283
|
+
oauth_token: The oauth_token property value to set.
|
|
284
|
+
oauth_scopes: The oauth_scopes property value to set.
|
|
285
|
+
|
|
286
|
+
"""
|
|
287
|
+
return AuthorizationCodeAuthCredentials(
|
|
288
|
+
oauth_client_id or self.oauth_client_id,
|
|
289
|
+
oauth_client_secret or self.oauth_client_secret,
|
|
290
|
+
oauth_redirect_uri or self.oauth_redirect_uri,
|
|
291
|
+
oauth_token or self.oauth_token, oauth_scopes or self.oauth_scopes)
|
|
292
|
+
|
|
293
|
+
@classmethod
|
|
294
|
+
def from_environment(cls):
|
|
295
|
+
"""
|
|
296
|
+
Create credentials from environment variables, if available.
|
|
297
|
+
|
|
298
|
+
Returns:
|
|
299
|
+
A credentials instance or ``None`` if values are missing.
|
|
300
|
+
|
|
301
|
+
"""
|
|
302
|
+
oauth_client_id = os.getenv(
|
|
303
|
+
"OAUTH_CLIENT_ID",
|
|
304
|
+
None,
|
|
305
|
+
)
|
|
306
|
+
oauth_client_secret = os.getenv(
|
|
307
|
+
"OAUTH_CLIENT_SECRET",
|
|
308
|
+
None,
|
|
309
|
+
)
|
|
310
|
+
oauth_redirect_uri = os.getenv(
|
|
311
|
+
"OAUTH_REDIRECT_URI",
|
|
312
|
+
None,
|
|
313
|
+
)
|
|
314
|
+
oauth_scopes = os.getenv(
|
|
315
|
+
"OAUTH_SCOPES",
|
|
316
|
+
None,
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
if (oauth_client_id is None
|
|
320
|
+
or oauth_client_secret is None
|
|
321
|
+
or oauth_redirect_uri is None):
|
|
322
|
+
return None
|
|
323
|
+
|
|
324
|
+
oauth_scopes = [
|
|
325
|
+
v.strip() for v in oauth_scopes.split(",") if v.strip()
|
|
326
|
+
] if oauth_scopes else None
|
|
327
|
+
|
|
328
|
+
return cls(
|
|
329
|
+
oauth_client_id=oauth_client_id,
|
|
330
|
+
oauth_client_secret=oauth_client_secret,
|
|
331
|
+
oauth_redirect_uri=oauth_redirect_uri,
|
|
332
|
+
oauth_scopes=oauth_scopes,
|
|
333
|
+
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
slackwebapi
|
|
4
|
+
|
|
5
|
+
This file was automatically generated by APIMATIC v3.0 (
|
|
6
|
+
https://www.apimatic.io ).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from apimatic_core.http.http_callback import HttpCallBack as CoreHttpCallback
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HttpCallBack(CoreHttpCallback):
|
|
13
|
+
"""
|
|
14
|
+
An interface for the callback to be called before and after the
|
|
15
|
+
HTTP call for an endpoint is made.
|
|
16
|
+
|
|
17
|
+
This class should not be instantiated but should be used as a base class
|
|
18
|
+
for HttpCallBack classes.
|
|
19
|
+
|
|
20
|
+
"""
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
slackwebapi
|
|
3
|
+
|
|
4
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
"""
|
|
6
|
+
from abc import ABC
|
|
7
|
+
|
|
8
|
+
from apimatic_core_interfaces.client.http_client_provider import (
|
|
9
|
+
HttpClientProvider as CoreHttpClientProvider,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class HttpClientProvider(CoreHttpClientProvider, ABC):
|
|
14
|
+
"""
|
|
15
|
+
Defines a contract for providing HTTP client configuration.
|
|
16
|
+
|
|
17
|
+
Classes implementing this interface are expected to supply a configured
|
|
18
|
+
HTTP session and timeout value that will be used by the SDK's internal
|
|
19
|
+
HTTP layer when making network requests.
|
|
20
|
+
|
|
21
|
+
This allows developers to inject their own custom HTTP clients while
|
|
22
|
+
maintaining compatibility with the SDK's request/response handling.
|
|
23
|
+
"""
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
slackwebapi
|
|
4
|
+
|
|
5
|
+
This file was automatically generated by APIMATIC v3.0 (
|
|
6
|
+
https://www.apimatic.io ).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from apimatic_core_interfaces.types.http_method_enum import (
|
|
10
|
+
HttpMethodEnum as CoreHttpMethodEnum,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class HttpMethodEnum(CoreHttpMethodEnum):
|
|
15
|
+
"""
|
|
16
|
+
Enumeration of an HTTP Method
|
|
17
|
+
|
|
18
|
+
Attributes:
|
|
19
|
+
GET: A GET Request
|
|
20
|
+
POST: A POST Request
|
|
21
|
+
PUT: A PUT Request
|
|
22
|
+
PATCH: A PATCH Request
|
|
23
|
+
DELETE: A DELETE Request
|
|
24
|
+
|
|
25
|
+
"""
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
slackwebapi
|
|
4
|
+
|
|
5
|
+
This file was automatically generated by APIMATIC v3.0 (
|
|
6
|
+
https://www.apimatic.io ).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from apimatic_core.http.request.http_request import HttpRequest as CoreHttpRequest
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HttpRequest(CoreHttpRequest):
|
|
13
|
+
"""
|
|
14
|
+
Represent an HTTP request to be sent to the server.
|
|
15
|
+
|
|
16
|
+
Encapsulates request details such as the HTTP method, target URL, headers,
|
|
17
|
+
query parameters, body parameters, and any files included with the request.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
http_method: The HTTP method to use for the request.
|
|
21
|
+
query_url (str): The URL to which the request will be sent.
|
|
22
|
+
headers (dict[str, str] | None): Headers to include with the request.
|
|
23
|
+
query_parameters (dict[str, str] | None): Query parameters appended
|
|
24
|
+
to the request URL.
|
|
25
|
+
parameters (dict[str, str] | None): Form or body parameters sent
|
|
26
|
+
with the request.
|
|
27
|
+
files (dict | None): Files to be sent with the request.
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
def __init__(self,
|
|
32
|
+
http_method,
|
|
33
|
+
query_url,
|
|
34
|
+
headers=None,
|
|
35
|
+
query_parameters=None,
|
|
36
|
+
parameters=None,
|
|
37
|
+
files=None):
|
|
38
|
+
"""
|
|
39
|
+
Initialize an HttpRequest instance.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
http_method: The HTTP method to use for the request.
|
|
43
|
+
query_url: The URL to which the request will be sent.
|
|
44
|
+
headers: Headers to include with the request.
|
|
45
|
+
query_parameters: Query parameters appended to the request URL.
|
|
46
|
+
parameters: Form or body parameters sent with the request.
|
|
47
|
+
files: Files to be sent with the request.
|
|
48
|
+
|
|
49
|
+
"""
|
|
50
|
+
super().__init__(http_method,
|
|
51
|
+
query_url,
|
|
52
|
+
headers,
|
|
53
|
+
query_parameters,
|
|
54
|
+
parameters,
|
|
55
|
+
files)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
slackwebapi
|
|
4
|
+
|
|
5
|
+
This file was automatically generated by APIMATIC v3.0 (
|
|
6
|
+
https://www.apimatic.io ).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from apimatic_core.http.response.http_response import HttpResponse as CoreHttpResponse
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HttpResponse(CoreHttpResponse):
|
|
13
|
+
"""
|
|
14
|
+
Represent an HTTP response returned by the server.
|
|
15
|
+
|
|
16
|
+
Stores response metadata such as status code, reason phrase, headers, and
|
|
17
|
+
the raw response body, along with the originating request.
|
|
18
|
+
|
|
19
|
+
Attributes:
|
|
20
|
+
status_code (int): The HTTP status code returned by the server.
|
|
21
|
+
reason_phrase (str): The reason phrase associated with the status code.
|
|
22
|
+
headers (dict[str, str]): Response headers as key-value pairs.
|
|
23
|
+
text (str): The raw response body as a string.
|
|
24
|
+
request: The request object that resulted in this response.
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def __init__(self,
|
|
29
|
+
status_code,
|
|
30
|
+
reason_phrase,
|
|
31
|
+
headers,
|
|
32
|
+
text,
|
|
33
|
+
request):
|
|
34
|
+
"""
|
|
35
|
+
Initialize an HttpResponse instance.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
status_code: The HTTP status code returned by the server.
|
|
39
|
+
reason_phrase: The reason phrase associated with the status code.
|
|
40
|
+
headers: Response headers as key-value pairs.
|
|
41
|
+
text: The raw response body as a string.
|
|
42
|
+
request: The request object that resulted in this response.
|
|
43
|
+
|
|
44
|
+
"""
|
|
45
|
+
super().__init__(status_code, reason_phrase, headers, text, request)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""
|
|
2
|
+
slackwebapi
|
|
3
|
+
|
|
4
|
+
This file was automatically generated by APIMATIC v3.0 (
|
|
5
|
+
https://www.apimatic.io ).
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
from typing import Optional
|
|
10
|
+
|
|
11
|
+
from apimatic_core.http.configurations.proxy_settings import (
|
|
12
|
+
ProxySettings as CoreProxySettings,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ProxySettings(CoreProxySettings):
|
|
17
|
+
"""A simple data model for configuring HTTP(S) proxy settings."""
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def from_environment(cls) -> Optional["ProxySettings"]:
|
|
21
|
+
"""
|
|
22
|
+
Create an instance of this class using environment-based configuration.
|
|
23
|
+
|
|
24
|
+
This method attempts to construct and return an instance using relevant
|
|
25
|
+
environment variables, if available. If the required configuration is
|
|
26
|
+
not present, it may return `None` to indicate that no valid instance
|
|
27
|
+
could be created.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
Optional[cls]: A configured instance of this class, or `None` if
|
|
31
|
+
configuration data is missing or invalid.
|
|
32
|
+
|
|
33
|
+
"""
|
|
34
|
+
address = os.getenv("PROXY_ADDRESS", None)
|
|
35
|
+
if not address:
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
port = os.getenv("PROXY_PORT", None)
|
|
39
|
+
if port is not None:
|
|
40
|
+
try:
|
|
41
|
+
port = int(port)
|
|
42
|
+
except (TypeError, ValueError):
|
|
43
|
+
port = None
|
|
44
|
+
|
|
45
|
+
return cls(
|
|
46
|
+
address=address,
|
|
47
|
+
port=port,
|
|
48
|
+
username=os.getenv("PROXY_USERNAME", None),
|
|
49
|
+
password=os.getenv("PROXY_PASSWORD", None),
|
|
50
|
+
)
|