slackapi-sdk 1.0.0
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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +221 -0
- data/bin/console +15 -0
- data/lib/slack_web_api/api_helper.rb +10 -0
- data/lib/slack_web_api/client.rb +410 -0
- data/lib/slack_web_api/configuration.rb +173 -0
- data/lib/slack_web_api/controllers/admin_apps_approved_controller.rb +48 -0
- data/lib/slack_web_api/controllers/admin_apps_controller.rb +78 -0
- data/lib/slack_web_api/controllers/admin_apps_requests_controller.rb +44 -0
- data/lib/slack_web_api/controllers/admin_apps_restricted_controller.rb +48 -0
- data/lib/slack_web_api/controllers/admin_conversations_controller.rb +472 -0
- data/lib/slack_web_api/controllers/admin_conversations_ekm_controller.rb +51 -0
- data/lib/slack_web_api/controllers/admin_conversations_restrict_access_controller.rb +129 -0
- data/lib/slack_web_api/controllers/admin_emoji_controller.rb +175 -0
- data/lib/slack_web_api/controllers/admin_invite_requests_approved_controller.rb +46 -0
- data/lib/slack_web_api/controllers/admin_invite_requests_controller.rb +112 -0
- data/lib/slack_web_api/controllers/admin_invite_requests_denied_controller.rb +46 -0
- data/lib/slack_web_api/controllers/admin_teams_admins_controller.rb +45 -0
- data/lib/slack_web_api/controllers/admin_teams_controller.rb +84 -0
- data/lib/slack_web_api/controllers/admin_teams_owners_controller.rb +45 -0
- data/lib/slack_web_api/controllers/admin_teams_settings_controller.rb +206 -0
- data/lib/slack_web_api/controllers/admin_usergroups_controller.rb +161 -0
- data/lib/slack_web_api/controllers/admin_users_controller.rb +333 -0
- data/lib/slack_web_api/controllers/admin_users_session_controller.rb +80 -0
- data/lib/slack_web_api/controllers/api_controller.rb +34 -0
- data/lib/slack_web_api/controllers/apps_controller.rb +40 -0
- data/lib/slack_web_api/controllers/apps_event_authorizations_controller.rb +45 -0
- data/lib/slack_web_api/controllers/apps_permissions_controller.rb +66 -0
- data/lib/slack_web_api/controllers/apps_permissions_resources_controller.rb +44 -0
- data/lib/slack_web_api/controllers/apps_permissions_scopes_controller.rb +33 -0
- data/lib/slack_web_api/controllers/apps_permissions_users_controller.rb +85 -0
- data/lib/slack_web_api/controllers/auth_controller.rb +62 -0
- data/lib/slack_web_api/controllers/base_controller.rb +67 -0
- data/lib/slack_web_api/controllers/bots_controller.rb +36 -0
- data/lib/slack_web_api/controllers/calls_controller.rb +174 -0
- data/lib/slack_web_api/controllers/calls_participants_controller.rb +79 -0
- data/lib/slack_web_api/controllers/chat_controller.rb +528 -0
- data/lib/slack_web_api/controllers/chat_scheduled_messages_controller.rb +54 -0
- data/lib/slack_web_api/controllers/conversations_controller.rb +628 -0
- data/lib/slack_web_api/controllers/dialog_controller.rb +44 -0
- data/lib/slack_web_api/controllers/dnd_controller.rb +141 -0
- data/lib/slack_web_api/controllers/emoji_controller.rb +33 -0
- data/lib/slack_web_api/controllers/files_comments_controller.rb +38 -0
- data/lib/slack_web_api/controllers/files_controller.rb +245 -0
- data/lib/slack_web_api/controllers/files_remote_controller.rb +250 -0
- data/lib/slack_web_api/controllers/migration_controller.rb +47 -0
- data/lib/slack_web_api/controllers/oauth_authorization_controller.rb +87 -0
- data/lib/slack_web_api/controllers/oauth_controller.rb +88 -0
- data/lib/slack_web_api/controllers/oauth_v2_controller.rb +45 -0
- data/lib/slack_web_api/controllers/pins_controller.rb +102 -0
- data/lib/slack_web_api/controllers/reactions_controller.rb +182 -0
- data/lib/slack_web_api/controllers/reminders_controller.rb +151 -0
- data/lib/slack_web_api/controllers/rtm_controller.rb +44 -0
- data/lib/slack_web_api/controllers/search_controller.rb +56 -0
- data/lib/slack_web_api/controllers/stars_controller.rb +130 -0
- data/lib/slack_web_api/controllers/team_controller.rb +148 -0
- data/lib/slack_web_api/controllers/team_profile_controller.rb +36 -0
- data/lib/slack_web_api/controllers/usergroups_controller.rb +205 -0
- data/lib/slack_web_api/controllers/usergroups_users_controller.rb +81 -0
- data/lib/slack_web_api/controllers/users_controller.rb +327 -0
- data/lib/slack_web_api/controllers/users_profile_controller.rb +82 -0
- data/lib/slack_web_api/controllers/views_controller.rb +158 -0
- data/lib/slack_web_api/controllers/workflows_controller.rb +130 -0
- data/lib/slack_web_api/exceptions/admin_conversations_archive_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_convert_to_private_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_create_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_delete_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_disconnect_shared_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_get_teams_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_invite_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_search_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_set_conversation_prefs_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_unarchive_error_schema2_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_unarchive_error_schema3_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/admin_conversations_unarchive_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/api_exception.rb +21 -0
- data/lib/slack_web_api/exceptions/api_test_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/apps_permissions_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/apps_permissions_request_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/apps_permissions_resources_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/apps_permissions_scopes_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/apps_uninstall_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/auth_revoke_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/auth_test_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/bots_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_delete_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_delete_scheduled_message_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_get_permalink_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_me_message_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_post_ephemeral_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_post_message_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_schedule_message_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_scheduled_messages_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_unfurl_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/chat_update_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/conversations_archive_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_close_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_create_error_schema_exception.rb +73 -0
- data/lib/slack_web_api/exceptions/conversations_history_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_info_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_invite_error_schema1_exception.rb +82 -0
- data/lib/slack_web_api/exceptions/conversations_join_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_kick_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_leave_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_list_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_mark_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_members_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/conversations_open_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/conversations_rename_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_replies_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_set_purpose_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_set_topic_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/conversations_unarchive_error_schema_exception.rb +67 -0
- data/lib/slack_web_api/exceptions/default_error_template_exception.rb +47 -0
- data/lib/slack_web_api/exceptions/dialog_open_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/dnd_end_dnd_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/dnd_end_snooze_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/dnd_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/dnd_set_snooze_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_comments_delete_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_delete_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_revoke_public_url_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_shared_public_url_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/files_upload_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/migration_exchange_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/oauth_provider_exception.rb +64 -0
- data/lib/slack_web_api/exceptions/pins_add_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/pins_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/pins_remove_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reactions_add_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reactions_get_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reactions_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reactions_remove_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reminders_add_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reminders_complete_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reminders_delete_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reminders_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/reminders_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/rtm_connect_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/stars_add_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/stars_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/stars_remove_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/team_access_logs_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/team_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/team_integration_logs_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/team_profile_get_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_create_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_disable_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_enable_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_update_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_users_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/usergroups_users_update_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_conversations_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_counts_error_schema_exception.rb +50 -0
- data/lib/slack_web_api/exceptions/users_delete_photo_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_identity_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_info_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_list_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_lookup_by_email_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_profile_get_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_profile_set_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_set_active_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/exceptions/users_set_photo_error_schema_exception.rb +73 -0
- data/lib/slack_web_api/exceptions/users_set_presence_error_schema_exception.rb +56 -0
- data/lib/slack_web_api/http/api_response.rb +19 -0
- data/lib/slack_web_api/http/auth/oauth_2.rb +162 -0
- data/lib/slack_web_api/http/http_call_back.rb +10 -0
- data/lib/slack_web_api/http/http_method_enum.rb +10 -0
- data/lib/slack_web_api/http/http_request.rb +10 -0
- data/lib/slack_web_api/http/http_response.rb +10 -0
- data/lib/slack_web_api/http/proxy_settings.rb +22 -0
- data/lib/slack_web_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/slack_web_api/logging/sdk_logger.rb +17 -0
- data/lib/slack_web_api/models/admin_conversations_archive_schema.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_convert_to_private_schema.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_create_schema.rb +82 -0
- data/lib/slack_web_api/models/admin_conversations_delete_schema.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_get_conversation_prefs_schema.rb +82 -0
- data/lib/slack_web_api/models/admin_conversations_get_teams_schema.rb +92 -0
- data/lib/slack_web_api/models/admin_conversations_invite_schema.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_rename_schema.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_rename_schema1.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_search_schema.rb +91 -0
- data/lib/slack_web_api/models/admin_conversations_set_conversation_prefs_schema.rb +71 -0
- data/lib/slack_web_api/models/admin_conversations_unarchive_schema.rb +71 -0
- data/lib/slack_web_api/models/api_method_users_get_presence.rb +133 -0
- data/lib/slack_web_api/models/api_permissions_scopes_list_success_schema.rb +80 -0
- data/lib/slack_web_api/models/api_test_success_schema.rb +71 -0
- data/lib/slack_web_api/models/app_home.rb +86 -0
- data/lib/slack_web_api/models/apps_permissions_info_schema.rb +80 -0
- data/lib/slack_web_api/models/apps_permissions_request_schema.rb +71 -0
- data/lib/slack_web_api/models/apps_permissions_resources_list_success_schema.rb +101 -0
- data/lib/slack_web_api/models/apps_uninstall_schema.rb +71 -0
- data/lib/slack_web_api/models/attachment.rb +125 -0
- data/lib/slack_web_api/models/auth_revoke_schema.rb +80 -0
- data/lib/slack_web_api/models/auth_test_success_schema.rb +136 -0
- data/lib/slack_web_api/models/base_model.rb +110 -0
- data/lib/slack_web_api/models/block_kit_block.rb +72 -0
- data/lib/slack_web_api/models/bot.rb +128 -0
- data/lib/slack_web_api/models/bot_profile_object.rb +126 -0
- data/lib/slack_web_api/models/bots_info_schema.rb +80 -0
- data/lib/slack_web_api/models/can_thread.rb +85 -0
- data/lib/slack_web_api/models/channel.rb +86 -0
- data/lib/slack_web_api/models/channel_object.rb +382 -0
- data/lib/slack_web_api/models/chat_delete_scheduled_message_schema.rb +71 -0
- data/lib/slack_web_api/models/chat_delete_success_schema.rb +88 -0
- data/lib/slack_web_api/models/chat_get_permalink_success_schema.rb +88 -0
- data/lib/slack_web_api/models/chat_me_message_schema.rb +91 -0
- data/lib/slack_web_api/models/chat_post_ephemeral_success_schema.rb +80 -0
- data/lib/slack_web_api/models/chat_post_message_success_schema.rb +96 -0
- data/lib/slack_web_api/models/chat_schedule_message_success_schema.rb +108 -0
- data/lib/slack_web_api/models/chat_scheduled_messages_list_schema.rb +100 -0
- data/lib/slack_web_api/models/chat_unfurl_success_schema.rb +71 -0
- data/lib/slack_web_api/models/chat_update_success_schema.rb +105 -0
- data/lib/slack_web_api/models/conversations_archive_success_schema.rb +71 -0
- data/lib/slack_web_api/models/conversations_close_success_schema.rb +93 -0
- data/lib/slack_web_api/models/conversations_create_success_schema.rb +80 -0
- data/lib/slack_web_api/models/conversations_history_success_schema.rb +127 -0
- data/lib/slack_web_api/models/conversations_info_success_schema.rb +80 -0
- data/lib/slack_web_api/models/conversations_invite_error_schema.rb +80 -0
- data/lib/slack_web_api/models/conversations_join_success_schema.rb +102 -0
- data/lib/slack_web_api/models/conversations_kick_success_schema.rb +71 -0
- data/lib/slack_web_api/models/conversations_leave_success_schema.rb +83 -0
- data/lib/slack_web_api/models/conversations_list_success_schema.rb +92 -0
- data/lib/slack_web_api/models/conversations_mark_success_schema.rb +71 -0
- data/lib/slack_web_api/models/conversations_members_success_schema.rb +89 -0
- data/lib/slack_web_api/models/conversations_open_success_schema.rb +102 -0
- data/lib/slack_web_api/models/conversations_rename_success_schema.rb +80 -0
- data/lib/slack_web_api/models/conversations_replies_success_schema.rb +90 -0
- data/lib/slack_web_api/models/conversations_set_purpose_success_schema.rb +80 -0
- data/lib/slack_web_api/models/conversations_set_topic_success_schema.rb +80 -0
- data/lib/slack_web_api/models/conversations_unarchive_success_schema.rb +71 -0
- data/lib/slack_web_api/models/current.rb +82 -0
- data/lib/slack_web_api/models/default_success_template.rb +72 -0
- data/lib/slack_web_api/models/dialog_open_schema.rb +71 -0
- data/lib/slack_web_api/models/dnd_end_dnd_schema.rb +71 -0
- data/lib/slack_web_api/models/dnd_end_snooze_schema.rb +111 -0
- data/lib/slack_web_api/models/dnd_info_schema.rb +136 -0
- data/lib/slack_web_api/models/dnd_set_snooze_schema.rb +102 -0
- data/lib/slack_web_api/models/error.rb +60 -0
- data/lib/slack_web_api/models/error1.rb +65 -0
- data/lib/slack_web_api/models/error10.rb +60 -0
- data/lib/slack_web_api/models/error11.rb +60 -0
- data/lib/slack_web_api/models/error12.rb +104 -0
- data/lib/slack_web_api/models/error13.rb +120 -0
- data/lib/slack_web_api/models/error14.rb +108 -0
- data/lib/slack_web_api/models/error16.rb +116 -0
- data/lib/slack_web_api/models/error17.rb +100 -0
- data/lib/slack_web_api/models/error18.rb +84 -0
- data/lib/slack_web_api/models/error19.rb +104 -0
- data/lib/slack_web_api/models/error2.rb +60 -0
- data/lib/slack_web_api/models/error20.rb +112 -0
- data/lib/slack_web_api/models/error21.rb +120 -0
- data/lib/slack_web_api/models/error22.rb +108 -0
- data/lib/slack_web_api/models/error23.rb +124 -0
- data/lib/slack_web_api/models/error24.rb +128 -0
- data/lib/slack_web_api/models/error25.rb +92 -0
- data/lib/slack_web_api/models/error26.rb +166 -0
- data/lib/slack_web_api/models/error27.rb +112 -0
- data/lib/slack_web_api/models/error28.rb +120 -0
- data/lib/slack_web_api/models/error29.rb +128 -0
- data/lib/slack_web_api/models/error3.rb +60 -0
- data/lib/slack_web_api/models/error30.rb +133 -0
- data/lib/slack_web_api/models/error31.rb +101 -0
- data/lib/slack_web_api/models/error32.rb +133 -0
- data/lib/slack_web_api/models/error33.rb +96 -0
- data/lib/slack_web_api/models/error34.rb +92 -0
- data/lib/slack_web_api/models/error35.rb +153 -0
- data/lib/slack_web_api/models/error37.rb +121 -0
- data/lib/slack_web_api/models/error38.rb +121 -0
- data/lib/slack_web_api/models/error39.rb +129 -0
- data/lib/slack_web_api/models/error4.rb +80 -0
- data/lib/slack_web_api/models/error40.rb +84 -0
- data/lib/slack_web_api/models/error41.rb +105 -0
- data/lib/slack_web_api/models/error42.rb +100 -0
- data/lib/slack_web_api/models/error43.rb +121 -0
- data/lib/slack_web_api/models/error44.rb +129 -0
- data/lib/slack_web_api/models/error45.rb +96 -0
- data/lib/slack_web_api/models/error46.rb +113 -0
- data/lib/slack_web_api/models/error48.rb +121 -0
- data/lib/slack_web_api/models/error49.rb +136 -0
- data/lib/slack_web_api/models/error5.rb +60 -0
- data/lib/slack_web_api/models/error50.rb +108 -0
- data/lib/slack_web_api/models/error51.rb +112 -0
- data/lib/slack_web_api/models/error52.rb +104 -0
- data/lib/slack_web_api/models/error53.rb +116 -0
- data/lib/slack_web_api/models/error54.rb +92 -0
- data/lib/slack_web_api/models/error55.rb +100 -0
- data/lib/slack_web_api/models/error56.rb +100 -0
- data/lib/slack_web_api/models/error57.rb +100 -0
- data/lib/slack_web_api/models/error58.rb +112 -0
- data/lib/slack_web_api/models/error59.rb +116 -0
- data/lib/slack_web_api/models/error6.rb +60 -0
- data/lib/slack_web_api/models/error60.rb +108 -0
- data/lib/slack_web_api/models/error61.rb +108 -0
- data/lib/slack_web_api/models/error62.rb +120 -0
- data/lib/slack_web_api/models/error63.rb +92 -0
- data/lib/slack_web_api/models/error64.rb +116 -0
- data/lib/slack_web_api/models/error65.rb +116 -0
- data/lib/slack_web_api/models/error66.rb +104 -0
- data/lib/slack_web_api/models/error67.rb +96 -0
- data/lib/slack_web_api/models/error68.rb +120 -0
- data/lib/slack_web_api/models/error69.rb +128 -0
- data/lib/slack_web_api/models/error7.rb +56 -0
- data/lib/slack_web_api/models/error70.rb +116 -0
- data/lib/slack_web_api/models/error71.rb +108 -0
- data/lib/slack_web_api/models/error74.rb +96 -0
- data/lib/slack_web_api/models/error75.rb +128 -0
- data/lib/slack_web_api/models/error77.rb +128 -0
- data/lib/slack_web_api/models/error78.rb +112 -0
- data/lib/slack_web_api/models/error8.rb +56 -0
- data/lib/slack_web_api/models/error81.rb +92 -0
- data/lib/slack_web_api/models/error82.rb +112 -0
- data/lib/slack_web_api/models/error84.rb +116 -0
- data/lib/slack_web_api/models/error86.rb +120 -0
- data/lib/slack_web_api/models/error89.rb +117 -0
- data/lib/slack_web_api/models/error9.rb +68 -0
- data/lib/slack_web_api/models/error92.rb +92 -0
- data/lib/slack_web_api/models/error93.rb +100 -0
- data/lib/slack_web_api/models/error94.rb +100 -0
- data/lib/slack_web_api/models/error95.rb +108 -0
- data/lib/slack_web_api/models/error96.rb +128 -0
- data/lib/slack_web_api/models/error97.rb +100 -0
- data/lib/slack_web_api/models/error98.rb +120 -0
- data/lib/slack_web_api/models/error99.rb +104 -0
- data/lib/slack_web_api/models/errors_is_returned_when_an_error_associates_an_user.rb +90 -0
- data/lib/slack_web_api/models/external_org_migrations.rb +91 -0
- data/lib/slack_web_api/models/file_comment_object.rb +176 -0
- data/lib/slack_web_api/models/file_object.rb +790 -0
- data/lib/slack_web_api/models/files_comments_delete_schema.rb +71 -0
- data/lib/slack_web_api/models/files_delete_schema.rb +71 -0
- data/lib/slack_web_api/models/files_info_schema.rb +133 -0
- data/lib/slack_web_api/models/files_list_schema.rb +97 -0
- data/lib/slack_web_api/models/files_revoke_public_url_schema.rb +80 -0
- data/lib/slack_web_api/models/files_shared_public_url_schema.rb +80 -0
- data/lib/slack_web_api/models/files_upload_schema.rb +80 -0
- data/lib/slack_web_api/models/group.rb +86 -0
- data/lib/slack_web_api/models/icons.rb +90 -0
- data/lib/slack_web_api/models/icons1.rb +85 -0
- data/lib/slack_web_api/models/im.rb +86 -0
- data/lib/slack_web_api/models/info.rb +116 -0
- data/lib/slack_web_api/models/log.rb +168 -0
- data/lib/slack_web_api/models/login.rb +158 -0
- data/lib/slack_web_api/models/message.rb +128 -0
- data/lib/slack_web_api/models/message_object.rb +552 -0
- data/lib/slack_web_api/models/message_object1.rb +94 -0
- data/lib/slack_web_api/models/migration_exchange_success_schema.rb +111 -0
- data/lib/slack_web_api/models/mpim.rb +86 -0
- data/lib/slack_web_api/models/mself.rb +82 -0
- data/lib/slack_web_api/models/oauth_provider_error.rb +62 -0
- data/lib/slack_web_api/models/oauth_scope.rb +296 -0
- data/lib/slack_web_api/models/oauth_token.rb +96 -0
- data/lib/slack_web_api/models/objs_enterprise_user.rb +119 -0
- data/lib/slack_web_api/models/objs_icon.rb +147 -0
- data/lib/slack_web_api/models/objs_primary_owner.rb +82 -0
- data/lib/slack_web_api/models/objs_reminder.rb +129 -0
- data/lib/slack_web_api/models/objs_team_profile_field.rb +154 -0
- data/lib/slack_web_api/models/objs_team_profile_field_option.rb +112 -0
- data/lib/slack_web_api/models/objs_user_profile_short.rb +174 -0
- data/lib/slack_web_api/models/paging_object.rb +121 -0
- data/lib/slack_web_api/models/pins_add_schema.rb +71 -0
- data/lib/slack_web_api/models/pins_remove_schema.rb +71 -0
- data/lib/slack_web_api/models/plan.rb +44 -0
- data/lib/slack_web_api/models/prefs.rb +82 -0
- data/lib/slack_web_api/models/prefs1.rb +86 -0
- data/lib/slack_web_api/models/profile.rb +82 -0
- data/lib/slack_web_api/models/profile1.rb +146 -0
- data/lib/slack_web_api/models/purpose.rb +90 -0
- data/lib/slack_web_api/models/reaction_object.rb +90 -0
- data/lib/slack_web_api/models/reactions_add_schema.rb +71 -0
- data/lib/slack_web_api/models/reactions_list_schema.rb +102 -0
- data/lib/slack_web_api/models/reactions_remove_schema.rb +71 -0
- data/lib/slack_web_api/models/reminders_add_schema.rb +80 -0
- data/lib/slack_web_api/models/reminders_complete_schema.rb +71 -0
- data/lib/slack_web_api/models/reminders_delete_schema.rb +71 -0
- data/lib/slack_web_api/models/reminders_info_schema.rb +80 -0
- data/lib/slack_web_api/models/reminders_list_schema.rb +89 -0
- data/lib/slack_web_api/models/resource.rb +85 -0
- data/lib/slack_web_api/models/resources_in_info_from_apps_permissions_info.rb +94 -0
- data/lib/slack_web_api/models/response_metadata.rb +74 -0
- data/lib/slack_web_api/models/response_metadata3.rb +75 -0
- data/lib/slack_web_api/models/rtm_connect_schema.rb +96 -0
- data/lib/slack_web_api/models/scheduled_message.rb +110 -0
- data/lib/slack_web_api/models/scopes.rb +134 -0
- data/lib/slack_web_api/models/shares.rb +85 -0
- data/lib/slack_web_api/models/sso_provider.rb +95 -0
- data/lib/slack_web_api/models/stars_add_schema.rb +71 -0
- data/lib/slack_web_api/models/stars_list_schema.rb +90 -0
- data/lib/slack_web_api/models/stars_remove_schema.rb +71 -0
- data/lib/slack_web_api/models/subteam_usergroup_object.rb +260 -0
- data/lib/slack_web_api/models/team.rb +83 -0
- data/lib/slack_web_api/models/team1.rb +90 -0
- data/lib/slack_web_api/models/team_access_logs_schema.rb +97 -0
- data/lib/slack_web_api/models/team_info_schema.rb +80 -0
- data/lib/slack_web_api/models/team_integration_logs_schema.rb +97 -0
- data/lib/slack_web_api/models/team_object.rb +368 -0
- data/lib/slack_web_api/models/team_profile_get_success_schema.rb +80 -0
- data/lib/slack_web_api/models/topic.rb +90 -0
- data/lib/slack_web_api/models/type.rb +52 -0
- data/lib/slack_web_api/models/user_profile_object.rb +542 -0
- data/lib/slack_web_api/models/usergroups_create_schema.rb +80 -0
- data/lib/slack_web_api/models/usergroups_disable_schema.rb +80 -0
- data/lib/slack_web_api/models/usergroups_enable_schema.rb +80 -0
- data/lib/slack_web_api/models/usergroups_list_schema.rb +89 -0
- data/lib/slack_web_api/models/usergroups_update_schema.rb +80 -0
- data/lib/slack_web_api/models/usergroups_users_list_schema.rb +80 -0
- data/lib/slack_web_api/models/usergroups_users_update_schema.rb +80 -0
- data/lib/slack_web_api/models/users_conversations_success_schema.rb +93 -0
- data/lib/slack_web_api/models/users_delete_photo_schema.rb +71 -0
- data/lib/slack_web_api/models/users_info_success_schema.rb +80 -0
- data/lib/slack_web_api/models/users_list_schema.rb +102 -0
- data/lib/slack_web_api/models/users_lookup_by_email_success_schema.rb +80 -0
- data/lib/slack_web_api/models/users_profile_get_schema.rb +80 -0
- data/lib/slack_web_api/models/users_profile_set_schema.rb +100 -0
- data/lib/slack_web_api/models/users_set_active_schema.rb +71 -0
- data/lib/slack_web_api/models/users_set_photo_schema.rb +80 -0
- data/lib/slack_web_api/models/users_set_presence_schema.rb +71 -0
- data/lib/slack_web_api/models/who_can_post.rb +85 -0
- data/lib/slack_web_api/utilities/date_time_helper.rb +11 -0
- data/lib/slack_web_api/utilities/file_wrapper.rb +28 -0
- data/lib/slack_web_api.rb +532 -0
- metadata +509 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
# slack_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SlackWebApi
|
|
7
|
+
# ChatController
|
|
8
|
+
class ChatController < BaseController
|
|
9
|
+
# Deletes a message.
|
|
10
|
+
# @param [String] token Optional parameter: Authentication token. Requires
|
|
11
|
+
# scope: `chat:write`
|
|
12
|
+
# @param [Float] ts Optional parameter: Timestamp of the message to be
|
|
13
|
+
# deleted.
|
|
14
|
+
# @param [String] channel Optional parameter: Channel containing the message
|
|
15
|
+
# to be deleted.
|
|
16
|
+
# @param [TrueClass | FalseClass] as_user Optional parameter: Pass true to
|
|
17
|
+
# delete the message as the authed user with `chat:write:user` scope. [Bot
|
|
18
|
+
# users](/bot-users) in this context are considered authed users. If unused
|
|
19
|
+
# or false, the message will be deleted with `chat:write:bot` scope.
|
|
20
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
21
|
+
def chat_delete(token: nil,
|
|
22
|
+
ts: nil,
|
|
23
|
+
channel: nil,
|
|
24
|
+
as_user: nil)
|
|
25
|
+
@api_call
|
|
26
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
27
|
+
'/chat.delete',
|
|
28
|
+
Server::DEFAULT)
|
|
29
|
+
.header_param(new_parameter(token, key: 'token'))
|
|
30
|
+
.form_param(new_parameter(ts, key: 'ts'))
|
|
31
|
+
.form_param(new_parameter(channel, key: 'channel'))
|
|
32
|
+
.form_param(new_parameter(as_user, key: 'as_user'))
|
|
33
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
34
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
35
|
+
.auth(Single.new('slackAuth')))
|
|
36
|
+
.response(new_response_handler
|
|
37
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
38
|
+
.deserialize_into(ChatDeleteSuccessSchema.method(:from_hash))
|
|
39
|
+
.is_api_response(true)
|
|
40
|
+
.local_error('default',
|
|
41
|
+
'Typical error response',
|
|
42
|
+
ChatDeleteErrorSchemaException))
|
|
43
|
+
.execute
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Deletes a pending scheduled message from the queue.
|
|
47
|
+
# @param [String] token Required parameter: Authentication token. Requires
|
|
48
|
+
# scope: `chat:write`
|
|
49
|
+
# @param [String] channel Required parameter: The channel the
|
|
50
|
+
# scheduled_message is posting to
|
|
51
|
+
# @param [String] scheduled_message_id Required parameter:
|
|
52
|
+
# `scheduled_message_id` returned from call to chat.scheduleMessage
|
|
53
|
+
# @param [TrueClass | FalseClass] as_user Optional parameter: Pass true to
|
|
54
|
+
# delete the message as the authed user with `chat:write:user` scope. [Bot
|
|
55
|
+
# users](/bot-users) in this context are considered authed users. If unused
|
|
56
|
+
# or false, the message will be deleted with `chat:write:bot` scope.
|
|
57
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
58
|
+
def chat_delete_scheduled_message(token,
|
|
59
|
+
channel,
|
|
60
|
+
scheduled_message_id,
|
|
61
|
+
as_user: nil)
|
|
62
|
+
@api_call
|
|
63
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
64
|
+
'/chat.deleteScheduledMessage',
|
|
65
|
+
Server::DEFAULT)
|
|
66
|
+
.header_param(new_parameter(token, key: 'token')
|
|
67
|
+
.is_required(true))
|
|
68
|
+
.form_param(new_parameter(channel, key: 'channel')
|
|
69
|
+
.is_required(true))
|
|
70
|
+
.form_param(new_parameter(scheduled_message_id, key: 'scheduled_message_id')
|
|
71
|
+
.is_required(true))
|
|
72
|
+
.form_param(new_parameter(as_user, key: 'as_user'))
|
|
73
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
74
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
75
|
+
.auth(Single.new('slackAuth')))
|
|
76
|
+
.response(new_response_handler
|
|
77
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
78
|
+
.deserialize_into(ChatDeleteScheduledMessageSchema.method(:from_hash))
|
|
79
|
+
.is_api_response(true)
|
|
80
|
+
.local_error('default',
|
|
81
|
+
'Typical error response if no message is found',
|
|
82
|
+
ChatDeleteScheduledMessageErrorSchemaException))
|
|
83
|
+
.execute
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Retrieve a permalink URL for a specific extant message
|
|
87
|
+
# @param [String] token Required parameter: Authentication token. Requires
|
|
88
|
+
# scope: `none`
|
|
89
|
+
# @param [String] channel Required parameter: The ID of the conversation or
|
|
90
|
+
# channel containing the message
|
|
91
|
+
# @param [String] message_ts Required parameter: A message's `ts` value,
|
|
92
|
+
# uniquely identifying it within a channel
|
|
93
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
94
|
+
def chat_get_permalink(token,
|
|
95
|
+
channel,
|
|
96
|
+
message_ts)
|
|
97
|
+
@api_call
|
|
98
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
99
|
+
'/chat.getPermalink',
|
|
100
|
+
Server::DEFAULT)
|
|
101
|
+
.query_param(new_parameter(token, key: 'token')
|
|
102
|
+
.is_required(true))
|
|
103
|
+
.query_param(new_parameter(channel, key: 'channel')
|
|
104
|
+
.is_required(true))
|
|
105
|
+
.query_param(new_parameter(message_ts, key: 'message_ts')
|
|
106
|
+
.is_required(true))
|
|
107
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'Content-Type'))
|
|
108
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
109
|
+
.auth(Single.new('slackAuth')))
|
|
110
|
+
.response(new_response_handler
|
|
111
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
112
|
+
.deserialize_into(ChatGetPermalinkSuccessSchema.method(:from_hash))
|
|
113
|
+
.is_api_response(true)
|
|
114
|
+
.local_error('default',
|
|
115
|
+
'Error response when channel cannot be found',
|
|
116
|
+
ChatGetPermalinkErrorSchemaException))
|
|
117
|
+
.execute
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Share a me message into a channel.
|
|
121
|
+
# @param [String] token Optional parameter: Authentication token. Requires
|
|
122
|
+
# scope: `chat:write`
|
|
123
|
+
# @param [String] channel Optional parameter: Channel to send message to.
|
|
124
|
+
# Can be a public channel, private group or IM channel. Can be an encoded
|
|
125
|
+
# ID, or a name.
|
|
126
|
+
# @param [String] text Optional parameter: Text of the message to send.
|
|
127
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
128
|
+
def chat_me_message(token: nil,
|
|
129
|
+
channel: nil,
|
|
130
|
+
text: nil)
|
|
131
|
+
@api_call
|
|
132
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
133
|
+
'/chat.meMessage',
|
|
134
|
+
Server::DEFAULT)
|
|
135
|
+
.header_param(new_parameter(token, key: 'token'))
|
|
136
|
+
.form_param(new_parameter(channel, key: 'channel'))
|
|
137
|
+
.form_param(new_parameter(text, key: 'text'))
|
|
138
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
139
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
140
|
+
.auth(Single.new('slackAuth')))
|
|
141
|
+
.response(new_response_handler
|
|
142
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
143
|
+
.deserialize_into(ChatMeMessageSchema.method(:from_hash))
|
|
144
|
+
.is_api_response(true)
|
|
145
|
+
.local_error('default',
|
|
146
|
+
'Typical error response',
|
|
147
|
+
ChatMeMessageErrorSchemaException))
|
|
148
|
+
.execute
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Sends an ephemeral message to a user in a channel.
|
|
152
|
+
# @param [String] token Required parameter: Authentication token. Requires
|
|
153
|
+
# scope: `chat:write`
|
|
154
|
+
# @param [String] channel Required parameter: Channel, private group, or IM
|
|
155
|
+
# channel to send message to. Can be an encoded ID, or a name.
|
|
156
|
+
# @param [String] user Required parameter: `id` of the user who will receive
|
|
157
|
+
# the ephemeral message. The user should be in the channel specified by the
|
|
158
|
+
# `channel` argument.
|
|
159
|
+
# @param [TrueClass | FalseClass] as_user Optional parameter: Pass true to
|
|
160
|
+
# post the message as the authed user. Defaults to true if the
|
|
161
|
+
# chat:write:bot scope is not included. Otherwise, defaults to false.
|
|
162
|
+
# @param [String] attachments Optional parameter: A JSON-based array of
|
|
163
|
+
# structured attachments, presented as a URL-encoded string.
|
|
164
|
+
# @param [String] blocks Optional parameter: A JSON-based array of
|
|
165
|
+
# structured blocks, presented as a URL-encoded string.
|
|
166
|
+
# @param [String] icon_emoji Optional parameter: Emoji to use as the icon
|
|
167
|
+
# for this message. Overrides `icon_url`. Must be used in conjunction with
|
|
168
|
+
# `as_user` set to `false`, otherwise ignored. See [authorship](#authorship)
|
|
169
|
+
# below.
|
|
170
|
+
# @param [String] icon_url Optional parameter: URL to an image to use as the
|
|
171
|
+
# icon for this message. Must be used in conjunction with `as_user` set to
|
|
172
|
+
# false, otherwise ignored. See [authorship](#authorship) below.
|
|
173
|
+
# @param [TrueClass | FalseClass] link_names Optional parameter: Find and
|
|
174
|
+
# link channel names and usernames.
|
|
175
|
+
# @param [String] parse Optional parameter: Change how messages are treated.
|
|
176
|
+
# Defaults to `none`. See [below](#formatting).
|
|
177
|
+
# @param [String] text Optional parameter: How this field works and whether
|
|
178
|
+
# it is required depends on other fields you use in your API call. [See
|
|
179
|
+
# below](#text_usage) for more detail.
|
|
180
|
+
# @param [String] thread_ts Optional parameter: Provide another message's
|
|
181
|
+
# `ts` value to post this message in a thread. Avoid using a reply's `ts`
|
|
182
|
+
# value; use its parent's value instead. Ephemeral messages in threads are
|
|
183
|
+
# only shown if there is already an active thread.
|
|
184
|
+
# @param [String] username Optional parameter: Set your bot's user name.
|
|
185
|
+
# Must be used in conjunction with `as_user` set to false, otherwise
|
|
186
|
+
# ignored. See [authorship](#authorship) below.
|
|
187
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
188
|
+
def chat_post_ephemeral(token,
|
|
189
|
+
channel,
|
|
190
|
+
user,
|
|
191
|
+
as_user: nil,
|
|
192
|
+
attachments: nil,
|
|
193
|
+
blocks: nil,
|
|
194
|
+
icon_emoji: nil,
|
|
195
|
+
icon_url: nil,
|
|
196
|
+
link_names: nil,
|
|
197
|
+
parse: nil,
|
|
198
|
+
text: nil,
|
|
199
|
+
thread_ts: nil,
|
|
200
|
+
username: nil)
|
|
201
|
+
@api_call
|
|
202
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
203
|
+
'/chat.postEphemeral',
|
|
204
|
+
Server::DEFAULT)
|
|
205
|
+
.header_param(new_parameter(token, key: 'token')
|
|
206
|
+
.is_required(true))
|
|
207
|
+
.form_param(new_parameter(channel, key: 'channel')
|
|
208
|
+
.is_required(true))
|
|
209
|
+
.form_param(new_parameter(user, key: 'user')
|
|
210
|
+
.is_required(true))
|
|
211
|
+
.form_param(new_parameter(as_user, key: 'as_user'))
|
|
212
|
+
.form_param(new_parameter(attachments, key: 'attachments'))
|
|
213
|
+
.form_param(new_parameter(blocks, key: 'blocks'))
|
|
214
|
+
.form_param(new_parameter(icon_emoji, key: 'icon_emoji'))
|
|
215
|
+
.form_param(new_parameter(icon_url, key: 'icon_url'))
|
|
216
|
+
.form_param(new_parameter(link_names, key: 'link_names'))
|
|
217
|
+
.form_param(new_parameter(parse, key: 'parse'))
|
|
218
|
+
.form_param(new_parameter(text, key: 'text'))
|
|
219
|
+
.form_param(new_parameter(thread_ts, key: 'thread_ts'))
|
|
220
|
+
.form_param(new_parameter(username, key: 'username'))
|
|
221
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
222
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
223
|
+
.auth(Single.new('slackAuth')))
|
|
224
|
+
.response(new_response_handler
|
|
225
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
226
|
+
.deserialize_into(ChatPostEphemeralSuccessSchema.method(:from_hash))
|
|
227
|
+
.is_api_response(true)
|
|
228
|
+
.local_error('default',
|
|
229
|
+
'Typical error response',
|
|
230
|
+
ChatPostEphemeralErrorSchemaException))
|
|
231
|
+
.execute
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Sends a message to a channel.
|
|
235
|
+
# @param [String] token Required parameter: Authentication token. Requires
|
|
236
|
+
# scope: `chat:write`
|
|
237
|
+
# @param [String] channel Required parameter: Channel, private group, or IM
|
|
238
|
+
# channel to send message to. Can be an encoded ID, or a name. See
|
|
239
|
+
# [below](#channels) for more details.
|
|
240
|
+
# @param [String] as_user Optional parameter: Pass true to post the message
|
|
241
|
+
# as the authed user, instead of as a bot. Defaults to false. See
|
|
242
|
+
# [authorship](#authorship) below.
|
|
243
|
+
# @param [String] attachments Optional parameter: A JSON-based array of
|
|
244
|
+
# structured attachments, presented as a URL-encoded string.
|
|
245
|
+
# @param [String] blocks Optional parameter: A JSON-based array of
|
|
246
|
+
# structured blocks, presented as a URL-encoded string.
|
|
247
|
+
# @param [String] icon_emoji Optional parameter: Emoji to use as the icon
|
|
248
|
+
# for this message. Overrides `icon_url`. Must be used in conjunction with
|
|
249
|
+
# `as_user` set to `false`, otherwise ignored. See [authorship](#authorship)
|
|
250
|
+
# below.
|
|
251
|
+
# @param [String] icon_url Optional parameter: URL to an image to use as the
|
|
252
|
+
# icon for this message. Must be used in conjunction with `as_user` set to
|
|
253
|
+
# false, otherwise ignored. See [authorship](#authorship) below.
|
|
254
|
+
# @param [TrueClass | FalseClass] link_names Optional parameter: Find and
|
|
255
|
+
# link channel names and usernames.
|
|
256
|
+
# @param [TrueClass | FalseClass] mrkdwn Optional parameter: Disable Slack
|
|
257
|
+
# markup parsing by setting to `false`. Enabled by default.
|
|
258
|
+
# @param [String] parse Optional parameter: Change how messages are treated.
|
|
259
|
+
# Defaults to `none`. See [below](#formatting).
|
|
260
|
+
# @param [TrueClass | FalseClass] reply_broadcast Optional parameter: Used
|
|
261
|
+
# in conjunction with `thread_ts` and indicates whether reply should be made
|
|
262
|
+
# visible to everyone in the channel or conversation. Defaults to `false`.
|
|
263
|
+
# @param [String] text Optional parameter: How this field works and whether
|
|
264
|
+
# it is required depends on other fields you use in your API call. [See
|
|
265
|
+
# below](#text_usage) for more detail.
|
|
266
|
+
# @param [String] thread_ts Optional parameter: Provide another message's
|
|
267
|
+
# `ts` value to make this message a reply. Avoid using a reply's `ts` value;
|
|
268
|
+
# use its parent instead.
|
|
269
|
+
# @param [TrueClass | FalseClass] unfurl_links Optional parameter: Pass true
|
|
270
|
+
# to enable unfurling of primarily text-based content.
|
|
271
|
+
# @param [TrueClass | FalseClass] unfurl_media Optional parameter: Pass
|
|
272
|
+
# false to disable unfurling of media content.
|
|
273
|
+
# @param [String] username Optional parameter: Set your bot's user name.
|
|
274
|
+
# Must be used in conjunction with `as_user` set to false, otherwise
|
|
275
|
+
# ignored. See [authorship](#authorship) below.
|
|
276
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
277
|
+
def chat_post_message(token,
|
|
278
|
+
channel,
|
|
279
|
+
as_user: nil,
|
|
280
|
+
attachments: nil,
|
|
281
|
+
blocks: nil,
|
|
282
|
+
icon_emoji: nil,
|
|
283
|
+
icon_url: nil,
|
|
284
|
+
link_names: nil,
|
|
285
|
+
mrkdwn: nil,
|
|
286
|
+
parse: nil,
|
|
287
|
+
reply_broadcast: nil,
|
|
288
|
+
text: nil,
|
|
289
|
+
thread_ts: nil,
|
|
290
|
+
unfurl_links: nil,
|
|
291
|
+
unfurl_media: nil,
|
|
292
|
+
username: nil)
|
|
293
|
+
@api_call
|
|
294
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
295
|
+
'/chat.postMessage',
|
|
296
|
+
Server::DEFAULT)
|
|
297
|
+
.header_param(new_parameter(token, key: 'token')
|
|
298
|
+
.is_required(true))
|
|
299
|
+
.form_param(new_parameter(channel, key: 'channel')
|
|
300
|
+
.is_required(true))
|
|
301
|
+
.form_param(new_parameter(as_user, key: 'as_user'))
|
|
302
|
+
.form_param(new_parameter(attachments, key: 'attachments'))
|
|
303
|
+
.form_param(new_parameter(blocks, key: 'blocks'))
|
|
304
|
+
.form_param(new_parameter(icon_emoji, key: 'icon_emoji'))
|
|
305
|
+
.form_param(new_parameter(icon_url, key: 'icon_url'))
|
|
306
|
+
.form_param(new_parameter(link_names, key: 'link_names'))
|
|
307
|
+
.form_param(new_parameter(mrkdwn, key: 'mrkdwn'))
|
|
308
|
+
.form_param(new_parameter(parse, key: 'parse'))
|
|
309
|
+
.form_param(new_parameter(reply_broadcast, key: 'reply_broadcast'))
|
|
310
|
+
.form_param(new_parameter(text, key: 'text'))
|
|
311
|
+
.form_param(new_parameter(thread_ts, key: 'thread_ts'))
|
|
312
|
+
.form_param(new_parameter(unfurl_links, key: 'unfurl_links'))
|
|
313
|
+
.form_param(new_parameter(unfurl_media, key: 'unfurl_media'))
|
|
314
|
+
.form_param(new_parameter(username, key: 'username'))
|
|
315
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
316
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
317
|
+
.auth(Single.new('slackAuth')))
|
|
318
|
+
.response(new_response_handler
|
|
319
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
320
|
+
.deserialize_into(ChatPostMessageSuccessSchema.method(:from_hash))
|
|
321
|
+
.is_api_response(true)
|
|
322
|
+
.local_error('default',
|
|
323
|
+
'Typical error response if too many attachments are included',
|
|
324
|
+
ChatPostMessageErrorSchemaException))
|
|
325
|
+
.execute
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Schedules a message to be sent to a channel.
|
|
329
|
+
# @param [String] token Optional parameter: Authentication token. Requires
|
|
330
|
+
# scope: `chat:write`
|
|
331
|
+
# @param [String] channel Optional parameter: Channel, private group, or DM
|
|
332
|
+
# channel to send message to. Can be an encoded ID, or a name. See
|
|
333
|
+
# [below](#channels) for more details.
|
|
334
|
+
# @param [String] text Optional parameter: How this field works and whether
|
|
335
|
+
# it is required depends on other fields you use in your API call. [See
|
|
336
|
+
# below](#text_usage) for more detail.
|
|
337
|
+
# @param [String] post_at Optional parameter: Unix EPOCH timestamp of time
|
|
338
|
+
# in future to send the message.
|
|
339
|
+
# @param [String] parse Optional parameter: Change how messages are treated.
|
|
340
|
+
# Defaults to `none`. See [chat.postMessage](chat.postMessage#formatting).
|
|
341
|
+
# @param [TrueClass | FalseClass] as_user Optional parameter: Pass true to
|
|
342
|
+
# post the message as the authed user, instead of as a bot. Defaults to
|
|
343
|
+
# false. See [chat.postMessage](chat.postMessage#authorship).
|
|
344
|
+
# @param [TrueClass | FalseClass] link_names Optional parameter: Find and
|
|
345
|
+
# link channel names and usernames.
|
|
346
|
+
# @param [String] attachments Optional parameter: A JSON-based array of
|
|
347
|
+
# structured attachments, presented as a URL-encoded string.
|
|
348
|
+
# @param [String] blocks Optional parameter: A JSON-based array of
|
|
349
|
+
# structured blocks, presented as a URL-encoded string.
|
|
350
|
+
# @param [TrueClass | FalseClass] unfurl_links Optional parameter: Pass true
|
|
351
|
+
# to enable unfurling of primarily text-based content.
|
|
352
|
+
# @param [TrueClass | FalseClass] unfurl_media Optional parameter: Pass
|
|
353
|
+
# false to disable unfurling of media content.
|
|
354
|
+
# @param [Float] thread_ts Optional parameter: Provide another message's
|
|
355
|
+
# `ts` value to make this message a reply. Avoid using a reply's `ts` value;
|
|
356
|
+
# use its parent instead.
|
|
357
|
+
# @param [TrueClass | FalseClass] reply_broadcast Optional parameter: Used
|
|
358
|
+
# in conjunction with `thread_ts` and indicates whether reply should be made
|
|
359
|
+
# visible to everyone in the channel or conversation. Defaults to `false`.
|
|
360
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
361
|
+
def chat_schedule_message(token: nil,
|
|
362
|
+
channel: nil,
|
|
363
|
+
text: nil,
|
|
364
|
+
post_at: nil,
|
|
365
|
+
parse: nil,
|
|
366
|
+
as_user: nil,
|
|
367
|
+
link_names: nil,
|
|
368
|
+
attachments: nil,
|
|
369
|
+
blocks: nil,
|
|
370
|
+
unfurl_links: nil,
|
|
371
|
+
unfurl_media: nil,
|
|
372
|
+
thread_ts: nil,
|
|
373
|
+
reply_broadcast: nil)
|
|
374
|
+
@api_call
|
|
375
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
376
|
+
'/chat.scheduleMessage',
|
|
377
|
+
Server::DEFAULT)
|
|
378
|
+
.header_param(new_parameter(token, key: 'token'))
|
|
379
|
+
.form_param(new_parameter(channel, key: 'channel'))
|
|
380
|
+
.form_param(new_parameter(text, key: 'text'))
|
|
381
|
+
.form_param(new_parameter(post_at, key: 'post_at'))
|
|
382
|
+
.form_param(new_parameter(parse, key: 'parse'))
|
|
383
|
+
.form_param(new_parameter(as_user, key: 'as_user'))
|
|
384
|
+
.form_param(new_parameter(link_names, key: 'link_names'))
|
|
385
|
+
.form_param(new_parameter(attachments, key: 'attachments'))
|
|
386
|
+
.form_param(new_parameter(blocks, key: 'blocks'))
|
|
387
|
+
.form_param(new_parameter(unfurl_links, key: 'unfurl_links'))
|
|
388
|
+
.form_param(new_parameter(unfurl_media, key: 'unfurl_media'))
|
|
389
|
+
.form_param(new_parameter(thread_ts, key: 'thread_ts'))
|
|
390
|
+
.form_param(new_parameter(reply_broadcast, key: 'reply_broadcast'))
|
|
391
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
392
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
393
|
+
.auth(Single.new('slackAuth')))
|
|
394
|
+
.response(new_response_handler
|
|
395
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
396
|
+
.deserialize_into(ChatScheduleMessageSuccessSchema.method(:from_hash))
|
|
397
|
+
.is_api_response(true)
|
|
398
|
+
.local_error('default',
|
|
399
|
+
'Typical error response if the `post_at` is invalid (ex. in the'\
|
|
400
|
+
' past or too far into the future)',
|
|
401
|
+
ChatScheduleMessageErrorSchemaException))
|
|
402
|
+
.execute
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# Provide custom unfurl behavior for user-posted URLs
|
|
406
|
+
# @param [String] token Required parameter: Authentication token. Requires
|
|
407
|
+
# scope: `links:write`
|
|
408
|
+
# @param [String] channel Required parameter: Channel ID of the message
|
|
409
|
+
# @param [String] ts Required parameter: Timestamp of the message to add
|
|
410
|
+
# unfurl behavior to.
|
|
411
|
+
# @param [String] unfurls Optional parameter: URL-encoded JSON map with keys
|
|
412
|
+
# set to URLs featured in the the message, pointing to their unfurl blocks
|
|
413
|
+
# or message attachments.
|
|
414
|
+
# @param [String] user_auth_message Optional parameter: Provide a
|
|
415
|
+
# simply-formatted string to send as an ephemeral message to the user as
|
|
416
|
+
# invitation to authenticate further and enable full unfurling behavior
|
|
417
|
+
# @param [TrueClass | FalseClass] user_auth_required Optional parameter: Set
|
|
418
|
+
# to `true` or `1` to indicate the user must install your Slack app to
|
|
419
|
+
# trigger unfurls for this domain
|
|
420
|
+
# @param [String] user_auth_url Optional parameter: Send users to this
|
|
421
|
+
# custom URL where they will complete authentication in your app to fully
|
|
422
|
+
# trigger unfurling. Value should be properly URL-encoded.
|
|
423
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
424
|
+
def chat_unfurl(token,
|
|
425
|
+
channel,
|
|
426
|
+
ts,
|
|
427
|
+
unfurls: nil,
|
|
428
|
+
user_auth_message: nil,
|
|
429
|
+
user_auth_required: nil,
|
|
430
|
+
user_auth_url: nil)
|
|
431
|
+
@api_call
|
|
432
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
433
|
+
'/chat.unfurl',
|
|
434
|
+
Server::DEFAULT)
|
|
435
|
+
.header_param(new_parameter(token, key: 'token')
|
|
436
|
+
.is_required(true))
|
|
437
|
+
.form_param(new_parameter(channel, key: 'channel')
|
|
438
|
+
.is_required(true))
|
|
439
|
+
.form_param(new_parameter(ts, key: 'ts')
|
|
440
|
+
.is_required(true))
|
|
441
|
+
.form_param(new_parameter(unfurls, key: 'unfurls'))
|
|
442
|
+
.form_param(new_parameter(user_auth_message, key: 'user_auth_message'))
|
|
443
|
+
.form_param(new_parameter(user_auth_required, key: 'user_auth_required'))
|
|
444
|
+
.form_param(new_parameter(user_auth_url, key: 'user_auth_url'))
|
|
445
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
446
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
447
|
+
.auth(Single.new('slackAuth')))
|
|
448
|
+
.response(new_response_handler
|
|
449
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
450
|
+
.deserialize_into(ChatUnfurlSuccessSchema.method(:from_hash))
|
|
451
|
+
.is_api_response(true)
|
|
452
|
+
.local_error('default',
|
|
453
|
+
'Typical error response',
|
|
454
|
+
ChatUnfurlErrorSchemaException))
|
|
455
|
+
.execute
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
# Updates a message.
|
|
459
|
+
# @param [String] token Required parameter: Authentication token. Requires
|
|
460
|
+
# scope: `chat:write`
|
|
461
|
+
# @param [String] channel Required parameter: Channel containing the message
|
|
462
|
+
# to be updated.
|
|
463
|
+
# @param [String] ts Required parameter: Timestamp of the message to be
|
|
464
|
+
# updated.
|
|
465
|
+
# @param [String] as_user Optional parameter: Pass true to update the
|
|
466
|
+
# message as the authed user. [Bot users](/bot-users) in this context are
|
|
467
|
+
# considered authed users.
|
|
468
|
+
# @param [String] attachments Optional parameter: A JSON-based array of
|
|
469
|
+
# structured attachments, presented as a URL-encoded string. This field is
|
|
470
|
+
# required when not presenting `text`. If you don't include this field, the
|
|
471
|
+
# message's previous `attachments` will be retained. To remove previous
|
|
472
|
+
# `attachments`, include an empty array for this field.
|
|
473
|
+
# @param [String] blocks Optional parameter: A JSON-based array of
|
|
474
|
+
# [structured blocks](/block-kit/building), presented as a URL-encoded
|
|
475
|
+
# string. If you don't include this field, the message's previous `blocks`
|
|
476
|
+
# will be retained. To remove previous `blocks`, include an empty array for
|
|
477
|
+
# this field.
|
|
478
|
+
# @param [String] link_names Optional parameter: Find and link channel names
|
|
479
|
+
# and usernames. Defaults to `none`. If you do not specify a value for this
|
|
480
|
+
# field, the original value set for the message will be overwritten with the
|
|
481
|
+
# default, `none`.
|
|
482
|
+
# @param [String] parse Optional parameter: Change how messages are treated.
|
|
483
|
+
# Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or
|
|
484
|
+
# `full`. If you do not specify a value for this field, the original value
|
|
485
|
+
# set for the message will be overwritten with the default, `client`.
|
|
486
|
+
# @param [String] text Optional parameter: New text for the message, using
|
|
487
|
+
# the [default formatting rules](/reference/surfaces/formatting). It's not
|
|
488
|
+
# required when presenting `blocks` or `attachments`.
|
|
489
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
490
|
+
def chat_update(token,
|
|
491
|
+
channel,
|
|
492
|
+
ts,
|
|
493
|
+
as_user: nil,
|
|
494
|
+
attachments: nil,
|
|
495
|
+
blocks: nil,
|
|
496
|
+
link_names: nil,
|
|
497
|
+
parse: nil,
|
|
498
|
+
text: nil)
|
|
499
|
+
@api_call
|
|
500
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
501
|
+
'/chat.update',
|
|
502
|
+
Server::DEFAULT)
|
|
503
|
+
.header_param(new_parameter(token, key: 'token')
|
|
504
|
+
.is_required(true))
|
|
505
|
+
.form_param(new_parameter(channel, key: 'channel')
|
|
506
|
+
.is_required(true))
|
|
507
|
+
.form_param(new_parameter(ts, key: 'ts')
|
|
508
|
+
.is_required(true))
|
|
509
|
+
.form_param(new_parameter(as_user, key: 'as_user'))
|
|
510
|
+
.form_param(new_parameter(attachments, key: 'attachments'))
|
|
511
|
+
.form_param(new_parameter(blocks, key: 'blocks'))
|
|
512
|
+
.form_param(new_parameter(link_names, key: 'link_names'))
|
|
513
|
+
.form_param(new_parameter(parse, key: 'parse'))
|
|
514
|
+
.form_param(new_parameter(text, key: 'text'))
|
|
515
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type'))
|
|
516
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
517
|
+
.auth(Single.new('slackAuth')))
|
|
518
|
+
.response(new_response_handler
|
|
519
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
520
|
+
.deserialize_into(ChatUpdateSuccessSchema.method(:from_hash))
|
|
521
|
+
.is_api_response(true)
|
|
522
|
+
.local_error('default',
|
|
523
|
+
'Typical error response',
|
|
524
|
+
ChatUpdateErrorSchemaException))
|
|
525
|
+
.execute
|
|
526
|
+
end
|
|
527
|
+
end
|
|
528
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# slack_web_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SlackWebApi
|
|
7
|
+
# ChatScheduledMessagesController
|
|
8
|
+
class ChatScheduledMessagesController < BaseController
|
|
9
|
+
# Returns a list of scheduled messages.
|
|
10
|
+
# @param [String] token Optional parameter: Authentication token. Requires
|
|
11
|
+
# scope: `none`
|
|
12
|
+
# @param [String] channel Optional parameter: The channel of the scheduled
|
|
13
|
+
# messages
|
|
14
|
+
# @param [Float] latest Optional parameter: A UNIX timestamp of the latest
|
|
15
|
+
# value in the time range
|
|
16
|
+
# @param [Float] oldest Optional parameter: A UNIX timestamp of the oldest
|
|
17
|
+
# value in the time range
|
|
18
|
+
# @param [Integer] limit Optional parameter: Maximum number of original
|
|
19
|
+
# entries to return.
|
|
20
|
+
# @param [String] cursor Optional parameter: For pagination purposes, this
|
|
21
|
+
# is the `cursor` value returned from a previous call to
|
|
22
|
+
# `chat.scheduledmessages.list` indicating where you want to start this call
|
|
23
|
+
# from.
|
|
24
|
+
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
25
|
+
def chat_scheduled_messages_list(token: nil,
|
|
26
|
+
channel: nil,
|
|
27
|
+
latest: nil,
|
|
28
|
+
oldest: nil,
|
|
29
|
+
limit: nil,
|
|
30
|
+
cursor: nil)
|
|
31
|
+
@api_call
|
|
32
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
33
|
+
'/chat.scheduledMessages.list',
|
|
34
|
+
Server::DEFAULT)
|
|
35
|
+
.header_param(new_parameter('application/x-www-form-urlencoded', key: 'Content-Type'))
|
|
36
|
+
.header_param(new_parameter(token, key: 'token'))
|
|
37
|
+
.query_param(new_parameter(channel, key: 'channel'))
|
|
38
|
+
.query_param(new_parameter(latest, key: 'latest'))
|
|
39
|
+
.query_param(new_parameter(oldest, key: 'oldest'))
|
|
40
|
+
.query_param(new_parameter(limit, key: 'limit'))
|
|
41
|
+
.query_param(new_parameter(cursor, key: 'cursor'))
|
|
42
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
43
|
+
.auth(Single.new('slackAuth')))
|
|
44
|
+
.response(new_response_handler
|
|
45
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
46
|
+
.deserialize_into(ChatScheduledMessagesListSchema.method(:from_hash))
|
|
47
|
+
.is_api_response(true)
|
|
48
|
+
.local_error('default',
|
|
49
|
+
'Typical error response if the channel passed is invalid',
|
|
50
|
+
ChatScheduledMessagesListErrorSchemaException))
|
|
51
|
+
.execute
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|