slack-ruby-client 0.7.9 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/FUNDING.yml +1 -0
- data/.gitignore +2 -0
- data/.rubocop.yml +32 -1
- data/.rubocop_todo.yml +98 -49
- data/.travis.yml +10 -14
- data/CHANGELOG.md +172 -24
- data/CONTRIBUTING.md +17 -6
- data/Dangerfile +2 -0
- data/Gemfile +10 -4
- data/LICENSE.md +1 -1
- data/README.md +276 -54
- data/RELEASING.md +19 -11
- data/Rakefile +2 -1
- data/UPGRADING.md +84 -2
- data/bin/commands.rb +43 -1
- data/bin/commands/admin_analytics.rb +15 -0
- data/bin/commands/admin_apps.rb +40 -0
- data/bin/commands/admin_apps_approved.rb +17 -0
- data/bin/commands/admin_apps_requests.rb +16 -0
- data/bin/commands/admin_apps_restricted.rb +17 -0
- data/bin/commands/admin_barriers.rb +47 -0
- data/bin/commands/admin_conversations.rb +169 -0
- data/bin/commands/admin_conversations_ekm.rb +17 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +37 -0
- data/bin/commands/admin_conversations_whitelist.rb +37 -0
- data/bin/commands/admin_emoji.rb +54 -0
- data/bin/commands/admin_inviteRequests.rb +36 -0
- data/bin/commands/admin_inviteRequests_approved.rb +16 -0
- data/bin/commands/admin_inviteRequests_denied.rb +16 -0
- data/bin/commands/admin_teams.rb +27 -0
- data/bin/commands/admin_teams_admins.rb +16 -0
- data/bin/commands/admin_teams_owners.rb +16 -0
- data/bin/commands/admin_teams_settings.rb +64 -0
- data/bin/commands/admin_usergroups.rb +48 -0
- data/bin/commands/admin_users.rb +97 -0
- data/bin/commands/admin_users_session.rb +38 -0
- data/bin/commands/api.rb +3 -3
- data/bin/commands/apps.rb +15 -0
- data/bin/commands/apps_connections.rb +13 -0
- data/bin/commands/apps_event_authorizations.rb +16 -0
- data/bin/commands/apps_permissions.rb +23 -0
- data/bin/commands/apps_permissions_resources.rb +15 -0
- data/bin/commands/apps_permissions_scopes.rb +13 -0
- data/bin/commands/apps_permissions_users.rb +26 -0
- data/bin/commands/auth.rb +5 -4
- data/bin/commands/auth_teams.rb +16 -0
- data/bin/commands/bots.rb +4 -2
- data/bin/commands/calls.rb +52 -0
- data/bin/commands/calls_participants.rb +25 -0
- data/bin/commands/channels.rb +64 -43
- data/bin/commands/chat.rb +114 -24
- data/bin/commands/chat_scheduledMessages.rb +19 -0
- data/bin/commands/conversations.rb +196 -0
- data/bin/commands/dialog.rb +15 -0
- data/bin/commands/dnd.rb +9 -8
- data/bin/commands/emoji.rb +3 -2
- data/bin/commands/files.rb +45 -30
- data/bin/commands/files_comments.rb +3 -24
- data/bin/commands/files_remote.rb +78 -0
- data/bin/commands/groups.rb +53 -53
- data/bin/commands/im.rb +17 -13
- data/bin/commands/migration.rb +16 -0
- data/bin/commands/mpim.rb +16 -13
- data/bin/commands/oauth.rb +17 -2
- data/bin/commands/oauth_v2.rb +17 -0
- data/bin/commands/pins.rb +7 -10
- data/bin/commands/reactions.rb +17 -15
- data/bin/commands/reminders.rb +11 -10
- data/bin/commands/rtm.rb +19 -4
- data/bin/commands/search.rb +15 -11
- data/bin/commands/stars.rb +11 -8
- data/bin/commands/team.rb +15 -10
- data/bin/commands/team_profile.rb +3 -2
- data/bin/commands/usergroups.rb +22 -16
- data/bin/commands/usergroups_users.rb +7 -4
- data/bin/commands/users.rb +65 -37
- data/bin/commands/users_admin.rb +29 -0
- data/bin/commands/users_prefs.rb +13 -0
- data/bin/commands/users_profile.rb +8 -7
- data/bin/commands/views.rb +48 -0
- data/bin/commands/workflows.rb +38 -0
- data/bin/slack +3 -4
- data/examples/hi_real_time_and_web/Gemfile +1 -0
- data/examples/hi_real_time_and_web/hi.rb +8 -4
- data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/Gemfile +2 -1
- data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/Procfile +0 -0
- data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/hi.rb +13 -8
- data/examples/hi_web/Gemfile +1 -0
- data/examples/hi_web/hi.rb +2 -1
- data/examples/new_ticket/Gemfile +1 -0
- data/examples/new_ticket/new_ticket.rb +2 -1
- data/lib/slack-ruby-client.rb +40 -26
- data/lib/slack.rb +1 -0
- data/lib/slack/config.rb +1 -0
- data/lib/slack/events/config.rb +32 -0
- data/lib/slack/events/request.rb +70 -0
- data/lib/slack/logger.rb +6 -5
- data/lib/slack/messages/formatting.rb +4 -4
- data/lib/slack/messages/message.rb +2 -6
- data/lib/slack/real_time/api/message.rb +3 -1
- data/lib/slack/real_time/api/message_id.rb +1 -0
- data/lib/slack/real_time/api/ping.rb +5 -2
- data/lib/slack/real_time/api/templates/event_handler.erb +1 -1
- data/lib/slack/real_time/api/typing.rb +3 -1
- data/lib/slack/real_time/client.rb +113 -32
- data/lib/slack/real_time/concurrency.rb +2 -2
- data/lib/slack/real_time/concurrency/async.rb +140 -0
- data/lib/slack/real_time/config.rb +20 -12
- data/lib/slack/real_time/models.rb +8 -7
- data/lib/slack/real_time/models/base.rb +2 -6
- data/lib/slack/real_time/models/bot.rb +1 -0
- data/lib/slack/real_time/models/channel.rb +1 -0
- data/lib/slack/real_time/models/group.rb +1 -0
- data/lib/slack/real_time/models/im.rb +1 -0
- data/lib/slack/real_time/models/team.rb +1 -0
- data/lib/slack/real_time/models/user.rb +1 -0
- data/lib/slack/real_time/socket.rb +46 -17
- data/lib/slack/real_time/stores.rb +4 -3
- data/lib/slack/real_time/stores/base.rb +5 -3
- data/lib/slack/real_time/stores/starter.rb +113 -72
- data/lib/slack/real_time/stores/store.rb +131 -88
- data/lib/slack/version.rb +2 -1
- data/lib/slack/web/api/endpoints.rb +110 -26
- data/lib/slack/web/api/endpoints/admin_analytics.rb +26 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +62 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +260 -0
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_conversations_whitelist.rb +64 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +161 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +66 -0
- data/lib/slack/web/api/endpoints/api.rb +3 -4
- data/lib/slack/web/api/endpoints/apps.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
- data/lib/slack/web/api/endpoints/apps_permissions.rb +36 -0
- data/lib/slack/web/api/endpoints/apps_permissions_resources.rb +31 -0
- data/lib/slack/web/api/endpoints/apps_permissions_scopes.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_permissions_users.rb +50 -0
- data/lib/slack/web/api/endpoints/auth.rb +5 -4
- data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
- data/lib/slack/web/api/endpoints/bots.rb +5 -2
- data/lib/slack/web/api/endpoints/calls.rb +83 -0
- data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
- data/lib/slack/web/api/endpoints/channels.rb +105 -49
- data/lib/slack/web/api/endpoints/chat.rb +221 -40
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
- data/lib/slack/web/api/endpoints/conversations.rb +332 -0
- data/lib/slack/web/api/endpoints/dialog.rb +33 -0
- data/lib/slack/web/api/endpoints/dnd.rb +11 -9
- data/lib/slack/web/api/endpoints/emoji.rb +3 -2
- data/lib/slack/web/api/endpoints/files.rb +75 -38
- data/lib/slack/web/api/endpoints/files_comments.rb +3 -38
- data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
- data/lib/slack/web/api/endpoints/groups.rb +76 -53
- data/lib/slack/web/api/endpoints/im.rb +38 -21
- data/lib/slack/web/api/endpoints/migration.rb +28 -0
- data/lib/slack/web/api/endpoints/mpim.rb +37 -22
- data/lib/slack/web/api/endpoints/oauth.rb +25 -4
- data/lib/slack/web/api/endpoints/oauth_v2.rb +30 -0
- data/lib/slack/web/api/endpoints/pins.rb +10 -19
- data/lib/slack/web/api/endpoints/presence.rb +1 -1
- data/lib/slack/web/api/endpoints/reactions.rb +37 -28
- data/lib/slack/web/api/endpoints/reminders.rb +11 -10
- data/lib/slack/web/api/endpoints/rtm.rb +28 -7
- data/lib/slack/web/api/endpoints/search.rb +21 -14
- data/lib/slack/web/api/endpoints/stars.rb +24 -15
- data/lib/slack/web/api/endpoints/team.rb +21 -13
- data/lib/slack/web/api/endpoints/team_profile.rb +3 -2
- data/lib/slack/web/api/endpoints/usergroups.rb +33 -22
- data/lib/slack/web/api/endpoints/usergroups_users.rb +9 -4
- data/lib/slack/web/api/endpoints/users.rb +78 -29
- data/lib/slack/web/api/endpoints/users_admin.rb +49 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +21 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +11 -10
- data/lib/slack/web/api/endpoints/views.rb +97 -0
- data/lib/slack/web/api/endpoints/workflows.rb +61 -0
- data/lib/slack/web/api/error.rb +2 -8
- data/lib/slack/web/api/errors.rb +850 -0
- data/lib/slack/web/api/errors/internal_error.rb +14 -0
- data/lib/slack/web/api/errors/slack_error.rb +29 -0
- data/lib/slack/web/api/errors/too_many_requests_error.rb +24 -0
- data/lib/slack/web/api/mixins.rb +6 -4
- data/lib/slack/web/api/mixins/channels.id.rb +6 -7
- data/lib/slack/web/api/mixins/conversations.id.rb +25 -0
- data/lib/slack/web/api/mixins/groups.id.rb +6 -7
- data/lib/slack/web/api/mixins/ids.id.rb +24 -0
- data/lib/slack/web/api/mixins/users.id.rb +6 -7
- data/lib/slack/web/api/mixins/users.search.rb +39 -36
- data/lib/slack/web/api/patches/chat.1.patch +72 -0
- data/lib/slack/web/api/patches/dialog.1.open-json-support.patch +17 -0
- data/lib/slack/web/api/patches/views.1.view-json.patch +40 -0
- data/lib/slack/web/api/patches/views.1.views-published.patch +16 -0
- data/lib/slack/web/api/templates/command.erb +5 -3
- data/lib/slack/web/api/templates/commands.erb +2 -1
- data/lib/slack/web/api/templates/endpoints.erb +5 -3
- data/lib/slack/web/api/templates/errors.erb +20 -0
- data/lib/slack/web/api/templates/method.erb +26 -4
- data/lib/slack/web/api/templates/method_spec.erb +3 -2
- data/lib/slack/web/client.rb +2 -1
- data/lib/slack/web/config.rb +21 -10
- data/lib/slack/web/faraday/connection.rb +25 -16
- data/lib/slack/web/faraday/request.rb +2 -0
- data/lib/slack/web/faraday/response/raise_error.rb +23 -1
- data/lib/slack/web/faraday/response/wrap_error.rb +18 -0
- data/lib/slack/web/pagination/cursor.rb +52 -0
- data/lib/slack_ruby_client.rb +1 -0
- data/lib/tasks/git.rake +2 -1
- data/lib/tasks/real_time.rake +16 -6
- data/lib/tasks/update.rake +1 -0
- data/lib/tasks/web.rake +38 -10
- data/screenshots/create-app.png +0 -0
- data/slack-ruby-client.gemspec +9 -6
- data/spec/fixtures/slack/web/429_error.yml +2 -0
- data/spec/fixtures/slack/web/503_error.yml +14 -0
- data/spec/fixtures/slack/web/channels_info.yml +108 -15
- data/spec/fixtures/slack/web/conversations_setTopic.yml +69 -0
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +142 -0
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +208 -0
- data/spec/fixtures/slack/web/paginated_users_list.yml +181 -0
- data/spec/fixtures/slack/web/rtm_connect.yml +70 -0
- data/spec/fixtures/slack/web/rtm_start.yml +1 -1
- data/spec/fixtures/slack/web/views_open_error.yml +76 -0
- data/spec/integration/integration_spec.rb +116 -48
- data/spec/slack/config_spec.rb +2 -0
- data/spec/slack/events/config_spec.rb +33 -0
- data/spec/slack/events/request_spec.rb +183 -0
- data/spec/slack/messages/formatting_spec.rb +25 -14
- data/spec/slack/real_time/api/message_spec.rb +6 -1
- data/spec/slack/real_time/api/ping_spec.rb +2 -0
- data/spec/slack/real_time/api/typing_spec.rb +5 -1
- data/spec/slack/real_time/client_spec.rb +462 -134
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +3 -1
- data/spec/slack/real_time/event_handlers/bot_spec.rb +6 -3
- data/spec/slack/real_time/event_handlers/channel_spec.rb +9 -6
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +3 -2
- data/spec/slack/real_time/event_handlers/group_spec.rb +5 -4
- data/spec/slack/real_time/event_handlers/im_spec.rb +4 -3
- data/spec/slack/real_time/event_handlers/team_spec.rb +8 -4
- data/spec/slack/real_time/event_handlers/user_spec.rb +5 -2
- data/spec/slack/real_time/rtm_connect_spec.rb +14 -0
- data/spec/slack/real_time/rtm_start_spec.rb +1 -0
- data/spec/slack/real_time/store_spec.rb +2 -1
- data/spec/slack/slack_spec.rb +39 -7
- data/spec/slack/version_spec.rb +2 -1
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +38 -0
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +32 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +98 -0
- data/spec/slack/web/api/endpoints/admin_conversations_whitelist_spec.rb +32 -0
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +53 -0
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +21 -0
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +67 -0
- data/spec/slack/web/api/endpoints/api_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/apps_permissions_resources_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_permissions_scopes_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +19 -0
- data/spec/slack/web/api/endpoints/apps_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/auth_teams_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/bots_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/calls_spec.rb +31 -0
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/conversations_spec.rb +109 -0
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +13 -4
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +5 -3
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +140 -24
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +36 -0
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +2 -0
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +21 -6
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +95 -0
- data/spec/slack/web/api/endpoints/dnd_spec.rb +6 -0
- data/spec/slack/web/api/endpoints/emoji_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +3 -21
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +24 -0
- data/spec/slack/web/api/endpoints/files_spec.rb +17 -5
- data/spec/slack/web/api/endpoints/im_spec.rb +5 -4
- data/spec/slack/web/api/endpoints/migration_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/mpim_spec.rb +5 -4
- data/spec/slack/web/api/endpoints/oauth_spec.rb +5 -4
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/pins_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/reactions_spec.rb +8 -1
- data/spec/slack/web/api/endpoints/reminders_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/rtm_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/search_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/stars_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/team_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +3 -2
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +1 -0
- data/spec/slack/web/api/endpoints/views_spec.rb +29 -0
- data/spec/slack/web/api/endpoints/workflows_spec.rb +26 -0
- data/spec/slack/web/api/error_spec.rb +5 -3
- data/spec/slack/web/api/errors/slack_error_spec.rb +38 -0
- data/spec/slack/web/api/mixins/channels_spec.rb +24 -12
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +21 -0
- data/spec/slack/web/api/mixins/conversations_spec.rb +43 -0
- data/spec/slack/web/api/mixins/groups_spec.rb +24 -12
- data/spec/slack/web/api/mixins/users_spec.rb +30 -17
- data/spec/slack/web/api/pagination/cursor_spec.rb +100 -0
- data/spec/slack/web/client_spec.rb +215 -14
- data/spec/slack/web/faraday/response/raise_error_spec.rb +85 -0
- data/spec/spec_helper.rb +8 -1
- data/spec/support/queue_with_timeout.rb +6 -5
- data/spec/support/real_time/concurrency/mock.rb +2 -2
- data/spec/support/real_time/connected_client.rb +13 -2
- data/spec/support/real_time/event.rb +1 -0
- data/spec/support/token.rb +1 -0
- data/spec/support/vcr.rb +6 -1
- metadata +280 -55
- data/examples/hi_real_time/Gemfile +0 -5
- data/examples/hi_real_time/hi.gif +0 -0
- data/examples/hi_real_time/hi.rb +0 -37
- data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
- data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
- data/examples/hi_real_time_async_eventmachine/hi.rb +0 -36
- data/lib/slack/real_time/concurrency/celluloid.rb +0 -113
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -60
- data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
- data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
- data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -20
- data/screenshots/register-bot.png +0 -0
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -31
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -6,12 +7,12 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module TeamProfile
|
8
9
|
#
|
9
|
-
#
|
10
|
+
# Retrieve a team's profile.
|
10
11
|
#
|
11
12
|
# @option options [Object] :visibility
|
12
13
|
# Filter by visibility.
|
13
14
|
# @see https://api.slack.com/methods/team.profile.get
|
14
|
-
# @see https://github.com/
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.profile/team.profile.get.json
|
15
16
|
def team_profile_get(options = {})
|
16
17
|
post('team.profile.get', options)
|
17
18
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -6,85 +7,95 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module Usergroups
|
8
9
|
#
|
9
|
-
#
|
10
|
+
# Create a User Group
|
10
11
|
#
|
11
12
|
# @option options [Object] :name
|
12
13
|
# A name for the User Group. Must be unique among User Groups.
|
13
|
-
# @option options [Object] :handle
|
14
|
-
# A mention handle. Must be unique among channels, users and User Groups.
|
15
|
-
# @option options [Object] :description
|
16
|
-
# A short description of the User Group.
|
17
14
|
# @option options [Object] :channels
|
18
15
|
# A comma separated string of encoded channel IDs for which the User Group uses as a default.
|
16
|
+
# @option options [Object] :description
|
17
|
+
# A short description of the User Group.
|
18
|
+
# @option options [Object] :handle
|
19
|
+
# A mention handle. Must be unique among channels, users and User Groups.
|
19
20
|
# @option options [Object] :include_count
|
20
21
|
# Include the number of users in each User Group.
|
22
|
+
# @option options [Object] :team_id
|
23
|
+
# Encoded team id where the user group has to be created, required if org token is used.
|
21
24
|
# @see https://api.slack.com/methods/usergroups.create
|
22
|
-
# @see https://github.com/
|
25
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.create.json
|
23
26
|
def usergroups_create(options = {})
|
24
27
|
throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
|
25
28
|
post('usergroups.create', options)
|
26
29
|
end
|
27
30
|
|
28
31
|
#
|
29
|
-
#
|
32
|
+
# Disable an existing User Group
|
30
33
|
#
|
31
34
|
# @option options [Object] :usergroup
|
32
35
|
# The encoded ID of the User Group to disable.
|
33
36
|
# @option options [Object] :include_count
|
34
37
|
# Include the number of users in the User Group.
|
38
|
+
# @option options [Object] :team_id
|
39
|
+
# Encoded team id where the user group is, required if org token is used.
|
35
40
|
# @see https://api.slack.com/methods/usergroups.disable
|
36
|
-
# @see https://github.com/
|
41
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.disable.json
|
37
42
|
def usergroups_disable(options = {})
|
38
43
|
throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil?
|
39
44
|
post('usergroups.disable', options)
|
40
45
|
end
|
41
46
|
|
42
47
|
#
|
43
|
-
#
|
48
|
+
# Enable a User Group
|
44
49
|
#
|
45
50
|
# @option options [Object] :usergroup
|
46
51
|
# The encoded ID of the User Group to enable.
|
47
52
|
# @option options [Object] :include_count
|
48
53
|
# Include the number of users in the User Group.
|
54
|
+
# @option options [Object] :team_id
|
55
|
+
# Encoded team id where the user group is, required if org token is used.
|
49
56
|
# @see https://api.slack.com/methods/usergroups.enable
|
50
|
-
# @see https://github.com/
|
57
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.enable.json
|
51
58
|
def usergroups_enable(options = {})
|
52
59
|
throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil?
|
53
60
|
post('usergroups.enable', options)
|
54
61
|
end
|
55
62
|
|
56
63
|
#
|
57
|
-
#
|
64
|
+
# List all User Groups for a team
|
58
65
|
#
|
59
|
-
# @option options [Object] :include_disabled
|
60
|
-
# Include disabled User Groups.
|
61
66
|
# @option options [Object] :include_count
|
62
67
|
# Include the number of users in each User Group.
|
68
|
+
# @option options [Object] :include_disabled
|
69
|
+
# Include disabled User Groups.
|
63
70
|
# @option options [Object] :include_users
|
64
71
|
# Include the list of users for each User Group.
|
72
|
+
# @option options [Object] :team_id
|
73
|
+
# encoded team id to list user groups in, required if org token is used.
|
65
74
|
# @see https://api.slack.com/methods/usergroups.list
|
66
|
-
# @see https://github.com/
|
75
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.list.json
|
67
76
|
def usergroups_list(options = {})
|
68
77
|
post('usergroups.list', options)
|
69
78
|
end
|
70
79
|
|
71
80
|
#
|
72
|
-
#
|
81
|
+
# Update an existing User Group
|
73
82
|
#
|
74
83
|
# @option options [Object] :usergroup
|
75
84
|
# The encoded ID of the User Group to update.
|
76
|
-
# @option options [Object] :name
|
77
|
-
# A name for the User Group. Must be unique among User Groups.
|
78
|
-
# @option options [Object] :handle
|
79
|
-
# A mention handle. Must be unique among channels, users and User Groups.
|
80
|
-
# @option options [Object] :description
|
81
|
-
# A short description of the User Group.
|
82
85
|
# @option options [Object] :channels
|
83
86
|
# A comma separated string of encoded channel IDs for which the User Group uses as a default.
|
87
|
+
# @option options [Object] :description
|
88
|
+
# A short description of the User Group.
|
89
|
+
# @option options [Object] :handle
|
90
|
+
# A mention handle. Must be unique among channels, users and User Groups.
|
84
91
|
# @option options [Object] :include_count
|
85
92
|
# Include the number of users in the User Group.
|
93
|
+
# @option options [Object] :name
|
94
|
+
# A name for the User Group. Must be unique among User Groups.
|
95
|
+
# @option options [Object] :team_id
|
96
|
+
# encoded team id where the user group exists, required if org token is used.
|
86
97
|
# @see https://api.slack.com/methods/usergroups.update
|
87
|
-
# @see https://github.com/
|
98
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.update.json
|
88
99
|
def usergroups_update(options = {})
|
89
100
|
throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil?
|
90
101
|
post('usergroups.update', options)
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -6,21 +7,23 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module UsergroupsUsers
|
8
9
|
#
|
9
|
-
#
|
10
|
+
# List all users in a User Group
|
10
11
|
#
|
11
12
|
# @option options [Object] :usergroup
|
12
13
|
# The encoded ID of the User Group to update.
|
13
14
|
# @option options [Object] :include_disabled
|
14
15
|
# Allow results that involve disabled User Groups.
|
16
|
+
# @option options [Object] :team_id
|
17
|
+
# encoded team id where the user group exists, required if org token is used.
|
15
18
|
# @see https://api.slack.com/methods/usergroups.users.list
|
16
|
-
# @see https://github.com/
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.list.json
|
17
20
|
def usergroups_users_list(options = {})
|
18
21
|
throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil?
|
19
22
|
post('usergroups.users.list', options)
|
20
23
|
end
|
21
24
|
|
22
25
|
#
|
23
|
-
#
|
26
|
+
# Update the list of users for a User Group
|
24
27
|
#
|
25
28
|
# @option options [Object] :usergroup
|
26
29
|
# The encoded ID of the User Group to update.
|
@@ -28,8 +31,10 @@ module Slack
|
|
28
31
|
# A comma separated string of encoded user IDs that represent the entire list of users for the User Group.
|
29
32
|
# @option options [Object] :include_count
|
30
33
|
# Include the number of users in the User Group.
|
34
|
+
# @option options [Object] :team_id
|
35
|
+
# encoded team id where the user group exists, required if org token is used.
|
31
36
|
# @see https://api.slack.com/methods/usergroups.users.update
|
32
|
-
# @see https://github.com/
|
37
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.update.json
|
33
38
|
def usergroups_users_update(options = {})
|
34
39
|
throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil?
|
35
40
|
throw ArgumentError.new('Required arguments :users missing') if options[:users].nil?
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -6,44 +7,72 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module Users
|
8
9
|
#
|
9
|
-
#
|
10
|
+
# List conversations the calling user may access.
|
11
|
+
#
|
12
|
+
# @option options [Object] :cursor
|
13
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
14
|
+
# @option options [Object] :exclude_archived
|
15
|
+
# Set to true to exclude archived channels from the list.
|
16
|
+
# @option options [Object] :limit
|
17
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000.
|
18
|
+
# @option options [Object] :team_id
|
19
|
+
# encoded team id to list conversations in, required if org token is used.
|
20
|
+
# @option options [Object] :types
|
21
|
+
# Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.
|
22
|
+
# @option options [user] :user
|
23
|
+
# Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership.
|
24
|
+
# @see https://api.slack.com/methods/users.conversations
|
25
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.conversations.json
|
26
|
+
def users_conversations(options = {})
|
27
|
+
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
28
|
+
if block_given?
|
29
|
+
Pagination::Cursor.new(self, :users_conversations, options).each do |page|
|
30
|
+
yield page
|
31
|
+
end
|
32
|
+
else
|
33
|
+
post('users.conversations', options)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Delete the user profile photo
|
10
39
|
#
|
11
40
|
# @see https://api.slack.com/methods/users.deletePhoto
|
12
|
-
# @see https://github.com/
|
41
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.deletePhoto.json
|
13
42
|
def users_deletePhoto(options = {})
|
14
43
|
post('users.deletePhoto', options)
|
15
44
|
end
|
16
45
|
|
17
46
|
#
|
18
|
-
#
|
19
|
-
# Consult the presence documentation for more details.
|
47
|
+
# Gets user presence information.
|
20
48
|
#
|
21
49
|
# @option options [user] :user
|
22
50
|
# User to get presence info on. Defaults to the authed user.
|
23
51
|
# @see https://api.slack.com/methods/users.getPresence
|
24
|
-
# @see https://github.com/
|
52
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.getPresence.json
|
25
53
|
def users_getPresence(options = {})
|
26
|
-
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
27
54
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
28
55
|
post('users.getPresence', options)
|
29
56
|
end
|
30
57
|
|
31
58
|
#
|
32
|
-
#
|
59
|
+
# Get a user's identity.
|
33
60
|
#
|
34
61
|
# @see https://api.slack.com/methods/users.identity
|
35
|
-
# @see https://github.com/
|
62
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.identity.json
|
36
63
|
def users_identity(options = {})
|
37
64
|
post('users.identity', options)
|
38
65
|
end
|
39
66
|
|
40
67
|
#
|
41
|
-
#
|
68
|
+
# Gets information about a user.
|
42
69
|
#
|
43
70
|
# @option options [user] :user
|
44
71
|
# User to get info on.
|
72
|
+
# @option options [Object] :include_locale
|
73
|
+
# Set this to true to receive the locale for this user. Defaults to false.
|
45
74
|
# @see https://api.slack.com/methods/users.info
|
46
|
-
# @see https://github.com/
|
75
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.info.json
|
47
76
|
def users_info(options = {})
|
48
77
|
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
49
78
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
@@ -51,53 +80,73 @@ module Slack
|
|
51
80
|
end
|
52
81
|
|
53
82
|
#
|
54
|
-
#
|
83
|
+
# Lists all users in a Slack team.
|
55
84
|
#
|
56
|
-
# @option options [Object] :
|
57
|
-
#
|
85
|
+
# @option options [Object] :cursor
|
86
|
+
# Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first "page" of the collection. See pagination for more detail.
|
87
|
+
# @option options [Object] :include_locale
|
88
|
+
# Set this to true to receive the locale for users. Defaults to false.
|
89
|
+
# @option options [Object] :limit
|
90
|
+
# The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no limit value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience limit_required or HTTP 500 errors.
|
91
|
+
# @option options [Object] :team_id
|
92
|
+
# encoded team id to list users in, required if org token is used.
|
58
93
|
# @see https://api.slack.com/methods/users.list
|
59
|
-
# @see https://github.com/
|
94
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.list.json
|
60
95
|
def users_list(options = {})
|
61
|
-
|
96
|
+
if block_given?
|
97
|
+
Pagination::Cursor.new(self, :users_list, options).each do |page|
|
98
|
+
yield page
|
99
|
+
end
|
100
|
+
else
|
101
|
+
post('users.list', options)
|
102
|
+
end
|
62
103
|
end
|
63
104
|
|
64
105
|
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
106
|
+
# Find a user with an email address.
|
107
|
+
#
|
108
|
+
# @option options [Object] :email
|
109
|
+
# An email address belonging to a user in the workspace.
|
110
|
+
# @see https://api.slack.com/methods/users.lookupByEmail
|
111
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.lookupByEmail.json
|
112
|
+
def users_lookupByEmail(options = {})
|
113
|
+
throw ArgumentError.new('Required arguments :email missing') if options[:email].nil?
|
114
|
+
post('users.lookupByEmail', options)
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Marked a user as active. Deprecated and non-functional.
|
68
119
|
#
|
69
120
|
# @see https://api.slack.com/methods/users.setActive
|
70
|
-
# @see https://github.com/
|
121
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setActive.json
|
71
122
|
def users_setActive(options = {})
|
72
123
|
post('users.setActive', options)
|
73
124
|
end
|
74
125
|
|
75
126
|
#
|
76
|
-
#
|
127
|
+
# Set the user profile photo
|
77
128
|
#
|
78
|
-
# @option options [Object] :
|
79
|
-
#
|
129
|
+
# @option options [Object] :crop_w
|
130
|
+
# Width/height of crop box (always square).
|
80
131
|
# @option options [Object] :crop_x
|
81
132
|
# X coordinate of top-left corner of crop box.
|
82
133
|
# @option options [Object] :crop_y
|
83
134
|
# Y coordinate of top-left corner of crop box.
|
84
|
-
# @option options [Object] :
|
85
|
-
#
|
135
|
+
# @option options [Object] :image
|
136
|
+
# File contents via multipart/form-data.
|
86
137
|
# @see https://api.slack.com/methods/users.setPhoto
|
87
|
-
# @see https://github.com/
|
138
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setPhoto.json
|
88
139
|
def users_setPhoto(options = {})
|
89
|
-
throw ArgumentError.new('Required arguments :image missing') if options[:image].nil?
|
90
140
|
post('users.setPhoto', options)
|
91
141
|
end
|
92
142
|
|
93
143
|
#
|
94
|
-
#
|
95
|
-
# Consult the presence documentation for more details.
|
144
|
+
# Manually sets user presence.
|
96
145
|
#
|
97
146
|
# @option options [Object] :presence
|
98
147
|
# Either auto or away.
|
99
148
|
# @see https://api.slack.com/methods/users.setPresence
|
100
|
-
# @see https://github.com/
|
149
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setPresence.json
|
101
150
|
def users_setPresence(options = {})
|
102
151
|
throw ArgumentError.new('Required arguments :presence missing') if options[:presence].nil?
|
103
152
|
post('users.setPresence', options)
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module UsersAdmin
|
9
|
+
#
|
10
|
+
# Send an invitation to a new user by email (undocumented)
|
11
|
+
#
|
12
|
+
# @option options [Object] :email
|
13
|
+
# Email address of the new user
|
14
|
+
# @option options [Object] :channels
|
15
|
+
# Comma-separated list of IDs (not names!) for channels, which the new user will auto-join. Both channel IDs for public channels and group IDs for private chanels work.
|
16
|
+
# @option options [Object] :first_name
|
17
|
+
# Prefilled input for the "First name" field on the "new user registration" page.
|
18
|
+
# @option options [Object] :last_name
|
19
|
+
# Prefilled input for the "Last name" field on the "new user registration" page.
|
20
|
+
# @option options [Object] :resend
|
21
|
+
# Resend the invitation email if the user has already been invited and the email was sent some time ago.
|
22
|
+
# @option options [Object] :restricted
|
23
|
+
# Invite a guest that can use multiple channels
|
24
|
+
# @option options [Object] :ultra_restricted
|
25
|
+
# Invite a guest that can use one channel only
|
26
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.invite.json
|
27
|
+
def users_admin_invite(options = {})
|
28
|
+
throw ArgumentError.new('Required arguments :email missing') if options[:email].nil?
|
29
|
+
logger.warn('The users.admin.invite method is undocumented.')
|
30
|
+
post('users.admin.invite', options)
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Disable a user (undocumented)
|
35
|
+
#
|
36
|
+
# @option options [user] :user
|
37
|
+
# User to disable
|
38
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.admin/users.admin.setInactive.json
|
39
|
+
def users_admin_setInactive(options = {})
|
40
|
+
throw ArgumentError.new('Required arguments :user missing') if options[:user].nil?
|
41
|
+
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
42
|
+
logger.warn('The users.admin.setInactive method is undocumented.')
|
43
|
+
post('users.admin.setInactive', options)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module UsersPrefs
|
9
|
+
#
|
10
|
+
# Returns the user's preferences (undocumented)
|
11
|
+
#
|
12
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/undocumented/users.prefs/users.prefs.get.json
|
13
|
+
def users_prefs_get(options = {})
|
14
|
+
logger.warn('The users.prefs.get method is undocumented.')
|
15
|
+
post('users.prefs.get', options)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
4
|
module Slack
|
@@ -6,32 +7,32 @@ module Slack
|
|
6
7
|
module Endpoints
|
7
8
|
module UsersProfile
|
8
9
|
#
|
9
|
-
#
|
10
|
+
# Retrieve a user's profile information, including their custom status.
|
10
11
|
#
|
12
|
+
# @option options [Object] :include_labels
|
13
|
+
# Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended.
|
11
14
|
# @option options [user] :user
|
12
15
|
# User to retrieve profile info for.
|
13
|
-
# @option options [Object] :include_labels
|
14
|
-
# Include labels for each ID in custom profile fields.
|
15
16
|
# @see https://api.slack.com/methods/users.profile.get
|
16
|
-
# @see https://github.com/
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.profile/users.profile.get.json
|
17
18
|
def users_profile_get(options = {})
|
18
19
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
19
20
|
post('users.profile.get', options)
|
20
21
|
end
|
21
22
|
|
22
23
|
#
|
23
|
-
#
|
24
|
+
# Set a user's profile information, including custom status.
|
24
25
|
#
|
25
|
-
# @option options [user] :user
|
26
|
-
# ID of user to change. This argument may only be specified by team admins on paid teams.
|
27
|
-
# @option options [Object] :profile
|
28
|
-
# Collection of key:value pairs presented as a URL-encoded JSON hash.
|
29
26
|
# @option options [Object] :name
|
30
27
|
# Name of a single key to set. Usable only if profile is not passed.
|
28
|
+
# @option options [Object] :profile
|
29
|
+
# Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.
|
30
|
+
# @option options [user] :user
|
31
|
+
# ID of user to change. This argument may only be specified by team admins on paid teams.
|
31
32
|
# @option options [Object] :value
|
32
33
|
# Value to set a single key to. Usable only if profile is not passed.
|
33
34
|
# @see https://api.slack.com/methods/users.profile.set
|
34
|
-
# @see https://github.com/
|
35
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.profile/users.profile.set.json
|
35
36
|
def users_profile_set(options = {})
|
36
37
|
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
|
37
38
|
post('users.profile.set', options)
|