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,1217 @@
|
|
|
1
|
+
"""slackwebapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: D410, E501, E101, D206
|
|
7
|
+
from apimatic_core.authentication.multiple.single_auth import (
|
|
8
|
+
Single,
|
|
9
|
+
)
|
|
10
|
+
from apimatic_core.request_builder import RequestBuilder
|
|
11
|
+
from apimatic_core.response_handler import ResponseHandler
|
|
12
|
+
from apimatic_core.types.parameter import Parameter
|
|
13
|
+
|
|
14
|
+
from slackwebapi.api_helper import APIHelper
|
|
15
|
+
from slackwebapi.configuration import Server
|
|
16
|
+
from slackwebapi.controllers.base_controller import (
|
|
17
|
+
BaseController,
|
|
18
|
+
)
|
|
19
|
+
from slackwebapi.exceptions.conversations_archive_error_schema_exception import (
|
|
20
|
+
ConversationsArchiveErrorSchemaException,
|
|
21
|
+
)
|
|
22
|
+
from slackwebapi.exceptions.conversations_close_error_schema_exception import (
|
|
23
|
+
ConversationsCloseErrorSchemaException,
|
|
24
|
+
)
|
|
25
|
+
from slackwebapi.exceptions.conversations_create_error_schema_exception import (
|
|
26
|
+
ConversationsCreateErrorSchemaException,
|
|
27
|
+
)
|
|
28
|
+
from slackwebapi.exceptions.conversations_history_error_schema_exception import (
|
|
29
|
+
ConversationsHistoryErrorSchemaException,
|
|
30
|
+
)
|
|
31
|
+
from slackwebapi.exceptions.conversations_info_error_schema_exception import (
|
|
32
|
+
ConversationsInfoErrorSchemaException,
|
|
33
|
+
)
|
|
34
|
+
from slackwebapi.exceptions.conversations_invite_error_schema_1_exception import (
|
|
35
|
+
ConversationsInviteErrorSchema1Exception,
|
|
36
|
+
)
|
|
37
|
+
from slackwebapi.exceptions.conversations_join_error_schema_exception import (
|
|
38
|
+
ConversationsJoinErrorSchemaException,
|
|
39
|
+
)
|
|
40
|
+
from slackwebapi.exceptions.conversations_kick_error_schema_exception import (
|
|
41
|
+
ConversationsKickErrorSchemaException,
|
|
42
|
+
)
|
|
43
|
+
from slackwebapi.exceptions.conversations_leave_error_schema_exception import (
|
|
44
|
+
ConversationsLeaveErrorSchemaException,
|
|
45
|
+
)
|
|
46
|
+
from slackwebapi.exceptions.conversations_list_error_schema_exception import (
|
|
47
|
+
ConversationsListErrorSchemaException,
|
|
48
|
+
)
|
|
49
|
+
from slackwebapi.exceptions.conversations_mark_error_schema_exception import (
|
|
50
|
+
ConversationsMarkErrorSchemaException,
|
|
51
|
+
)
|
|
52
|
+
from slackwebapi.exceptions.conversations_members_error_schema_exception import (
|
|
53
|
+
ConversationsMembersErrorSchemaException,
|
|
54
|
+
)
|
|
55
|
+
from slackwebapi.exceptions.conversations_open_error_schema_exception import (
|
|
56
|
+
ConversationsOpenErrorSchemaException,
|
|
57
|
+
)
|
|
58
|
+
from slackwebapi.exceptions.conversations_rename_error_schema_exception import (
|
|
59
|
+
ConversationsRenameErrorSchemaException,
|
|
60
|
+
)
|
|
61
|
+
from slackwebapi.exceptions.conversations_replies_error_schema_exception import (
|
|
62
|
+
ConversationsRepliesErrorSchemaException,
|
|
63
|
+
)
|
|
64
|
+
from slackwebapi.exceptions.conversations_set_purpose_error_schema_exception import (
|
|
65
|
+
ConversationsSetPurposeErrorSchemaException,
|
|
66
|
+
)
|
|
67
|
+
from slackwebapi.exceptions.conversations_set_topic_error_schema_exception import (
|
|
68
|
+
ConversationsSetTopicErrorSchemaException,
|
|
69
|
+
)
|
|
70
|
+
from slackwebapi.exceptions.conversations_unarchive_error_schema_exception import (
|
|
71
|
+
ConversationsUnarchiveErrorSchemaException,
|
|
72
|
+
)
|
|
73
|
+
from slackwebapi.http.http_method_enum import (
|
|
74
|
+
HttpMethodEnum,
|
|
75
|
+
)
|
|
76
|
+
from slackwebapi.models.conversations_archive_success_schema import (
|
|
77
|
+
ConversationsArchiveSuccessSchema,
|
|
78
|
+
)
|
|
79
|
+
from slackwebapi.models.conversations_close_success_schema import (
|
|
80
|
+
ConversationsCloseSuccessSchema,
|
|
81
|
+
)
|
|
82
|
+
from slackwebapi.models.conversations_create_success_schema import (
|
|
83
|
+
ConversationsCreateSuccessSchema,
|
|
84
|
+
)
|
|
85
|
+
from slackwebapi.models.conversations_history_success_schema import (
|
|
86
|
+
ConversationsHistorySuccessSchema,
|
|
87
|
+
)
|
|
88
|
+
from slackwebapi.models.conversations_info_success_schema import (
|
|
89
|
+
ConversationsInfoSuccessSchema,
|
|
90
|
+
)
|
|
91
|
+
from slackwebapi.models.conversations_invite_error_schema import (
|
|
92
|
+
ConversationsInviteErrorSchema,
|
|
93
|
+
)
|
|
94
|
+
from slackwebapi.models.conversations_join_success_schema import (
|
|
95
|
+
ConversationsJoinSuccessSchema,
|
|
96
|
+
)
|
|
97
|
+
from slackwebapi.models.conversations_kick_success_schema import (
|
|
98
|
+
ConversationsKickSuccessSchema,
|
|
99
|
+
)
|
|
100
|
+
from slackwebapi.models.conversations_leave_success_schema import (
|
|
101
|
+
ConversationsLeaveSuccessSchema,
|
|
102
|
+
)
|
|
103
|
+
from slackwebapi.models.conversations_list_success_schema import (
|
|
104
|
+
ConversationsListSuccessSchema,
|
|
105
|
+
)
|
|
106
|
+
from slackwebapi.models.conversations_mark_success_schema import (
|
|
107
|
+
ConversationsMarkSuccessSchema,
|
|
108
|
+
)
|
|
109
|
+
from slackwebapi.models.conversations_members_success_schema import (
|
|
110
|
+
ConversationsMembersSuccessSchema,
|
|
111
|
+
)
|
|
112
|
+
from slackwebapi.models.conversations_open_success_schema import (
|
|
113
|
+
ConversationsOpenSuccessSchema,
|
|
114
|
+
)
|
|
115
|
+
from slackwebapi.models.conversations_rename_success_schema import (
|
|
116
|
+
ConversationsRenameSuccessSchema,
|
|
117
|
+
)
|
|
118
|
+
from slackwebapi.models.conversations_replies_success_schema import (
|
|
119
|
+
ConversationsRepliesSuccessSchema,
|
|
120
|
+
)
|
|
121
|
+
from slackwebapi.models.conversations_set_purpose_success_schema import (
|
|
122
|
+
ConversationsSetPurposeSuccessSchema,
|
|
123
|
+
)
|
|
124
|
+
from slackwebapi.models.conversations_set_topic_success_schema import (
|
|
125
|
+
ConversationsSetTopicSuccessSchema,
|
|
126
|
+
)
|
|
127
|
+
from slackwebapi.models.conversations_unarchive_success_schema import (
|
|
128
|
+
ConversationsUnarchiveSuccessSchema,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class ConversationsController(BaseController):
|
|
133
|
+
"""A Controller to access Endpoints in the slackwebapi API."""
|
|
134
|
+
|
|
135
|
+
def __init__(self, config):
|
|
136
|
+
"""Initialize ConversationsController object."""
|
|
137
|
+
super(ConversationsController, self).__init__(config)
|
|
138
|
+
|
|
139
|
+
def conversations_archive(self,
|
|
140
|
+
token=None,
|
|
141
|
+
channel=None):
|
|
142
|
+
"""Perform a POST request to /conversations.archive.
|
|
143
|
+
|
|
144
|
+
Archives a conversation.
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
token (str, optional): Authentication token. Requires scope:
|
|
148
|
+
`conversations:write`
|
|
149
|
+
channel (str, optional): ID of conversation to archive
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
ApiResponse: An object with the response value as well as other useful
|
|
153
|
+
information such as status codes and headers. Typical success response
|
|
154
|
+
|
|
155
|
+
Raises:
|
|
156
|
+
ApiException: When an error occurs while fetching the data from the
|
|
157
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
158
|
+
message, and the HTTP body that was received in the request.
|
|
159
|
+
|
|
160
|
+
"""
|
|
161
|
+
return super().new_api_call_builder.request(
|
|
162
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
163
|
+
.path("/conversations.archive")
|
|
164
|
+
.http_method(HttpMethodEnum.POST)
|
|
165
|
+
.header_param(Parameter()
|
|
166
|
+
.key("token")
|
|
167
|
+
.value(token))
|
|
168
|
+
.form_param(Parameter()
|
|
169
|
+
.key("channel")
|
|
170
|
+
.value(channel))
|
|
171
|
+
.header_param(Parameter()
|
|
172
|
+
.key("content-type")
|
|
173
|
+
.value("application/x-www-form-urlencoded"))
|
|
174
|
+
.header_param(Parameter()
|
|
175
|
+
.key("accept")
|
|
176
|
+
.value("application/json"))
|
|
177
|
+
.auth(Single("slackAuth")),
|
|
178
|
+
).response(
|
|
179
|
+
ResponseHandler()
|
|
180
|
+
.deserializer(APIHelper.json_deserialize)
|
|
181
|
+
.deserialize_into(ConversationsArchiveSuccessSchema.from_dictionary)
|
|
182
|
+
.is_api_response(True)
|
|
183
|
+
.local_error("default",
|
|
184
|
+
"Typical error response",
|
|
185
|
+
ConversationsArchiveErrorSchemaException),
|
|
186
|
+
).execute()
|
|
187
|
+
|
|
188
|
+
def conversations_close(self,
|
|
189
|
+
token=None,
|
|
190
|
+
channel=None):
|
|
191
|
+
"""Perform a POST request to /conversations.close.
|
|
192
|
+
|
|
193
|
+
Closes a direct message or multi-person direct message.
|
|
194
|
+
|
|
195
|
+
Args:
|
|
196
|
+
token (str, optional): Authentication token. Requires scope:
|
|
197
|
+
`conversations:write`
|
|
198
|
+
channel (str, optional): Conversation to close.
|
|
199
|
+
|
|
200
|
+
Returns:
|
|
201
|
+
ApiResponse: An object with the response value as well as other useful
|
|
202
|
+
information such as status codes and headers. Typical success response
|
|
203
|
+
|
|
204
|
+
Raises:
|
|
205
|
+
ApiException: When an error occurs while fetching the data from the
|
|
206
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
207
|
+
message, and the HTTP body that was received in the request.
|
|
208
|
+
|
|
209
|
+
"""
|
|
210
|
+
return super().new_api_call_builder.request(
|
|
211
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
212
|
+
.path("/conversations.close")
|
|
213
|
+
.http_method(HttpMethodEnum.POST)
|
|
214
|
+
.header_param(Parameter()
|
|
215
|
+
.key("token")
|
|
216
|
+
.value(token))
|
|
217
|
+
.form_param(Parameter()
|
|
218
|
+
.key("channel")
|
|
219
|
+
.value(channel))
|
|
220
|
+
.header_param(Parameter()
|
|
221
|
+
.key("content-type")
|
|
222
|
+
.value("application/x-www-form-urlencoded"))
|
|
223
|
+
.header_param(Parameter()
|
|
224
|
+
.key("accept")
|
|
225
|
+
.value("application/json"))
|
|
226
|
+
.auth(Single("slackAuth")),
|
|
227
|
+
).response(
|
|
228
|
+
ResponseHandler()
|
|
229
|
+
.deserializer(APIHelper.json_deserialize)
|
|
230
|
+
.deserialize_into(ConversationsCloseSuccessSchema.from_dictionary)
|
|
231
|
+
.is_api_response(True)
|
|
232
|
+
.local_error("default",
|
|
233
|
+
"Typical error response",
|
|
234
|
+
ConversationsCloseErrorSchemaException),
|
|
235
|
+
).execute()
|
|
236
|
+
|
|
237
|
+
def conversations_create(self,
|
|
238
|
+
token=None,
|
|
239
|
+
name=None,
|
|
240
|
+
is_private=None):
|
|
241
|
+
"""Perform a POST request to /conversations.create.
|
|
242
|
+
|
|
243
|
+
Initiates a public or private channel-based conversation
|
|
244
|
+
|
|
245
|
+
Args:
|
|
246
|
+
token (str, optional): Authentication token. Requires scope:
|
|
247
|
+
`conversations:write`
|
|
248
|
+
name (str, optional): Name of the public or private channel to create
|
|
249
|
+
is_private (bool, optional): Create a private channel instead of a public
|
|
250
|
+
one
|
|
251
|
+
|
|
252
|
+
Returns:
|
|
253
|
+
ApiResponse: An object with the response value as well as other useful
|
|
254
|
+
information such as status codes and headers. If successful, the
|
|
255
|
+
command returns a rather stark [conversation
|
|
256
|
+
object](/types/conversation)
|
|
257
|
+
|
|
258
|
+
Raises:
|
|
259
|
+
ApiException: When an error occurs while fetching the data from the
|
|
260
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
261
|
+
message, and the HTTP body that was received in the request.
|
|
262
|
+
|
|
263
|
+
"""
|
|
264
|
+
return super().new_api_call_builder.request(
|
|
265
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
266
|
+
.path("/conversations.create")
|
|
267
|
+
.http_method(HttpMethodEnum.POST)
|
|
268
|
+
.header_param(Parameter()
|
|
269
|
+
.key("token")
|
|
270
|
+
.value(token))
|
|
271
|
+
.form_param(Parameter()
|
|
272
|
+
.key("name")
|
|
273
|
+
.value(name))
|
|
274
|
+
.form_param(Parameter()
|
|
275
|
+
.key("is_private")
|
|
276
|
+
.value(is_private))
|
|
277
|
+
.header_param(Parameter()
|
|
278
|
+
.key("content-type")
|
|
279
|
+
.value("application/x-www-form-urlencoded"))
|
|
280
|
+
.header_param(Parameter()
|
|
281
|
+
.key("accept")
|
|
282
|
+
.value("application/json"))
|
|
283
|
+
.auth(Single("slackAuth")),
|
|
284
|
+
).response(
|
|
285
|
+
ResponseHandler()
|
|
286
|
+
.deserializer(APIHelper.json_deserialize)
|
|
287
|
+
.deserialize_into(ConversationsCreateSuccessSchema.from_dictionary)
|
|
288
|
+
.is_api_response(True)
|
|
289
|
+
.local_error("default",
|
|
290
|
+
"Typical error response when name already in use",
|
|
291
|
+
ConversationsCreateErrorSchemaException),
|
|
292
|
+
).execute()
|
|
293
|
+
|
|
294
|
+
def conversations_history(self,
|
|
295
|
+
token=None,
|
|
296
|
+
channel=None,
|
|
297
|
+
latest=None,
|
|
298
|
+
oldest=None,
|
|
299
|
+
inclusive=None,
|
|
300
|
+
limit=None,
|
|
301
|
+
cursor=None):
|
|
302
|
+
"""Perform a GET request to /conversations.history.
|
|
303
|
+
|
|
304
|
+
Fetches a conversation's history of messages and events.
|
|
305
|
+
|
|
306
|
+
Args:
|
|
307
|
+
token (str, optional): Authentication token. Requires scope:
|
|
308
|
+
`conversations:history`
|
|
309
|
+
channel (str, optional): Conversation ID to fetch history for.
|
|
310
|
+
latest (float, optional): End of time range of messages to include in
|
|
311
|
+
results.
|
|
312
|
+
oldest (float, optional): Start of time range of messages to include in
|
|
313
|
+
results.
|
|
314
|
+
inclusive (bool, optional): Include messages with latest or oldest
|
|
315
|
+
timestamp in results only when either timestamp is specified.
|
|
316
|
+
limit (int, optional): The maximum number of items to return. Fewer than
|
|
317
|
+
the requested number of items may be returned, even if the end of the
|
|
318
|
+
users list hasn't been reached.
|
|
319
|
+
cursor (str, optional): Paginate through collections of data by setting
|
|
320
|
+
the `cursor` parameter to a `next_cursor` attribute returned by a
|
|
321
|
+
previous request's `response_metadata`. Default value fetches the
|
|
322
|
+
first "page" of the collection. See [pagination](/docs/pagination)
|
|
323
|
+
for more detail.
|
|
324
|
+
|
|
325
|
+
Returns:
|
|
326
|
+
ApiResponse: An object with the response value as well as other useful
|
|
327
|
+
information such as status codes and headers. Typical success
|
|
328
|
+
response containing a channel's messages
|
|
329
|
+
|
|
330
|
+
Raises:
|
|
331
|
+
ApiException: When an error occurs while fetching the data from the
|
|
332
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
333
|
+
message, and the HTTP body that was received in the request.
|
|
334
|
+
|
|
335
|
+
"""
|
|
336
|
+
return super().new_api_call_builder.request(
|
|
337
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
338
|
+
.path("/conversations.history")
|
|
339
|
+
.http_method(HttpMethodEnum.GET)
|
|
340
|
+
.header_param(Parameter()
|
|
341
|
+
.key("Content-Type")
|
|
342
|
+
.value("application/x-www-form-urlencoded"))
|
|
343
|
+
.query_param(Parameter()
|
|
344
|
+
.key("token")
|
|
345
|
+
.value(token))
|
|
346
|
+
.query_param(Parameter()
|
|
347
|
+
.key("channel")
|
|
348
|
+
.value(channel))
|
|
349
|
+
.query_param(Parameter()
|
|
350
|
+
.key("latest")
|
|
351
|
+
.value(latest))
|
|
352
|
+
.query_param(Parameter()
|
|
353
|
+
.key("oldest")
|
|
354
|
+
.value(oldest))
|
|
355
|
+
.query_param(Parameter()
|
|
356
|
+
.key("inclusive")
|
|
357
|
+
.value(inclusive))
|
|
358
|
+
.query_param(Parameter()
|
|
359
|
+
.key("limit")
|
|
360
|
+
.value(limit))
|
|
361
|
+
.query_param(Parameter()
|
|
362
|
+
.key("cursor")
|
|
363
|
+
.value(cursor))
|
|
364
|
+
.header_param(Parameter()
|
|
365
|
+
.key("accept")
|
|
366
|
+
.value("application/json"))
|
|
367
|
+
.auth(Single("slackAuth")),
|
|
368
|
+
).response(
|
|
369
|
+
ResponseHandler()
|
|
370
|
+
.deserializer(APIHelper.json_deserialize)
|
|
371
|
+
.deserialize_into(ConversationsHistorySuccessSchema.from_dictionary)
|
|
372
|
+
.is_api_response(True)
|
|
373
|
+
.local_error("default",
|
|
374
|
+
"Typical error response",
|
|
375
|
+
ConversationsHistoryErrorSchemaException),
|
|
376
|
+
).execute()
|
|
377
|
+
|
|
378
|
+
def conversations_info(self,
|
|
379
|
+
token=None,
|
|
380
|
+
channel=None,
|
|
381
|
+
include_locale=None,
|
|
382
|
+
include_num_members=None):
|
|
383
|
+
"""Perform a GET request to /conversations.info.
|
|
384
|
+
|
|
385
|
+
Retrieve information about a conversation.
|
|
386
|
+
|
|
387
|
+
Args:
|
|
388
|
+
token (str, optional): Authentication token. Requires scope:
|
|
389
|
+
`conversations:read`
|
|
390
|
+
channel (str, optional): Conversation ID to learn more about
|
|
391
|
+
include_locale (bool, optional): Set this to `true` to receive the locale
|
|
392
|
+
for this conversation. Defaults to `false`
|
|
393
|
+
include_num_members (bool, optional): Set to `true` to include the member
|
|
394
|
+
count for the specified conversation. Defaults to `false`
|
|
395
|
+
|
|
396
|
+
Returns:
|
|
397
|
+
ApiResponse: An object with the response value as well as other useful
|
|
398
|
+
information such as status codes and headers. Typical success
|
|
399
|
+
response for a public channel. (Also, a response from a private
|
|
400
|
+
channel and a multi-party IM is very similar to this example.)
|
|
401
|
+
|
|
402
|
+
Raises:
|
|
403
|
+
ApiException: When an error occurs while fetching the data from the
|
|
404
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
405
|
+
message, and the HTTP body that was received in the request.
|
|
406
|
+
|
|
407
|
+
"""
|
|
408
|
+
return super().new_api_call_builder.request(
|
|
409
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
410
|
+
.path("/conversations.info")
|
|
411
|
+
.http_method(HttpMethodEnum.GET)
|
|
412
|
+
.header_param(Parameter()
|
|
413
|
+
.key("Content-Type")
|
|
414
|
+
.value("application/x-www-form-urlencoded"))
|
|
415
|
+
.query_param(Parameter()
|
|
416
|
+
.key("token")
|
|
417
|
+
.value(token))
|
|
418
|
+
.query_param(Parameter()
|
|
419
|
+
.key("channel")
|
|
420
|
+
.value(channel))
|
|
421
|
+
.query_param(Parameter()
|
|
422
|
+
.key("include_locale")
|
|
423
|
+
.value(include_locale))
|
|
424
|
+
.query_param(Parameter()
|
|
425
|
+
.key("include_num_members")
|
|
426
|
+
.value(include_num_members))
|
|
427
|
+
.header_param(Parameter()
|
|
428
|
+
.key("accept")
|
|
429
|
+
.value("application/json"))
|
|
430
|
+
.auth(Single("slackAuth")),
|
|
431
|
+
).response(
|
|
432
|
+
ResponseHandler()
|
|
433
|
+
.deserializer(APIHelper.json_deserialize)
|
|
434
|
+
.deserialize_into(ConversationsInfoSuccessSchema.from_dictionary)
|
|
435
|
+
.is_api_response(True)
|
|
436
|
+
.local_error("default",
|
|
437
|
+
"Typical error response when a channel cannot be found",
|
|
438
|
+
ConversationsInfoErrorSchemaException),
|
|
439
|
+
).execute()
|
|
440
|
+
|
|
441
|
+
def conversations_invite(self,
|
|
442
|
+
token=None,
|
|
443
|
+
channel=None,
|
|
444
|
+
users=None):
|
|
445
|
+
"""Perform a POST request to /conversations.invite.
|
|
446
|
+
|
|
447
|
+
Invites users to a channel.
|
|
448
|
+
|
|
449
|
+
Args:
|
|
450
|
+
token (str, optional): Authentication token. Requires scope:
|
|
451
|
+
`conversations:write`
|
|
452
|
+
channel (str, optional): The ID of the public or private channel to
|
|
453
|
+
invite user(s) to.
|
|
454
|
+
users (str, optional): A comma separated list of user IDs. Up to 1000
|
|
455
|
+
users may be listed.
|
|
456
|
+
|
|
457
|
+
Returns:
|
|
458
|
+
ApiResponse: An object with the response value as well as other useful
|
|
459
|
+
information such as status codes and headers. Typical success
|
|
460
|
+
response when an invitation is extended
|
|
461
|
+
|
|
462
|
+
Raises:
|
|
463
|
+
ApiException: When an error occurs while fetching the data from the
|
|
464
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
465
|
+
message, and the HTTP body that was received in the request.
|
|
466
|
+
|
|
467
|
+
"""
|
|
468
|
+
return super().new_api_call_builder.request(
|
|
469
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
470
|
+
.path("/conversations.invite")
|
|
471
|
+
.http_method(HttpMethodEnum.POST)
|
|
472
|
+
.header_param(Parameter()
|
|
473
|
+
.key("token")
|
|
474
|
+
.value(token))
|
|
475
|
+
.form_param(Parameter()
|
|
476
|
+
.key("channel")
|
|
477
|
+
.value(channel))
|
|
478
|
+
.form_param(Parameter()
|
|
479
|
+
.key("users")
|
|
480
|
+
.value(users))
|
|
481
|
+
.header_param(Parameter()
|
|
482
|
+
.key("content-type")
|
|
483
|
+
.value("application/x-www-form-urlencoded"))
|
|
484
|
+
.header_param(Parameter()
|
|
485
|
+
.key("accept")
|
|
486
|
+
.value("application/json"))
|
|
487
|
+
.auth(Single("slackAuth")),
|
|
488
|
+
).response(
|
|
489
|
+
ResponseHandler()
|
|
490
|
+
.deserializer(APIHelper.json_deserialize)
|
|
491
|
+
.deserialize_into(ConversationsInviteErrorSchema.from_dictionary)
|
|
492
|
+
.is_api_response(True)
|
|
493
|
+
.local_error("default",
|
|
494
|
+
"Typical error response when an invite is attempted on a conversation"
|
|
495
|
+
" type that does not support it",
|
|
496
|
+
ConversationsInviteErrorSchema1Exception),
|
|
497
|
+
).execute()
|
|
498
|
+
|
|
499
|
+
def conversations_join(self,
|
|
500
|
+
token=None,
|
|
501
|
+
channel=None):
|
|
502
|
+
"""Perform a POST request to /conversations.join.
|
|
503
|
+
|
|
504
|
+
Joins an existing conversation.
|
|
505
|
+
|
|
506
|
+
Args:
|
|
507
|
+
token (str, optional): Authentication token. Requires scope:
|
|
508
|
+
`channels:write`
|
|
509
|
+
channel (str, optional): ID of conversation to join
|
|
510
|
+
|
|
511
|
+
Returns:
|
|
512
|
+
ApiResponse: An object with the response value as well as other useful
|
|
513
|
+
information such as status codes and headers. Typical success response
|
|
514
|
+
|
|
515
|
+
Raises:
|
|
516
|
+
ApiException: When an error occurs while fetching the data from the
|
|
517
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
518
|
+
message, and the HTTP body that was received in the request.
|
|
519
|
+
|
|
520
|
+
"""
|
|
521
|
+
return super().new_api_call_builder.request(
|
|
522
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
523
|
+
.path("/conversations.join")
|
|
524
|
+
.http_method(HttpMethodEnum.POST)
|
|
525
|
+
.header_param(Parameter()
|
|
526
|
+
.key("token")
|
|
527
|
+
.value(token))
|
|
528
|
+
.form_param(Parameter()
|
|
529
|
+
.key("channel")
|
|
530
|
+
.value(channel))
|
|
531
|
+
.header_param(Parameter()
|
|
532
|
+
.key("content-type")
|
|
533
|
+
.value("application/x-www-form-urlencoded"))
|
|
534
|
+
.header_param(Parameter()
|
|
535
|
+
.key("accept")
|
|
536
|
+
.value("application/json"))
|
|
537
|
+
.auth(Single("slackAuth")),
|
|
538
|
+
).response(
|
|
539
|
+
ResponseHandler()
|
|
540
|
+
.deserializer(APIHelper.json_deserialize)
|
|
541
|
+
.deserialize_into(ConversationsJoinSuccessSchema.from_dictionary)
|
|
542
|
+
.is_api_response(True)
|
|
543
|
+
.local_error("default",
|
|
544
|
+
"Typical error response if the conversation is archived and cannot be"
|
|
545
|
+
" joined",
|
|
546
|
+
ConversationsJoinErrorSchemaException),
|
|
547
|
+
).execute()
|
|
548
|
+
|
|
549
|
+
def conversations_kick(self,
|
|
550
|
+
token=None,
|
|
551
|
+
channel=None,
|
|
552
|
+
user=None):
|
|
553
|
+
"""Perform a POST request to /conversations.kick.
|
|
554
|
+
|
|
555
|
+
Removes a user from a conversation.
|
|
556
|
+
|
|
557
|
+
Args:
|
|
558
|
+
token (str, optional): Authentication token. Requires scope:
|
|
559
|
+
`conversations:write`
|
|
560
|
+
channel (str, optional): ID of conversation to remove user from.
|
|
561
|
+
user (str, optional): User ID to be removed.
|
|
562
|
+
|
|
563
|
+
Returns:
|
|
564
|
+
ApiResponse: An object with the response value as well as other useful
|
|
565
|
+
information such as status codes and headers. Typical success response
|
|
566
|
+
|
|
567
|
+
Raises:
|
|
568
|
+
ApiException: When an error occurs while fetching the data from the
|
|
569
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
570
|
+
message, and the HTTP body that was received in the request.
|
|
571
|
+
|
|
572
|
+
"""
|
|
573
|
+
return super().new_api_call_builder.request(
|
|
574
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
575
|
+
.path("/conversations.kick")
|
|
576
|
+
.http_method(HttpMethodEnum.POST)
|
|
577
|
+
.header_param(Parameter()
|
|
578
|
+
.key("token")
|
|
579
|
+
.value(token))
|
|
580
|
+
.form_param(Parameter()
|
|
581
|
+
.key("channel")
|
|
582
|
+
.value(channel))
|
|
583
|
+
.form_param(Parameter()
|
|
584
|
+
.key("user")
|
|
585
|
+
.value(user))
|
|
586
|
+
.header_param(Parameter()
|
|
587
|
+
.key("content-type")
|
|
588
|
+
.value("application/x-www-form-urlencoded"))
|
|
589
|
+
.header_param(Parameter()
|
|
590
|
+
.key("accept")
|
|
591
|
+
.value("application/json"))
|
|
592
|
+
.auth(Single("slackAuth")),
|
|
593
|
+
).response(
|
|
594
|
+
ResponseHandler()
|
|
595
|
+
.deserializer(APIHelper.json_deserialize)
|
|
596
|
+
.deserialize_into(ConversationsKickSuccessSchema.from_dictionary)
|
|
597
|
+
.is_api_response(True)
|
|
598
|
+
.local_error("default",
|
|
599
|
+
"Typical error response when you attempt to kick yourself from a chan"
|
|
600
|
+
"nel",
|
|
601
|
+
ConversationsKickErrorSchemaException),
|
|
602
|
+
).execute()
|
|
603
|
+
|
|
604
|
+
def conversations_leave(self,
|
|
605
|
+
token=None,
|
|
606
|
+
channel=None):
|
|
607
|
+
"""Perform a POST request to /conversations.leave.
|
|
608
|
+
|
|
609
|
+
Leaves a conversation.
|
|
610
|
+
|
|
611
|
+
Args:
|
|
612
|
+
token (str, optional): Authentication token. Requires scope:
|
|
613
|
+
`conversations:write`
|
|
614
|
+
channel (str, optional): Conversation to leave
|
|
615
|
+
|
|
616
|
+
Returns:
|
|
617
|
+
ApiResponse: An object with the response value as well as other useful
|
|
618
|
+
information such as status codes and headers. Typical success response
|
|
619
|
+
|
|
620
|
+
Raises:
|
|
621
|
+
ApiException: When an error occurs while fetching the data from the
|
|
622
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
623
|
+
message, and the HTTP body that was received in the request.
|
|
624
|
+
|
|
625
|
+
"""
|
|
626
|
+
return super().new_api_call_builder.request(
|
|
627
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
628
|
+
.path("/conversations.leave")
|
|
629
|
+
.http_method(HttpMethodEnum.POST)
|
|
630
|
+
.header_param(Parameter()
|
|
631
|
+
.key("token")
|
|
632
|
+
.value(token))
|
|
633
|
+
.form_param(Parameter()
|
|
634
|
+
.key("channel")
|
|
635
|
+
.value(channel))
|
|
636
|
+
.header_param(Parameter()
|
|
637
|
+
.key("content-type")
|
|
638
|
+
.value("application/x-www-form-urlencoded"))
|
|
639
|
+
.header_param(Parameter()
|
|
640
|
+
.key("accept")
|
|
641
|
+
.value("application/json"))
|
|
642
|
+
.auth(Single("slackAuth")),
|
|
643
|
+
).response(
|
|
644
|
+
ResponseHandler()
|
|
645
|
+
.deserializer(APIHelper.json_deserialize)
|
|
646
|
+
.deserialize_into(ConversationsLeaveSuccessSchema.from_dictionary)
|
|
647
|
+
.is_api_response(True)
|
|
648
|
+
.local_error("default",
|
|
649
|
+
"Typical error response when attempting to leave a workspace's 'gener"
|
|
650
|
+
"al' channel",
|
|
651
|
+
ConversationsLeaveErrorSchemaException),
|
|
652
|
+
).execute()
|
|
653
|
+
|
|
654
|
+
def conversations_list(self,
|
|
655
|
+
token=None,
|
|
656
|
+
exclude_archived=None,
|
|
657
|
+
types=None,
|
|
658
|
+
limit=None,
|
|
659
|
+
cursor=None):
|
|
660
|
+
"""Perform a GET request to /conversations.list.
|
|
661
|
+
|
|
662
|
+
Lists all channels in a Slack team.
|
|
663
|
+
|
|
664
|
+
Args:
|
|
665
|
+
token (str, optional): Authentication token. Requires scope:
|
|
666
|
+
`conversations:read`
|
|
667
|
+
exclude_archived (bool, optional): Set to `true` to exclude archived
|
|
668
|
+
channels from the list
|
|
669
|
+
types (str, optional): Mix and match channel types by providing a
|
|
670
|
+
comma-separated list of any combination of `public_channel`,
|
|
671
|
+
`private_channel`, `mpim`, `im`
|
|
672
|
+
limit (int, optional): The maximum number of items to return. Fewer than
|
|
673
|
+
the requested number of items may be returned, even if the end of the
|
|
674
|
+
list hasn't been reached. Must be an integer no larger than 1000.
|
|
675
|
+
cursor (str, optional): Paginate through collections of data by setting
|
|
676
|
+
the `cursor` parameter to a `next_cursor` attribute returned by a
|
|
677
|
+
previous request's `response_metadata`. Default value fetches the
|
|
678
|
+
first "page" of the collection. See [pagination](/docs/pagination)
|
|
679
|
+
for more detail.
|
|
680
|
+
|
|
681
|
+
Returns:
|
|
682
|
+
ApiResponse: An object with the response value as well as other useful
|
|
683
|
+
information such as status codes and headers. Typical success
|
|
684
|
+
response with only public channels
|
|
685
|
+
|
|
686
|
+
Raises:
|
|
687
|
+
ApiException: When an error occurs while fetching the data from the
|
|
688
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
689
|
+
message, and the HTTP body that was received in the request.
|
|
690
|
+
|
|
691
|
+
"""
|
|
692
|
+
return super().new_api_call_builder.request(
|
|
693
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
694
|
+
.path("/conversations.list")
|
|
695
|
+
.http_method(HttpMethodEnum.GET)
|
|
696
|
+
.header_param(Parameter()
|
|
697
|
+
.key("Content-Type")
|
|
698
|
+
.value("application/x-www-form-urlencoded"))
|
|
699
|
+
.query_param(Parameter()
|
|
700
|
+
.key("token")
|
|
701
|
+
.value(token))
|
|
702
|
+
.query_param(Parameter()
|
|
703
|
+
.key("exclude_archived")
|
|
704
|
+
.value(exclude_archived))
|
|
705
|
+
.query_param(Parameter()
|
|
706
|
+
.key("types")
|
|
707
|
+
.value(types))
|
|
708
|
+
.query_param(Parameter()
|
|
709
|
+
.key("limit")
|
|
710
|
+
.value(limit))
|
|
711
|
+
.query_param(Parameter()
|
|
712
|
+
.key("cursor")
|
|
713
|
+
.value(cursor))
|
|
714
|
+
.header_param(Parameter()
|
|
715
|
+
.key("accept")
|
|
716
|
+
.value("application/json"))
|
|
717
|
+
.auth(Single("slackAuth")),
|
|
718
|
+
).response(
|
|
719
|
+
ResponseHandler()
|
|
720
|
+
.deserializer(APIHelper.json_deserialize)
|
|
721
|
+
.deserialize_into(ConversationsListSuccessSchema.from_dictionary)
|
|
722
|
+
.is_api_response(True)
|
|
723
|
+
.local_error("default",
|
|
724
|
+
"Typical error response",
|
|
725
|
+
ConversationsListErrorSchemaException),
|
|
726
|
+
).execute()
|
|
727
|
+
|
|
728
|
+
def conversations_mark(self,
|
|
729
|
+
token=None,
|
|
730
|
+
channel=None,
|
|
731
|
+
ts=None):
|
|
732
|
+
"""Perform a POST request to /conversations.mark.
|
|
733
|
+
|
|
734
|
+
Sets the read cursor in a channel.
|
|
735
|
+
|
|
736
|
+
Args:
|
|
737
|
+
token (str, optional): Authentication token. Requires scope:
|
|
738
|
+
`conversations:write`
|
|
739
|
+
channel (str, optional): Channel or conversation to set the read cursor
|
|
740
|
+
for.
|
|
741
|
+
ts (float, optional): Unique identifier of message you want marked as
|
|
742
|
+
most recently seen in this conversation.
|
|
743
|
+
|
|
744
|
+
Returns:
|
|
745
|
+
ApiResponse: An object with the response value as well as other useful
|
|
746
|
+
information such as status codes and headers. Typical success response
|
|
747
|
+
|
|
748
|
+
Raises:
|
|
749
|
+
ApiException: When an error occurs while fetching the data from the
|
|
750
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
751
|
+
message, and the HTTP body that was received in the request.
|
|
752
|
+
|
|
753
|
+
"""
|
|
754
|
+
return super().new_api_call_builder.request(
|
|
755
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
756
|
+
.path("/conversations.mark")
|
|
757
|
+
.http_method(HttpMethodEnum.POST)
|
|
758
|
+
.header_param(Parameter()
|
|
759
|
+
.key("token")
|
|
760
|
+
.value(token))
|
|
761
|
+
.form_param(Parameter()
|
|
762
|
+
.key("channel")
|
|
763
|
+
.value(channel))
|
|
764
|
+
.form_param(Parameter()
|
|
765
|
+
.key("ts")
|
|
766
|
+
.value(ts))
|
|
767
|
+
.header_param(Parameter()
|
|
768
|
+
.key("content-type")
|
|
769
|
+
.value("application/x-www-form-urlencoded"))
|
|
770
|
+
.header_param(Parameter()
|
|
771
|
+
.key("accept")
|
|
772
|
+
.value("application/json"))
|
|
773
|
+
.auth(Single("slackAuth")),
|
|
774
|
+
).response(
|
|
775
|
+
ResponseHandler()
|
|
776
|
+
.deserializer(APIHelper.json_deserialize)
|
|
777
|
+
.deserialize_into(ConversationsMarkSuccessSchema.from_dictionary)
|
|
778
|
+
.is_api_response(True)
|
|
779
|
+
.local_error("default",
|
|
780
|
+
"Typical error response",
|
|
781
|
+
ConversationsMarkErrorSchemaException),
|
|
782
|
+
).execute()
|
|
783
|
+
|
|
784
|
+
def conversations_members(self,
|
|
785
|
+
token=None,
|
|
786
|
+
channel=None,
|
|
787
|
+
limit=None,
|
|
788
|
+
cursor=None):
|
|
789
|
+
"""Perform a GET request to /conversations.members.
|
|
790
|
+
|
|
791
|
+
Retrieve members of a conversation.
|
|
792
|
+
|
|
793
|
+
Args:
|
|
794
|
+
token (str, optional): Authentication token. Requires scope:
|
|
795
|
+
`conversations:read`
|
|
796
|
+
channel (str, optional): ID of the conversation to retrieve members for
|
|
797
|
+
limit (int, optional): The maximum number of items to return. Fewer than
|
|
798
|
+
the requested number of items may be returned, even if the end of the
|
|
799
|
+
users list hasn't been reached.
|
|
800
|
+
cursor (str, optional): Paginate through collections of data by setting
|
|
801
|
+
the `cursor` parameter to a `next_cursor` attribute returned by a
|
|
802
|
+
previous request's `response_metadata`. Default value fetches the
|
|
803
|
+
first "page" of the collection. See [pagination](/docs/pagination)
|
|
804
|
+
for more detail.
|
|
805
|
+
|
|
806
|
+
Returns:
|
|
807
|
+
ApiResponse: An object with the response value as well as other useful
|
|
808
|
+
information such as status codes and headers. Typical paginated
|
|
809
|
+
success response
|
|
810
|
+
|
|
811
|
+
Raises:
|
|
812
|
+
ApiException: When an error occurs while fetching the data from the
|
|
813
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
814
|
+
message, and the HTTP body that was received in the request.
|
|
815
|
+
|
|
816
|
+
"""
|
|
817
|
+
return super().new_api_call_builder.request(
|
|
818
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
819
|
+
.path("/conversations.members")
|
|
820
|
+
.http_method(HttpMethodEnum.GET)
|
|
821
|
+
.header_param(Parameter()
|
|
822
|
+
.key("Content-Type")
|
|
823
|
+
.value("application/x-www-form-urlencoded"))
|
|
824
|
+
.query_param(Parameter()
|
|
825
|
+
.key("token")
|
|
826
|
+
.value(token))
|
|
827
|
+
.query_param(Parameter()
|
|
828
|
+
.key("channel")
|
|
829
|
+
.value(channel))
|
|
830
|
+
.query_param(Parameter()
|
|
831
|
+
.key("limit")
|
|
832
|
+
.value(limit))
|
|
833
|
+
.query_param(Parameter()
|
|
834
|
+
.key("cursor")
|
|
835
|
+
.value(cursor))
|
|
836
|
+
.header_param(Parameter()
|
|
837
|
+
.key("accept")
|
|
838
|
+
.value("application/json"))
|
|
839
|
+
.auth(Single("slackAuth")),
|
|
840
|
+
).response(
|
|
841
|
+
ResponseHandler()
|
|
842
|
+
.deserializer(APIHelper.json_deserialize)
|
|
843
|
+
.deserialize_into(ConversationsMembersSuccessSchema.from_dictionary)
|
|
844
|
+
.is_api_response(True)
|
|
845
|
+
.local_error("default",
|
|
846
|
+
"Typical error response when an invalid cursor is provided",
|
|
847
|
+
ConversationsMembersErrorSchemaException),
|
|
848
|
+
).execute()
|
|
849
|
+
|
|
850
|
+
def conversations_open(self,
|
|
851
|
+
token=None,
|
|
852
|
+
channel=None,
|
|
853
|
+
users=None,
|
|
854
|
+
return_im=None):
|
|
855
|
+
"""Perform a POST request to /conversations.open.
|
|
856
|
+
|
|
857
|
+
Opens or resumes a direct message or multi-person direct message.
|
|
858
|
+
|
|
859
|
+
Args:
|
|
860
|
+
token (str, optional): Authentication token. Requires scope:
|
|
861
|
+
`conversations:write`
|
|
862
|
+
channel (str, optional): Resume a conversation by supplying an `im` or
|
|
863
|
+
`mpim`'s ID. Or provide the `users` field instead.
|
|
864
|
+
users (str, optional): Comma separated lists of users. If only one user
|
|
865
|
+
is included, this creates a 1:1 DM. The ordering of the users is
|
|
866
|
+
preserved whenever a multi-person direct message is returned. Supply
|
|
867
|
+
a `channel` when not supplying `users`.
|
|
868
|
+
return_im (bool, optional): Boolean, indicates you want the full IM
|
|
869
|
+
channel definition in the response.
|
|
870
|
+
|
|
871
|
+
Returns:
|
|
872
|
+
ApiResponse: An object with the response value as well as other useful
|
|
873
|
+
information such as status codes and headers. Typical success response
|
|
874
|
+
|
|
875
|
+
Raises:
|
|
876
|
+
ApiException: When an error occurs while fetching the data from the
|
|
877
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
878
|
+
message, and the HTTP body that was received in the request.
|
|
879
|
+
|
|
880
|
+
"""
|
|
881
|
+
return super().new_api_call_builder.request(
|
|
882
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
883
|
+
.path("/conversations.open")
|
|
884
|
+
.http_method(HttpMethodEnum.POST)
|
|
885
|
+
.header_param(Parameter()
|
|
886
|
+
.key("token")
|
|
887
|
+
.value(token))
|
|
888
|
+
.form_param(Parameter()
|
|
889
|
+
.key("channel")
|
|
890
|
+
.value(channel))
|
|
891
|
+
.form_param(Parameter()
|
|
892
|
+
.key("users")
|
|
893
|
+
.value(users))
|
|
894
|
+
.form_param(Parameter()
|
|
895
|
+
.key("return_im")
|
|
896
|
+
.value(return_im))
|
|
897
|
+
.header_param(Parameter()
|
|
898
|
+
.key("content-type")
|
|
899
|
+
.value("application/x-www-form-urlencoded"))
|
|
900
|
+
.header_param(Parameter()
|
|
901
|
+
.key("accept")
|
|
902
|
+
.value("application/json"))
|
|
903
|
+
.auth(Single("slackAuth")),
|
|
904
|
+
).response(
|
|
905
|
+
ResponseHandler()
|
|
906
|
+
.deserializer(APIHelper.json_deserialize)
|
|
907
|
+
.deserialize_into(ConversationsOpenSuccessSchema.from_dictionary)
|
|
908
|
+
.is_api_response(True)
|
|
909
|
+
.local_error("default",
|
|
910
|
+
"Typical error response",
|
|
911
|
+
ConversationsOpenErrorSchemaException),
|
|
912
|
+
).execute()
|
|
913
|
+
|
|
914
|
+
def conversations_rename(self,
|
|
915
|
+
token=None,
|
|
916
|
+
channel=None,
|
|
917
|
+
name=None):
|
|
918
|
+
"""Perform a POST request to /conversations.rename.
|
|
919
|
+
|
|
920
|
+
Renames a conversation.
|
|
921
|
+
|
|
922
|
+
Args:
|
|
923
|
+
token (str, optional): Authentication token. Requires scope:
|
|
924
|
+
`conversations:write`
|
|
925
|
+
channel (str, optional): ID of conversation to rename
|
|
926
|
+
name (str, optional): New name for conversation.
|
|
927
|
+
|
|
928
|
+
Returns:
|
|
929
|
+
ApiResponse: An object with the response value as well as other useful
|
|
930
|
+
information such as status codes and headers. Typical success response
|
|
931
|
+
|
|
932
|
+
Raises:
|
|
933
|
+
ApiException: When an error occurs while fetching the data from the
|
|
934
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
935
|
+
message, and the HTTP body that was received in the request.
|
|
936
|
+
|
|
937
|
+
"""
|
|
938
|
+
return super().new_api_call_builder.request(
|
|
939
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
940
|
+
.path("/conversations.rename")
|
|
941
|
+
.http_method(HttpMethodEnum.POST)
|
|
942
|
+
.header_param(Parameter()
|
|
943
|
+
.key("token")
|
|
944
|
+
.value(token))
|
|
945
|
+
.form_param(Parameter()
|
|
946
|
+
.key("channel")
|
|
947
|
+
.value(channel))
|
|
948
|
+
.form_param(Parameter()
|
|
949
|
+
.key("name")
|
|
950
|
+
.value(name))
|
|
951
|
+
.header_param(Parameter()
|
|
952
|
+
.key("content-type")
|
|
953
|
+
.value("application/x-www-form-urlencoded"))
|
|
954
|
+
.header_param(Parameter()
|
|
955
|
+
.key("accept")
|
|
956
|
+
.value("application/json"))
|
|
957
|
+
.auth(Single("slackAuth")),
|
|
958
|
+
).response(
|
|
959
|
+
ResponseHandler()
|
|
960
|
+
.deserializer(APIHelper.json_deserialize)
|
|
961
|
+
.deserialize_into(ConversationsRenameSuccessSchema.from_dictionary)
|
|
962
|
+
.is_api_response(True)
|
|
963
|
+
.local_error("default",
|
|
964
|
+
"Typical error response when the calling user is not a member of the "
|
|
965
|
+
"conversation",
|
|
966
|
+
ConversationsRenameErrorSchemaException),
|
|
967
|
+
).execute()
|
|
968
|
+
|
|
969
|
+
def conversations_replies(self,
|
|
970
|
+
token=None,
|
|
971
|
+
channel=None,
|
|
972
|
+
ts=None,
|
|
973
|
+
latest=None,
|
|
974
|
+
oldest=None,
|
|
975
|
+
inclusive=None,
|
|
976
|
+
limit=None,
|
|
977
|
+
cursor=None):
|
|
978
|
+
"""Perform a GET request to /conversations.replies.
|
|
979
|
+
|
|
980
|
+
Retrieve a thread of messages posted to a conversation
|
|
981
|
+
|
|
982
|
+
Args:
|
|
983
|
+
token (str, optional): Authentication token. Requires scope:
|
|
984
|
+
`conversations:history`
|
|
985
|
+
channel (str, optional): Conversation ID to fetch thread from.
|
|
986
|
+
ts (float, optional): Unique identifier of a thread's parent message.
|
|
987
|
+
`ts` must be the timestamp of an existing message with 0 or more
|
|
988
|
+
replies. If there are no replies then just the single message
|
|
989
|
+
referenced by `ts` will return - it is just an ordinary, unthreaded
|
|
990
|
+
message.
|
|
991
|
+
latest (float, optional): End of time range of messages to include in
|
|
992
|
+
results.
|
|
993
|
+
oldest (float, optional): Start of time range of messages to include in
|
|
994
|
+
results.
|
|
995
|
+
inclusive (bool, optional): Include messages with latest or oldest
|
|
996
|
+
timestamp in results only when either timestamp is specified.
|
|
997
|
+
limit (int, optional): The maximum number of items to return. Fewer than
|
|
998
|
+
the requested number of items may be returned, even if the end of the
|
|
999
|
+
users list hasn't been reached.
|
|
1000
|
+
cursor (str, optional): Paginate through collections of data by setting
|
|
1001
|
+
the `cursor` parameter to a `next_cursor` attribute returned by a
|
|
1002
|
+
previous request's `response_metadata`. Default value fetches the
|
|
1003
|
+
first "page" of the collection. See [pagination](/docs/pagination)
|
|
1004
|
+
for more detail.
|
|
1005
|
+
|
|
1006
|
+
Returns:
|
|
1007
|
+
ApiResponse: An object with the response value as well as other useful
|
|
1008
|
+
information such as status codes and headers. Typical success response
|
|
1009
|
+
|
|
1010
|
+
Raises:
|
|
1011
|
+
ApiException: When an error occurs while fetching the data from the
|
|
1012
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
1013
|
+
message, and the HTTP body that was received in the request.
|
|
1014
|
+
|
|
1015
|
+
"""
|
|
1016
|
+
return super().new_api_call_builder.request(
|
|
1017
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
1018
|
+
.path("/conversations.replies")
|
|
1019
|
+
.http_method(HttpMethodEnum.GET)
|
|
1020
|
+
.header_param(Parameter()
|
|
1021
|
+
.key("Content-Type")
|
|
1022
|
+
.value("application/x-www-form-urlencoded"))
|
|
1023
|
+
.query_param(Parameter()
|
|
1024
|
+
.key("token")
|
|
1025
|
+
.value(token))
|
|
1026
|
+
.query_param(Parameter()
|
|
1027
|
+
.key("channel")
|
|
1028
|
+
.value(channel))
|
|
1029
|
+
.query_param(Parameter()
|
|
1030
|
+
.key("ts")
|
|
1031
|
+
.value(ts))
|
|
1032
|
+
.query_param(Parameter()
|
|
1033
|
+
.key("latest")
|
|
1034
|
+
.value(latest))
|
|
1035
|
+
.query_param(Parameter()
|
|
1036
|
+
.key("oldest")
|
|
1037
|
+
.value(oldest))
|
|
1038
|
+
.query_param(Parameter()
|
|
1039
|
+
.key("inclusive")
|
|
1040
|
+
.value(inclusive))
|
|
1041
|
+
.query_param(Parameter()
|
|
1042
|
+
.key("limit")
|
|
1043
|
+
.value(limit))
|
|
1044
|
+
.query_param(Parameter()
|
|
1045
|
+
.key("cursor")
|
|
1046
|
+
.value(cursor))
|
|
1047
|
+
.header_param(Parameter()
|
|
1048
|
+
.key("accept")
|
|
1049
|
+
.value("application/json"))
|
|
1050
|
+
.auth(Single("slackAuth")),
|
|
1051
|
+
).response(
|
|
1052
|
+
ResponseHandler()
|
|
1053
|
+
.deserializer(APIHelper.json_deserialize)
|
|
1054
|
+
.deserialize_into(ConversationsRepliesSuccessSchema.from_dictionary)
|
|
1055
|
+
.is_api_response(True)
|
|
1056
|
+
.local_error("default",
|
|
1057
|
+
"Typical error response",
|
|
1058
|
+
ConversationsRepliesErrorSchemaException),
|
|
1059
|
+
).execute()
|
|
1060
|
+
|
|
1061
|
+
def conversations_set_purpose(self,
|
|
1062
|
+
token=None,
|
|
1063
|
+
channel=None,
|
|
1064
|
+
purpose=None):
|
|
1065
|
+
"""Perform a POST request to /conversations.setPurpose.
|
|
1066
|
+
|
|
1067
|
+
Sets the purpose for a conversation.
|
|
1068
|
+
|
|
1069
|
+
Args:
|
|
1070
|
+
token (str, optional): Authentication token. Requires scope:
|
|
1071
|
+
`conversations:write`
|
|
1072
|
+
channel (str, optional): Conversation to set the purpose of
|
|
1073
|
+
purpose (str, optional): A new, specialer purpose
|
|
1074
|
+
|
|
1075
|
+
Returns:
|
|
1076
|
+
ApiResponse: An object with the response value as well as other useful
|
|
1077
|
+
information such as status codes and headers. Typical success response
|
|
1078
|
+
|
|
1079
|
+
Raises:
|
|
1080
|
+
ApiException: When an error occurs while fetching the data from the
|
|
1081
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
1082
|
+
message, and the HTTP body that was received in the request.
|
|
1083
|
+
|
|
1084
|
+
"""
|
|
1085
|
+
return super().new_api_call_builder.request(
|
|
1086
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
1087
|
+
.path("/conversations.setPurpose")
|
|
1088
|
+
.http_method(HttpMethodEnum.POST)
|
|
1089
|
+
.header_param(Parameter()
|
|
1090
|
+
.key("token")
|
|
1091
|
+
.value(token))
|
|
1092
|
+
.form_param(Parameter()
|
|
1093
|
+
.key("channel")
|
|
1094
|
+
.value(channel))
|
|
1095
|
+
.form_param(Parameter()
|
|
1096
|
+
.key("purpose")
|
|
1097
|
+
.value(purpose))
|
|
1098
|
+
.header_param(Parameter()
|
|
1099
|
+
.key("content-type")
|
|
1100
|
+
.value("application/x-www-form-urlencoded"))
|
|
1101
|
+
.header_param(Parameter()
|
|
1102
|
+
.key("accept")
|
|
1103
|
+
.value("application/json"))
|
|
1104
|
+
.auth(Single("slackAuth")),
|
|
1105
|
+
).response(
|
|
1106
|
+
ResponseHandler()
|
|
1107
|
+
.deserializer(APIHelper.json_deserialize)
|
|
1108
|
+
.deserialize_into(ConversationsSetPurposeSuccessSchema.from_dictionary)
|
|
1109
|
+
.is_api_response(True)
|
|
1110
|
+
.local_error("default",
|
|
1111
|
+
"Typical error response",
|
|
1112
|
+
ConversationsSetPurposeErrorSchemaException),
|
|
1113
|
+
).execute()
|
|
1114
|
+
|
|
1115
|
+
def conversations_set_topic(self,
|
|
1116
|
+
token=None,
|
|
1117
|
+
channel=None,
|
|
1118
|
+
topic=None):
|
|
1119
|
+
"""Perform a POST request to /conversations.setTopic.
|
|
1120
|
+
|
|
1121
|
+
Sets the topic for a conversation.
|
|
1122
|
+
|
|
1123
|
+
Args:
|
|
1124
|
+
token (str, optional): Authentication token. Requires scope:
|
|
1125
|
+
`conversations:write`
|
|
1126
|
+
channel (str, optional): Conversation to set the topic of
|
|
1127
|
+
topic (str, optional): The new topic string. Does not support formatting
|
|
1128
|
+
or linkification.
|
|
1129
|
+
|
|
1130
|
+
Returns:
|
|
1131
|
+
ApiResponse: An object with the response value as well as other useful
|
|
1132
|
+
information such as status codes and headers. Typical success response
|
|
1133
|
+
|
|
1134
|
+
Raises:
|
|
1135
|
+
ApiException: When an error occurs while fetching the data from the
|
|
1136
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
1137
|
+
message, and the HTTP body that was received in the request.
|
|
1138
|
+
|
|
1139
|
+
"""
|
|
1140
|
+
return super().new_api_call_builder.request(
|
|
1141
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
1142
|
+
.path("/conversations.setTopic")
|
|
1143
|
+
.http_method(HttpMethodEnum.POST)
|
|
1144
|
+
.header_param(Parameter()
|
|
1145
|
+
.key("token")
|
|
1146
|
+
.value(token))
|
|
1147
|
+
.form_param(Parameter()
|
|
1148
|
+
.key("channel")
|
|
1149
|
+
.value(channel))
|
|
1150
|
+
.form_param(Parameter()
|
|
1151
|
+
.key("topic")
|
|
1152
|
+
.value(topic))
|
|
1153
|
+
.header_param(Parameter()
|
|
1154
|
+
.key("content-type")
|
|
1155
|
+
.value("application/x-www-form-urlencoded"))
|
|
1156
|
+
.header_param(Parameter()
|
|
1157
|
+
.key("accept")
|
|
1158
|
+
.value("application/json"))
|
|
1159
|
+
.auth(Single("slackAuth")),
|
|
1160
|
+
).response(
|
|
1161
|
+
ResponseHandler()
|
|
1162
|
+
.deserializer(APIHelper.json_deserialize)
|
|
1163
|
+
.deserialize_into(ConversationsSetTopicSuccessSchema.from_dictionary)
|
|
1164
|
+
.is_api_response(True)
|
|
1165
|
+
.local_error("default",
|
|
1166
|
+
"Typical error response",
|
|
1167
|
+
ConversationsSetTopicErrorSchemaException),
|
|
1168
|
+
).execute()
|
|
1169
|
+
|
|
1170
|
+
def conversations_unarchive(self,
|
|
1171
|
+
token=None,
|
|
1172
|
+
channel=None):
|
|
1173
|
+
"""Perform a POST request to /conversations.unarchive.
|
|
1174
|
+
|
|
1175
|
+
Reverses conversation archival.
|
|
1176
|
+
|
|
1177
|
+
Args:
|
|
1178
|
+
token (str, optional): Authentication token. Requires scope:
|
|
1179
|
+
`conversations:write`
|
|
1180
|
+
channel (str, optional): ID of conversation to unarchive
|
|
1181
|
+
|
|
1182
|
+
Returns:
|
|
1183
|
+
ApiResponse: An object with the response value as well as other useful
|
|
1184
|
+
information such as status codes and headers. Typical success response
|
|
1185
|
+
|
|
1186
|
+
Raises:
|
|
1187
|
+
ApiException: When an error occurs while fetching the data from the
|
|
1188
|
+
remote API. This exception includes the HTTP Response code, an error
|
|
1189
|
+
message, and the HTTP body that was received in the request.
|
|
1190
|
+
|
|
1191
|
+
"""
|
|
1192
|
+
return super().new_api_call_builder.request(
|
|
1193
|
+
RequestBuilder().server(Server.DEFAULT)
|
|
1194
|
+
.path("/conversations.unarchive")
|
|
1195
|
+
.http_method(HttpMethodEnum.POST)
|
|
1196
|
+
.header_param(Parameter()
|
|
1197
|
+
.key("token")
|
|
1198
|
+
.value(token))
|
|
1199
|
+
.form_param(Parameter()
|
|
1200
|
+
.key("channel")
|
|
1201
|
+
.value(channel))
|
|
1202
|
+
.header_param(Parameter()
|
|
1203
|
+
.key("content-type")
|
|
1204
|
+
.value("application/x-www-form-urlencoded"))
|
|
1205
|
+
.header_param(Parameter()
|
|
1206
|
+
.key("accept")
|
|
1207
|
+
.value("application/json"))
|
|
1208
|
+
.auth(Single("slackAuth")),
|
|
1209
|
+
).response(
|
|
1210
|
+
ResponseHandler()
|
|
1211
|
+
.deserializer(APIHelper.json_deserialize)
|
|
1212
|
+
.deserialize_into(ConversationsUnarchiveSuccessSchema.from_dictionary)
|
|
1213
|
+
.is_api_response(True)
|
|
1214
|
+
.local_error("default",
|
|
1215
|
+
"Typical error response",
|
|
1216
|
+
ConversationsUnarchiveErrorSchemaException),
|
|
1217
|
+
).execute()
|