diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f59baa..9ce4cba6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 0.10.1 (next) * Your contribution here. +* [#177](https://github.com/slack-ruby/slack-ruby-client/pull/177): Fix api ref repo - [@manuelmeurer](https://github.com/manuelmeurer). * [#176](https://github.com/slack-ruby/slack-ruby-client/issues/176): Drop dependency on json gem - [@seuros](https://github.com/seuros). * [#173](https://github.com/slack-ruby/slack-ruby-client/issues/173): Updated to latest slack-api-ref => we have Dialogs!; Added dialog.1.open-json-support patch to apply the JSON fix to :dialog param - [@alexagranov](https://github.com/alexagranov). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7812a7c0..f53ae6ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,7 @@ Make sure that `bundle exec rake` completes without errors. ### Update Slack Web API -Slack Web API is updated from https://github.com/dblock/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task. +Slack Web API is updated from https://github.com/slack-ruby/slack-api-ref, a maintained, machine-readable version of Slack API Docs, generated by scraping [api.slack.com](https://api.slack.com). To update the Web API from the latest definition run the following Rake task. ``` rake slack:api:update diff --git a/lib/slack/real_time/api/templates/event_handler.erb b/lib/slack/real_time/api/templates/event_handler.erb index 6813686d..1de8809f 100644 --- a/lib/slack/real_time/api/templates/event_handler.erb +++ b/lib/slack/real_time/api/templates/event_handler.erb @@ -1,4 +1,4 @@ # <%= desc %> # @see https://api.slack.com/events/<%= name %> - # @see https://github.com/dblock/slack-api-ref/blob/master/events/<%= name %>.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/<%= name %>.json # on :<%= name %> do |data| diff --git a/lib/slack/real_time/stores/starter.rb b/lib/slack/real_time/stores/starter.rb index 39821100..6a8563c2 100644 --- a/lib/slack/real_time/stores/starter.rb +++ b/lib/slack/real_time/stores/starter.rb @@ -16,342 +16,342 @@ def initialize(attrs) # The membership of an existing User Group has changed. # @see https://api.slack.com/events/subteam_members_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_members_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_members_changed.json # on :subteam_members_changed do |data| # Subscribe to presence events for the specified users. # @see https://api.slack.com/events/presence_sub - # @see https://github.com/dblock/slack-api-ref/blob/master/events/presence_sub.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_sub.json # on :presence_sub do |data| # A user left a public or private channel. # @see https://api.slack.com/events/member_left_channel - # @see https://github.com/dblock/slack-api-ref/blob/master/events/member_left_channel.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_left_channel.json # on :member_left_channel do |data| # A user joined a public or private channel. # @see https://api.slack.com/events/member_joined_channel - # @see https://github.com/dblock/slack-api-ref/blob/master/events/member_joined_channel.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_joined_channel.json # on :member_joined_channel do |data| # The server intends to close the connection soon.. # @see https://api.slack.com/events/goodbye - # @see https://github.com/dblock/slack-api-ref/blob/master/events/goodbye.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/goodbye.json # on :goodbye do |data| # Verifies ownership of an Events API Request URL. # @see https://api.slack.com/events/url_verification - # @see https://github.com/dblock/slack-api-ref/blob/master/events/url_verification.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/url_verification.json # on :url_verification do |data| # A message was posted in a multiparty direct message channel. # @see https://api.slack.com/events/message.mpim - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.mpim.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.mpim.json # on :message.mpim do |data| # A message was posted in a direct message channel. # @see https://api.slack.com/events/message.im - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.im.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.im.json # on :message.im do |data| # A message was posted to a private channel. # @see https://api.slack.com/events/message.groups - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.groups.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.groups.json # on :message.groups do |data| # A message was posted to a channel. # @see https://api.slack.com/events/message.channels - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.channels.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.channels.json # on :message.channels do |data| # A channel member is typing a message. # @see https://api.slack.com/events/user_typing - # @see https://github.com/dblock/slack-api-ref/blob/master/events/user_typing.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_typing.json # on :user_typing do |data| # A team member's data has changed. # @see https://api.slack.com/events/user_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/user_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_change.json # on :user_change do |data| # A new team member has joined. # @see https://api.slack.com/events/team_join - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_join.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_join.json # on :team_join do |data| # An existing user group has been updated or its members changed. # @see https://api.slack.com/events/subteam_updated - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_updated.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_updated.json # on :subteam_updated do |data| # You have been removed from a user group. # @see https://api.slack.com/events/subteam_self_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_self_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_self_removed.json # on :subteam_self_removed do |data| # You have been added to a user group. # @see https://api.slack.com/events/subteam_self_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_self_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_self_added.json # on :subteam_self_added do |data| # A user group has been added to the team. # @see https://api.slack.com/events/subteam_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_created.json # on :subteam_created do |data| # A team member removed a star. # @see https://api.slack.com/events/star_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/star_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/star_removed.json # on :star_removed do |data| # A team member has starred an item. # @see https://api.slack.com/events/star_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/star_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/star_added.json # on :star_added do |data| # Experimental. # @see https://api.slack.com/events/reconnect_url - # @see https://github.com/dblock/slack-api-ref/blob/master/events/reconnect_url.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reconnect_url.json # on :reconnect_url do |data| # A team member removed an emoji reaction. # @see https://api.slack.com/events/reaction_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/reaction_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reaction_removed.json # on :reaction_removed do |data| # A team member has added an emoji reaction to an item. # @see https://api.slack.com/events/reaction_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/reaction_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reaction_added.json # on :reaction_added do |data| # A team member's presence changed. # @see https://api.slack.com/events/presence_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/presence_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_change.json # on :presence_change do |data| # You have updated your preferences. # @see https://api.slack.com/events/pref_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/pref_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pref_change.json # on :pref_change do |data| # A pin was removed from a channel. # @see https://api.slack.com/events/pin_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/pin_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pin_removed.json # on :pin_removed do |data| # A pin was added to a channel. # @see https://api.slack.com/events/pin_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/pin_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pin_added.json # on :pin_added do |data| # You manually updated your presence. # @see https://api.slack.com/events/manual_presence_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/manual_presence_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/manual_presence_change.json # on :manual_presence_change do |data| # You opened a direct message channel. # @see https://api.slack.com/events/im_open - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_open.json # on :im_open do |data| # A direct message read marker was updated. # @see https://api.slack.com/events/im_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_marked.json # on :im_marked do |data| # Bulk updates were made to a DM channel's history. # @see https://api.slack.com/events/im_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_history_changed.json # on :im_history_changed do |data| # A direct message channel was created. # @see https://api.slack.com/events/im_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_created.json # on :im_created do |data| # You closed a direct message channel. # @see https://api.slack.com/events/im_close - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_close.json # on :im_close do |data| # A private group was unarchived. # @see https://api.slack.com/events/group_unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_unarchive.json # on :group_unarchive do |data| # A private group was renamed. # @see https://api.slack.com/events/group_rename - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_rename.json # on :group_rename do |data| # You opened a group channel. # @see https://api.slack.com/events/group_open - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_open.json # on :group_open do |data| # A private group read marker was updated. # @see https://api.slack.com/events/group_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_marked.json # on :group_marked do |data| # You left a private group. # @see https://api.slack.com/events/group_left - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_left.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_left.json # on :group_left do |data| # You joined a private group. # @see https://api.slack.com/events/group_joined - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_joined.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_joined.json # on :group_joined do |data| # Bulk updates were made to a group's history. # @see https://api.slack.com/events/group_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_history_changed.json # on :group_history_changed do |data| # You closed a group channel. # @see https://api.slack.com/events/group_close - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_close.json # on :group_close do |data| # A private group was archived. # @see https://api.slack.com/events/group_archive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_archive.json # on :group_archive do |data| # A file was unshared. # @see https://api.slack.com/events/file_unshared - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_unshared.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_unshared.json # on :file_unshared do |data| # A file was shared. # @see https://api.slack.com/events/file_shared - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_shared.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_shared.json # on :file_shared do |data| # A file was made public. # @see https://api.slack.com/events/file_public - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_public.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_public.json # on :file_public do |data| # A file was made private. # @see https://api.slack.com/events/file_private - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_private.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_private.json # on :file_private do |data| # A file was deleted. # @see https://api.slack.com/events/file_deleted - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_deleted.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_deleted.json # on :file_deleted do |data| # A file was created. # @see https://api.slack.com/events/file_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_created.json # on :file_created do |data| # A file comment was edited. # @see https://api.slack.com/events/file_comment_edited - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_comment_edited.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_edited.json # on :file_comment_edited do |data| # A file comment was deleted. # @see https://api.slack.com/events/file_comment_deleted - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_comment_deleted.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_deleted.json # on :file_comment_deleted do |data| # A file comment was added. # @see https://api.slack.com/events/file_comment_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_comment_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_added.json # on :file_comment_added do |data| # A file was changed. # @see https://api.slack.com/events/file_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_change.json # on :file_change do |data| # A team custom emoji has been added or changed. # @see https://api.slack.com/events/emoji_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/emoji_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/emoji_changed.json # on :emoji_changed do |data| # Do not Disturb settings changed for a team member. # @see https://api.slack.com/events/dnd_updated_user - # @see https://github.com/dblock/slack-api-ref/blob/master/events/dnd_updated_user.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/dnd_updated_user.json # on :dnd_updated_user do |data| # Do not Disturb settings changed for the current user. # @see https://api.slack.com/events/dnd_updated - # @see https://github.com/dblock/slack-api-ref/blob/master/events/dnd_updated.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/dnd_updated.json # on :dnd_updated do |data| # A team slash command has been added or changed. # @see https://api.slack.com/events/commands_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/commands_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/commands_changed.json # on :commands_changed do |data| # A team channel was unarchived. # @see https://api.slack.com/events/channel_unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_unarchive.json # on :channel_unarchive do |data| # A team channel was renamed. # @see https://api.slack.com/events/channel_rename - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_rename.json # on :channel_rename do |data| # Your channel read marker was updated. # @see https://api.slack.com/events/channel_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_marked.json # on :channel_marked do |data| # You left a channel. # @see https://api.slack.com/events/channel_left - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_left.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_left.json # on :channel_left do |data| # You joined a channel. # @see https://api.slack.com/events/channel_joined - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_joined.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_joined.json # on :channel_joined do |data| # Bulk updates were made to a channel's history. # @see https://api.slack.com/events/channel_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_history_changed.json # on :channel_history_changed do |data| # A team channel was deleted. # @see https://api.slack.com/events/channel_deleted - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_deleted.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_deleted.json # on :channel_deleted do |data| # A team channel was created. # @see https://api.slack.com/events/channel_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_created.json # on :channel_created do |data| # A team channel was archived. # @see https://api.slack.com/events/channel_archive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_archive.json # on :channel_archive do |data| # An integration bot was changed. # @see https://api.slack.com/events/bot_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/bot_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/bot_changed.json # on :bot_changed do |data| # An integration bot was added. # @see https://api.slack.com/events/bot_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/bot_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/bot_added.json # on :bot_added do |data| # The list of accounts a user is signed into has changed. # @see https://api.slack.com/events/accounts_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/accounts_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/accounts_changed.json # on :accounts_changed do |data| # The team domain has changed. # @see https://api.slack.com/events/team_domain_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_domain_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_domain_change.json on :team_domain_change do |data| team.url = data.url team.domain = data.domain @@ -359,19 +359,19 @@ def initialize(attrs) # The team is being migrated between servers. # @see https://api.slack.com/events/team_migration_started - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_migration_started.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_migration_started.json # on :team_migration_started do |data| # The team billing plan has changed. # @see https://api.slack.com/events/team_plan_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_plan_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_plan_change.json on :team_plan_change do |data| team.plan = data.plan end # A team preference has been updated. # @see https://api.slack.com/events/team_pref_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_pref_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_pref_change.json on :team_pref_change do |data| team.prefs ||= {} team.prefs[data.name] = data.value @@ -379,29 +379,29 @@ def initialize(attrs) # Team profile fields have been updated. # @see https://api.slack.com/events/team_profile_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_profile_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_change.json # on :team_profile_change do |data| # Team profile fields have been deleted. # @see https://api.slack.com/events/team_profile_delete - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_profile_delete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_delete.json # on :team_profile_delete do |data| # Team profile fields have been reordered. # @see https://api.slack.com/events/team_profile_reorder - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_profile_reorder.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_reorder.json # on :team_profile_reorder do |data| # The team name has changed. # @see https://api.slack.com/events/team_rename - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_rename.json on :team_rename do |data| team.name = data.name end # The team email domain has changed. # @see https://api.slack.com/events/email_domain_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/email_domain_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/email_domain_changed.json on :email_domain_changed do |data| team.email_domain = data.email_domain end diff --git a/lib/slack/real_time/stores/store.rb b/lib/slack/real_time/stores/store.rb index b2058d25..3c7e9c97 100644 --- a/lib/slack/real_time/stores/store.rb +++ b/lib/slack/real_time/stores/store.rb @@ -56,79 +56,79 @@ def initialize(attrs) # The membership of an existing User Group has changed. # @see https://api.slack.com/events/subteam_members_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_members_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_members_changed.json # on :subteam_members_changed do |data| # Subscribe to presence events for the specified users. # @see https://api.slack.com/events/presence_sub - # @see https://github.com/dblock/slack-api-ref/blob/master/events/presence_sub.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_sub.json # on :presence_sub do |data| # A user left a public or private channel. # @see https://api.slack.com/events/member_left_channel - # @see https://github.com/dblock/slack-api-ref/blob/master/events/member_left_channel.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_left_channel.json # on :member_left_channel do |data| # A user joined a public or private channel. # @see https://api.slack.com/events/member_joined_channel - # @see https://github.com/dblock/slack-api-ref/blob/master/events/member_joined_channel.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/member_joined_channel.json # on :member_joined_channel do |data| # The server intends to close the connection soon.. # @see https://api.slack.com/events/goodbye - # @see https://github.com/dblock/slack-api-ref/blob/master/events/goodbye.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/goodbye.json # on :goodbye do |data| # Verifies ownership of an Events API Request URL. # @see https://api.slack.com/events/url_verification - # @see https://github.com/dblock/slack-api-ref/blob/master/events/url_verification.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/url_verification.json # on :url_verification do |data| # A message was posted in a multiparty direct message channel. # @see https://api.slack.com/events/message.mpim - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.mpim.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.mpim.json # on :message.mpim do |data| # A message was posted in a direct message channel. # @see https://api.slack.com/events/message.im - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.im.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.im.json # on :message.im do |data| # A message was posted to a private channel. # @see https://api.slack.com/events/message.groups - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.groups.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.groups.json # on :message.groups do |data| # A message was posted to a channel. # @see https://api.slack.com/events/message.channels - # @see https://github.com/dblock/slack-api-ref/blob/master/events/message.channels.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/message.channels.json # on :message.channels do |data| # A direct message read marker was updated. # @see https://api.slack.com/events/im_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_marked.json # on :im_marked do |data| # Bulk updates were made to a DM channel's history. # @see https://api.slack.com/events/im_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_history_changed.json # on :im_history_changed do |data| # The list of accounts a user is signed into has changed. # @see https://api.slack.com/events/accounts_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/accounts_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/accounts_changed.json # on :accounts_changed do |data| # An integration bot was added. # @see https://api.slack.com/events/bot_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/bot_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/bot_added.json on :bot_added do |data| bots[data.bot.id] = Models::Bot.new(data.bot) end # An integration bot was changed. # @see https://api.slack.com/events/bot_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/bot_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/bot_changed.json on :bot_changed do |data| bot = bots[data.bot.id] bot.merge!(data.bot) if bot @@ -136,7 +136,7 @@ def initialize(attrs) # A team channel was archived. # @see https://api.slack.com/events/channel_archive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_archive.json on :channel_archive do |data| channel = channels[data.channel] channel.is_archived = true if channel @@ -144,7 +144,7 @@ def initialize(attrs) # A team channel was created. # @see https://api.slack.com/events/channel_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_created.json on :channel_created do |data| channel = Models::Channel.new(data.channel) channels[channel.id] = channel @@ -152,19 +152,19 @@ def initialize(attrs) # A team channel was deleted. # @see https://api.slack.com/events/channel_deleted - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_deleted.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_deleted.json on :channel_deleted do |data| channels.delete(data.channel) end # Bulk updates were made to a channel's history. # @see https://api.slack.com/events/channel_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_history_changed.json # on :channel_history_changed do |data| # You joined a channel. # @see https://api.slack.com/events/channel_joined - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_joined.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_joined.json on :channel_joined do |data| channel_id = data.channel.id channel = channels[channel_id] @@ -177,7 +177,7 @@ def initialize(attrs) # You left a channel. # @see https://api.slack.com/events/channel_left - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_left.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_left.json on :channel_left do |data| channel = channels[data.channel] channel.members.delete(self.self.id) if channel.key? :members @@ -185,12 +185,12 @@ def initialize(attrs) # Your channel read marker was updated. # @see https://api.slack.com/events/channel_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_marked.json # on :channel_marked do |data| # A team channel was renamed. # @see https://api.slack.com/events/channel_rename - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_rename.json on :channel_rename do |data| channel = channels[data.channel.id] channel.name = data.channel.name if channel @@ -198,7 +198,7 @@ def initialize(attrs) # A team channel was unarchived. # @see https://api.slack.com/events/channel_unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/channel_unarchive.json on :channel_unarchive do |data| channel = channels[data.channel] channel.is_archived = false if channel @@ -206,84 +206,84 @@ def initialize(attrs) # A team slash command has been added or changed. # @see https://api.slack.com/events/commands_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/commands_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/commands_changed.json # on :commands_changed do |data| # Do not Disturb settings changed for the current user. # @see https://api.slack.com/events/dnd_updated - # @see https://github.com/dblock/slack-api-ref/blob/master/events/dnd_updated.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/dnd_updated.json # on :dnd_updated do |data| # Do not Disturb settings changed for a team member. # @see https://api.slack.com/events/dnd_updated_user - # @see https://github.com/dblock/slack-api-ref/blob/master/events/dnd_updated_user.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/dnd_updated_user.json # on :dnd_updated_user do |data| # The team email domain has changed. # @see https://api.slack.com/events/email_domain_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/email_domain_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/email_domain_changed.json on :email_domain_changed do |data| team.email_domain = data.email_domain end # A team custom emoji has been added or changed. # @see https://api.slack.com/events/emoji_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/emoji_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/emoji_changed.json # on :emoji_changed do |data| # A file was changed. # @see https://api.slack.com/events/file_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_change.json # on :file_change do |data| # A file comment was added. # @see https://api.slack.com/events/file_comment_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_comment_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_added.json # on :file_comment_added do |data| do # A file comment was deleted. # @see https://api.slack.com/events/file_comment_deleted - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_comment_deleted.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_deleted.json # on :file_comment_deleted do |data| # A file comment was edited. # @see https://api.slack.com/events/file_comment_edited - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_comment_edited.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_comment_edited.json # on :file_comment_edited do |data| # A file was created. # @see https://api.slack.com/events/file_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_created.json # on :file_created do |data| # A file was deleted. # @see https://api.slack.com/events/file_deleted - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_deleted.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_deleted.json # on :file_deleted do |data| # A file was made private. # @see https://api.slack.com/events/file_private - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_private.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_private.json # on :file_private do |data| # A file was made public. # @see https://api.slack.com/events/file_public - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_public.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_public.json # on :file_public do |data| # A file was shared. # @see https://api.slack.com/events/file_shared - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_shared.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_shared.json # on :file_shared do |data| # A file was unshared. # @see https://api.slack.com/events/file_unshared - # @see https://github.com/dblock/slack-api-ref/blob/master/events/file_unshared.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/file_unshared.json # on :file_unshared do |data| # A private group was archived. # @see https://api.slack.com/events/group_archive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_archive.json on :group_archive do |data| channel = groups[data.channel] channel.is_archived = true if channel @@ -291,26 +291,26 @@ def initialize(attrs) # You closed a group channel. # @see https://api.slack.com/events/group_close - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_close.json on :group_close do |data| groups[data.channel].is_open = false end # Bulk updates were made to a group's history. # @see https://api.slack.com/events/group_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_history_changed.json # on :group_history_changed do |data| # You joined a private group. # @see https://api.slack.com/events/group_joined - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_joined.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_joined.json on :group_joined do |data| groups[data.channel.id] = Models::Channel.new(data.channel) end # You left a private group. # @see https://api.slack.com/events/group_left - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_left.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_left.json on :group_left do |data| channel = groups[data.channel] channel.members.delete(self.self.id) if channel && channel.key?(:members) @@ -318,19 +318,19 @@ def initialize(attrs) # A private group read marker was updated. # @see https://api.slack.com/events/group_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_marked.json # on :group_marked do |data| # You opened a group channel. # @see https://api.slack.com/events/group_open - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_open.json on :group_open do |data| groups[data.channel].is_open = true end # A private group was renamed. # @see https://api.slack.com/events/group_rename - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_rename.json on :group_rename do |data| channel = groups[data.channel.id] channel.name = data.channel.name if channel @@ -338,7 +338,7 @@ def initialize(attrs) # A private group was unarchived. # @see https://api.slack.com/events/group_unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/events/group_unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/group_unarchive.json on :group_unarchive do |data| channel = groups[data.channel] channel.is_archived = false if channel @@ -346,7 +346,7 @@ def initialize(attrs) # You closed a direct message channel. # @see https://api.slack.com/events/im_close - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_close.json on :im_close do |data| return unless ims && ims.key?(data.channel) ims[data.channel].is_open = false @@ -354,24 +354,24 @@ def initialize(attrs) # A direct message channel was created. # @see https://api.slack.com/events/im_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_created.json on :im_created do |data| ims[data.channel.id] = Models::Im.new(data.channel) end # Bulk updates were made to a DM channel's history. # @see https://api.slack.com/events/im_history_changed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_history_changed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_history_changed.json # on :im_history_changed do |data| # A direct message read marker was updated. # @see https://api.slack.com/events/im_marked - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_marked.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_marked.json # on :im_marked do |data| # You opened a direct message channel. # @see https://api.slack.com/events/im_open - # @see https://github.com/dblock/slack-api-ref/blob/master/events/im_open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/im_open.json on :im_open do |data| return unless ims && ims.key?(data.channel) ims[data.channel].is_open = true @@ -379,24 +379,24 @@ def initialize(attrs) # You manually updated your presence. # @see https://api.slack.com/events/manual_presence_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/manual_presence_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/manual_presence_change.json on :manual_presence_change do |data| self.self.presence = data.presence end # A pin was added to a channel. # @see https://api.slack.com/events/pin_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/pin_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pin_added.json # on :pin_added do |data| # A pin was removed from a channel. # @see https://api.slack.com/events/pin_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/pin_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pin_removed.json # on :pin_removed do |data| # You have updated your preferences. # @see https://api.slack.com/events/pref_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/pref_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/pref_change.json on :pref_change do |data| self.self.prefs ||= {} self.self.prefs[data.name] = data.value @@ -404,7 +404,7 @@ def initialize(attrs) # A team member's presence changed. # @see https://api.slack.com/events/presence_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/presence_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/presence_change.json on :presence_change do |data| user = users[data.user] user.presence = data.presence if user @@ -412,52 +412,52 @@ def initialize(attrs) # A team member has added an emoji reaction to an item. # @see https://api.slack.com/events/reaction_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/reaction_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reaction_added.json # on :reaction_added do |data| # A team member removed an emoji reaction. # @see https://api.slack.com/events/reaction_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/reaction_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reaction_removed.json # on :reaction_removed do |data| # Experimental. # @see https://api.slack.com/events/reconnect_url - # @see https://github.com/dblock/slack-api-ref/blob/master/events/reconnect_url.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/reconnect_url.json # on :reconnect_url do |data| # A team member has starred an item. # @see https://api.slack.com/events/star_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/star_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/star_added.json # on :star_added do |data| # A team member removed a star. # @see https://api.slack.com/events/star_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/star_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/star_removed.json # on :star_removed do |data| # A user group has been added to the team. # @see https://api.slack.com/events/subteam_created - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_created.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_created.json # on :subteam_created do |data| # You have been added to a user group. # @see https://api.slack.com/events/subteam_self_added - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_self_added.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_self_added.json # on :subteam_self_added do |data| # You have been removed from a user group. # @see https://api.slack.com/events/subteam_self_removed - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_self_removed.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_self_removed.json # on :subteam_self_removed do |data| # An existing user group has been updated or its members changed. # @see https://api.slack.com/events/subteam_updated - # @see https://github.com/dblock/slack-api-ref/blob/master/events/subteam_updated.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/subteam_updated.json # on :subteam_updated do |data| # The team domain has changed. # @see https://api.slack.com/events/team_domain_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_domain_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_domain_change.json on :team_domain_change do |data| team.url = data.url team.domain = data.domain @@ -465,26 +465,26 @@ def initialize(attrs) # A new team member has joined. # @see https://api.slack.com/events/team_join - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_join.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_join.json on :team_join do |data| users[data.user.id] = Models::User.new(data.user) end # The team is being migrated between servers. # @see https://api.slack.com/events/team_migration_started - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_migration_started.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_migration_started.json # on :team_migration_started do |data| # The team billing plan has changed. # @see https://api.slack.com/events/team_plan_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_plan_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_plan_change.json on :team_plan_change do |data| team.plan = data.plan end # A team preference has been updated. # @see https://api.slack.com/events/team_pref_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_pref_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_pref_change.json on :team_pref_change do |data| team.prefs ||= {} team.prefs[data.name] = data.value @@ -492,36 +492,36 @@ def initialize(attrs) # Team profile fields have been updated. # @see https://api.slack.com/events/team_profile_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_profile_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_change.json # on :team_profile_change do |data| # Team profile fields have been deleted. # @see https://api.slack.com/events/team_profile_delete - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_profile_delete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_delete.json # on :team_profile_delete do |data| # Team profile fields have been reordered. # @see https://api.slack.com/events/team_profile_reorder - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_profile_reorder.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_profile_reorder.json # on :team_profile_reorder do |data| # The team name has changed. # @see https://api.slack.com/events/team_rename - # @see https://github.com/dblock/slack-api-ref/blob/master/events/team_rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/team_rename.json on :team_rename do |data| team.name = data.name end # A team member's data has changed. # @see https://api.slack.com/events/user_change - # @see https://github.com/dblock/slack-api-ref/blob/master/events/user_change.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_change.json on :user_change do |data| users[data.user.id] = Models::User.new(data.user) end # A channel member is typing a message. # @see https://api.slack.com/events/user_typing - # @see https://github.com/dblock/slack-api-ref/blob/master/events/user_typing.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/events/user_typing.json # on :user_typing do |data| end end diff --git a/lib/slack/web/api/endpoints/api.rb b/lib/slack/web/api/endpoints/api.rb index 051eaab9..2184729b 100644 --- a/lib/slack/web/api/endpoints/api.rb +++ b/lib/slack/web/api/endpoints/api.rb @@ -13,7 +13,7 @@ module Api # @option options [Object] :foo # example property to return. # @see https://api.slack.com/methods/api.test - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/api/api.test.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/api/api.test.json def api_test(options = {}) post('api.test', options) end diff --git a/lib/slack/web/api/endpoints/apps_permissions.rb b/lib/slack/web/api/endpoints/apps_permissions.rb index 6c1e7673..b8b72dc7 100644 --- a/lib/slack/web/api/endpoints/apps_permissions.rb +++ b/lib/slack/web/api/endpoints/apps_permissions.rb @@ -9,7 +9,7 @@ module AppsPermissions # Returns list of permissions this app has on a team. # # @see https://api.slack.com/methods/apps.permissions.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/apps.permissions/apps.permissions.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.permissions/apps.permissions.info.json def apps_permissions_info(options = {}) post('apps.permissions.info', options) end @@ -22,7 +22,7 @@ def apps_permissions_info(options = {}) # @option options [Object] :trigger_id # Token used to trigger the permissions API. # @see https://api.slack.com/methods/apps.permissions.request - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/apps.permissions/apps.permissions.request.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.permissions/apps.permissions.request.json def apps_permissions_request(options = {}) throw ArgumentError.new('Required arguments :scopes missing') if options[:scopes].nil? throw ArgumentError.new('Required arguments :trigger_id missing') if options[:trigger_id].nil? diff --git a/lib/slack/web/api/endpoints/auth.rb b/lib/slack/web/api/endpoints/auth.rb index 52e715d6..c70b71e6 100644 --- a/lib/slack/web/api/endpoints/auth.rb +++ b/lib/slack/web/api/endpoints/auth.rb @@ -11,7 +11,7 @@ module Auth # @option options [Object] :test # Setting this parameter to 1 triggers a testing mode where the specified token will not actually be revoked. # @see https://api.slack.com/methods/auth.revoke - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/auth/auth.revoke.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth/auth.revoke.json def auth_revoke(options = {}) post('auth.revoke', options) end @@ -20,7 +20,7 @@ def auth_revoke(options = {}) # Checks authentication & identity. # # @see https://api.slack.com/methods/auth.test - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/auth/auth.test.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/auth/auth.test.json def auth_test(options = {}) post('auth.test', options) end diff --git a/lib/slack/web/api/endpoints/bots.rb b/lib/slack/web/api/endpoints/bots.rb index aa481277..10de46b3 100644 --- a/lib/slack/web/api/endpoints/bots.rb +++ b/lib/slack/web/api/endpoints/bots.rb @@ -11,7 +11,7 @@ module Bots # @option options [Object] :bot # Bot user to get info on. # @see https://api.slack.com/methods/bots.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/bots/bots.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/bots/bots.info.json def bots_info(options = {}) post('bots.info', options) end diff --git a/lib/slack/web/api/endpoints/channels.rb b/lib/slack/web/api/endpoints/channels.rb index 5804fe22..b0edf6e5 100644 --- a/lib/slack/web/api/endpoints/channels.rb +++ b/lib/slack/web/api/endpoints/channels.rb @@ -11,7 +11,7 @@ module Channels # @option options [channel] :channel # Channel to archive. # @see https://api.slack.com/methods/channels.archive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.archive.json def channels_archive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -26,7 +26,7 @@ def channels_archive(options = {}) # @option options [Object] :validate # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. # @see https://api.slack.com/methods/channels.create - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.create.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.create.json def channels_create(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('channels.create', options) @@ -46,7 +46,7 @@ def channels_create(options = {}) # @option options [Object] :unreads # Include unread_count_display in the output?. # @see https://api.slack.com/methods/channels.history - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.history.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.history.json def channels_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -61,7 +61,7 @@ def channels_history(options = {}) # @option options [Object] :include_locale # Set this to true to receive the locale for this channel. Defaults to false. # @see https://api.slack.com/methods/channels.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.info.json def channels_info(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -76,7 +76,7 @@ def channels_info(options = {}) # @option options [user] :user # User to invite to channel. # @see https://api.slack.com/methods/channels.invite - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.invite.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.invite.json def channels_invite(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? @@ -93,7 +93,7 @@ def channels_invite(options = {}) # @option options [Object] :validate # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. # @see https://api.slack.com/methods/channels.join - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.join.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.join.json def channels_join(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('channels.join', options) @@ -107,7 +107,7 @@ def channels_join(options = {}) # @option options [user] :user # User to remove from channel. # @see https://api.slack.com/methods/channels.kick - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.kick.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.kick.json def channels_kick(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? @@ -122,7 +122,7 @@ def channels_kick(options = {}) # @option options [channel] :channel # Channel to leave. # @see https://api.slack.com/methods/channels.leave - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.leave.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.leave.json def channels_leave(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -141,7 +141,7 @@ def channels_leave(options = {}) # @option options [Object] :limit # 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. # @see https://api.slack.com/methods/channels.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.list.json def channels_list(options = {}) if block_given? Pagination::Cursor.new(self, :channels_list, options).each do |page| @@ -160,7 +160,7 @@ def channels_list(options = {}) # @option options [timestamp] :ts # Timestamp of the most recently seen message. # @see https://api.slack.com/methods/channels.mark - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.mark.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.mark.json def channels_mark(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -178,7 +178,7 @@ def channels_mark(options = {}) # @option options [Object] :validate # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. # @see https://api.slack.com/methods/channels.rename - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.rename.json def channels_rename(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? @@ -194,7 +194,7 @@ def channels_rename(options = {}) # @option options [Object] :thread_ts # Unique identifier of a thread's parent message. # @see https://api.slack.com/methods/channels.replies - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.replies.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.replies.json def channels_replies(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil? @@ -210,7 +210,7 @@ def channels_replies(options = {}) # @option options [Object] :purpose # The new purpose. # @see https://api.slack.com/methods/channels.setPurpose - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.setPurpose.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.setPurpose.json def channels_setPurpose(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :purpose missing') if options[:purpose].nil? @@ -226,7 +226,7 @@ def channels_setPurpose(options = {}) # @option options [Object] :topic # The new topic. # @see https://api.slack.com/methods/channels.setTopic - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.setTopic.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.setTopic.json def channels_setTopic(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :topic missing') if options[:topic].nil? @@ -240,7 +240,7 @@ def channels_setTopic(options = {}) # @option options [channel] :channel # Channel to unarchive. # @see https://api.slack.com/methods/channels.unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/channels/channels.unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/channels/channels.unarchive.json def channels_unarchive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] diff --git a/lib/slack/web/api/endpoints/chat.rb b/lib/slack/web/api/endpoints/chat.rb index 8d1593ca..22848b6e 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -15,7 +15,7 @@ module Chat # @option options [Object] :as_user # Pass true to delete the message as the authed user. Bot users in this context are considered authed users. # @see https://api.slack.com/methods/chat.delete - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.delete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.delete.json def chat_delete(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -31,7 +31,7 @@ def chat_delete(options = {}) # @option options [Object] :text # Text of the message to send. # @see https://api.slack.com/methods/chat.meMessage - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.meMessage.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.meMessage.json def chat_meMessage(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? @@ -56,7 +56,7 @@ def chat_meMessage(options = {}) # @option options [Object] :parse # Change how messages are treated. Defaults to none. See below. # @see https://api.slack.com/methods/chat.postEphemeral - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postEphemeral.json def chat_postEphemeral(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? @@ -101,7 +101,7 @@ def chat_postEphemeral(options = {}) # @option options [Object] :username # Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. # @see https://api.slack.com/methods/chat.postMessage - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.postMessage.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json def chat_postMessage(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :text or :attachments missing') if options[:text].nil? && options[:attachments].nil? @@ -130,7 +130,7 @@ def chat_postMessage(options = {}) # @option options [Object] :user_auth_url # Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded. # @see https://api.slack.com/methods/chat.unfurl - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.unfurl.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.unfurl.json def chat_unfurl(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -157,7 +157,7 @@ def chat_unfurl(options = {}) # @option options [Object] :parse # Change how messages are treated. Defaults to client, unlike chat.postMessage. See below. # @see https://api.slack.com/methods/chat.update - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.update.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.update.json def chat_update(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :text or :attachments missing') if options[:text].nil? && options[:attachments].nil? diff --git a/lib/slack/web/api/endpoints/conversations.rb b/lib/slack/web/api/endpoints/conversations.rb index 6b9ab09f..9aafc628 100644 --- a/lib/slack/web/api/endpoints/conversations.rb +++ b/lib/slack/web/api/endpoints/conversations.rb @@ -11,7 +11,7 @@ module Conversations # @option options [channel] :channel # ID of conversation to archive. # @see https://api.slack.com/methods/conversations.archive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.archive.json def conversations_archive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -24,7 +24,7 @@ def conversations_archive(options = {}) # @option options [channel] :channel # Conversation to close. # @see https://api.slack.com/methods/conversations.close - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.close.json def conversations_close(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -39,7 +39,7 @@ def conversations_close(options = {}) # @option options [Object] :is_private # Create a private channel instead of a public one. # @see https://api.slack.com/methods/conversations.create - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.create.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.create.json def conversations_create(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('conversations.create', options) @@ -59,7 +59,7 @@ def conversations_create(options = {}) # @option options [timestamp] :oldest # Start of time range of messages to include in results. # @see https://api.slack.com/methods/conversations.history - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.history.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.history.json def conversations_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -80,7 +80,7 @@ def conversations_history(options = {}) # @option options [Object] :include_locale # Set this to true to receive the locale for this conversation. Defaults to false. # @see https://api.slack.com/methods/conversations.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.info.json def conversations_info(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -95,7 +95,7 @@ def conversations_info(options = {}) # @option options [Object] :users # A comma separated list of user IDs. Up to 30 users may be listed. # @see https://api.slack.com/methods/conversations.invite - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.invite.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.invite.json def conversations_invite(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :users missing') if options[:users].nil? @@ -109,7 +109,7 @@ def conversations_invite(options = {}) # @option options [channel] :channel # ID of conversation to join. # @see https://api.slack.com/methods/conversations.join - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.join.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.join.json def conversations_join(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -124,7 +124,7 @@ def conversations_join(options = {}) # @option options [user] :user # User ID to be removed. # @see https://api.slack.com/methods/conversations.kick - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.kick.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.kick.json def conversations_kick(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? @@ -139,7 +139,7 @@ def conversations_kick(options = {}) # @option options [channel] :channel # Conversation to leave. # @see https://api.slack.com/methods/conversations.leave - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.leave.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.leave.json def conversations_leave(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -158,7 +158,7 @@ def conversations_leave(options = {}) # @option options [Object] :types # Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im. # @see https://api.slack.com/methods/conversations.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.list.json def conversations_list(options = {}) if block_given? Pagination::Cursor.new(self, :conversations_list, options).each do |page| @@ -179,7 +179,7 @@ def conversations_list(options = {}) # @option options [Object] :limit # 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. # @see https://api.slack.com/methods/conversations.members - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.members.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.members.json def conversations_members(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -202,7 +202,7 @@ def conversations_members(options = {}) # @option options [Object] :users # Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users. # @see https://api.slack.com/methods/conversations.open - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.open.json def conversations_open(options = {}) options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('conversations.open', options) @@ -216,7 +216,7 @@ def conversations_open(options = {}) # @option options [Object] :name # New name for conversation. # @see https://api.slack.com/methods/conversations.rename - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.rename.json def conversations_rename(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? @@ -236,7 +236,7 @@ def conversations_rename(options = {}) # @option options [Object] :limit # 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. # @see https://api.slack.com/methods/conversations.replies - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.replies.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.replies.json def conversations_replies(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -258,7 +258,7 @@ def conversations_replies(options = {}) # @option options [Object] :purpose # A new, specialer purpose. # @see https://api.slack.com/methods/conversations.setPurpose - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.setPurpose.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.setPurpose.json def conversations_setPurpose(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :purpose missing') if options[:purpose].nil? @@ -274,7 +274,7 @@ def conversations_setPurpose(options = {}) # @option options [Object] :topic # The new topic string. Does not support formatting or linkification. # @see https://api.slack.com/methods/conversations.setTopic - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.setTopic.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.setTopic.json def conversations_setTopic(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :topic missing') if options[:topic].nil? @@ -288,7 +288,7 @@ def conversations_setTopic(options = {}) # @option options [channel] :channel # ID of conversation to unarchive. # @see https://api.slack.com/methods/conversations.unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/conversations/conversations.unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.unarchive.json def conversations_unarchive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] diff --git a/lib/slack/web/api/endpoints/dialog.rb b/lib/slack/web/api/endpoints/dialog.rb index d017adf8..4bebf730 100644 --- a/lib/slack/web/api/endpoints/dialog.rb +++ b/lib/slack/web/api/endpoints/dialog.rb @@ -13,7 +13,7 @@ module Dialog # @option options [Object] :trigger_id # Exchange a trigger to post to the user. # @see https://api.slack.com/methods/dialog.open - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dialog/dialog.open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dialog/dialog.open.json def dialog_open(options = {}) throw ArgumentError.new('Required arguments :dialog missing') if options[:dialog].nil? throw ArgumentError.new('Required arguments :trigger_id missing') if options[:trigger_id].nil? diff --git a/lib/slack/web/api/endpoints/dnd.rb b/lib/slack/web/api/endpoints/dnd.rb index 70d0ba38..8ea6acaf 100644 --- a/lib/slack/web/api/endpoints/dnd.rb +++ b/lib/slack/web/api/endpoints/dnd.rb @@ -9,7 +9,7 @@ module Dnd # Ends the current user's Do Not Disturb session immediately. # # @see https://api.slack.com/methods/dnd.endDnd - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.endDnd.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.endDnd.json def dnd_endDnd(options = {}) post('dnd.endDnd', options) end @@ -18,7 +18,7 @@ def dnd_endDnd(options = {}) # Ends the current user's snooze mode immediately. # # @see https://api.slack.com/methods/dnd.endSnooze - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.endSnooze.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.endSnooze.json def dnd_endSnooze(options = {}) post('dnd.endSnooze', options) end @@ -29,7 +29,7 @@ def dnd_endSnooze(options = {}) # @option options [user] :user # User to fetch status for (defaults to current user). # @see https://api.slack.com/methods/dnd.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.info.json def dnd_info(options = {}) options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('dnd.info', options) @@ -41,7 +41,7 @@ def dnd_info(options = {}) # @option options [Object] :num_minutes # Number of minutes, from now, to snooze until. # @see https://api.slack.com/methods/dnd.setSnooze - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json def dnd_setSnooze(options = {}) throw ArgumentError.new('Required arguments :num_minutes missing') if options[:num_minutes].nil? post('dnd.setSnooze', options) @@ -53,7 +53,7 @@ def dnd_setSnooze(options = {}) # @option options [Object] :users # Comma-separated list of users to fetch Do Not Disturb status for. # @see https://api.slack.com/methods/dnd.teamInfo - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/dnd/dnd.teamInfo.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.teamInfo.json def dnd_teamInfo(options = {}) post('dnd.teamInfo', options) end diff --git a/lib/slack/web/api/endpoints/emoji.rb b/lib/slack/web/api/endpoints/emoji.rb index 25819108..0638264a 100644 --- a/lib/slack/web/api/endpoints/emoji.rb +++ b/lib/slack/web/api/endpoints/emoji.rb @@ -9,7 +9,7 @@ module Emoji # Lists custom emoji for a team. # # @see https://api.slack.com/methods/emoji.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/emoji/emoji.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/emoji/emoji.list.json def emoji_list(options = {}) post('emoji.list', options) end diff --git a/lib/slack/web/api/endpoints/files.rb b/lib/slack/web/api/endpoints/files.rb index e6a875a4..032007ef 100644 --- a/lib/slack/web/api/endpoints/files.rb +++ b/lib/slack/web/api/endpoints/files.rb @@ -11,7 +11,7 @@ module Files # @option options [file] :file # ID of file to delete. # @see https://api.slack.com/methods/files.delete - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.delete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.delete.json def files_delete(options = {}) throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? post('files.delete', options) @@ -23,7 +23,7 @@ def files_delete(options = {}) # @option options [file] :file # Specify a file by providing its ID. # @see https://api.slack.com/methods/files.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.info.json def files_info(options = {}) throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? post('files.info', options) @@ -55,7 +55,7 @@ def files_info(options = {}) # @option options [user] :user # Filter files created by a single user. # @see https://api.slack.com/methods/files.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.list.json def files_list(options = {}) options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] options = options.merge(user: users_id(options)['user']['id']) if options[:user] @@ -68,7 +68,7 @@ def files_list(options = {}) # @option options [file] :file # File to revoke. # @see https://api.slack.com/methods/files.revokePublicURL - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.revokePublicURL.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.revokePublicURL.json def files_revokePublicURL(options = {}) throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? post('files.revokePublicURL', options) @@ -80,7 +80,7 @@ def files_revokePublicURL(options = {}) # @option options [file] :file # File to share. # @see https://api.slack.com/methods/files.sharedPublicURL - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.sharedPublicURL.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.sharedPublicURL.json def files_sharedPublicURL(options = {}) throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? post('files.sharedPublicURL', options) @@ -104,7 +104,7 @@ def files_sharedPublicURL(options = {}) # @option options [Object] :title # Title of file. # @see https://api.slack.com/methods/files.upload - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files/files.upload.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files/files.upload.json def files_upload(options = {}) post('files.upload', options) end diff --git a/lib/slack/web/api/endpoints/files_comments.rb b/lib/slack/web/api/endpoints/files_comments.rb index 4a619cb3..64b5d285 100644 --- a/lib/slack/web/api/endpoints/files_comments.rb +++ b/lib/slack/web/api/endpoints/files_comments.rb @@ -13,7 +13,7 @@ module FilesComments # @option options [file] :file # File to add a comment to. # @see https://api.slack.com/methods/files.comments.add - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.comments/files.comments.add.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.add.json def files_comments_add(options = {}) throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil? throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? @@ -28,7 +28,7 @@ def files_comments_add(options = {}) # @option options [Object] :id # The comment to delete. # @see https://api.slack.com/methods/files.comments.delete - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.comments/files.comments.delete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.delete.json def files_comments_delete(options = {}) throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? throw ArgumentError.new('Required arguments :id missing') if options[:id].nil? @@ -45,7 +45,7 @@ def files_comments_delete(options = {}) # @option options [Object] :id # The comment to edit. # @see https://api.slack.com/methods/files.comments.edit - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/files.comments/files.comments.edit.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/files.comments/files.comments.edit.json def files_comments_edit(options = {}) throw ArgumentError.new('Required arguments :comment missing') if options[:comment].nil? throw ArgumentError.new('Required arguments :file missing') if options[:file].nil? diff --git a/lib/slack/web/api/endpoints/groups.rb b/lib/slack/web/api/endpoints/groups.rb index 546b7e0a..331d1ec2 100644 --- a/lib/slack/web/api/endpoints/groups.rb +++ b/lib/slack/web/api/endpoints/groups.rb @@ -11,7 +11,7 @@ module Groups # @option options [group] :channel # Private channel to archive. # @see https://api.slack.com/methods/groups.archive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.archive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.archive.json def groups_archive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] @@ -26,7 +26,7 @@ def groups_archive(options = {}) # @option options [Object] :validate # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. # @see https://api.slack.com/methods/groups.create - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.create.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.create.json def groups_create(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('groups.create', options) @@ -38,7 +38,7 @@ def groups_create(options = {}) # @option options [group] :channel # Private channel to clone and archive. # @see https://api.slack.com/methods/groups.createChild - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.createChild.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.createChild.json def groups_createChild(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] @@ -59,7 +59,7 @@ def groups_createChild(options = {}) # @option options [Object] :unreads # Include unread_count_display in the output?. # @see https://api.slack.com/methods/groups.history - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.history.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.history.json def groups_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] @@ -74,7 +74,7 @@ def groups_history(options = {}) # @option options [Object] :include_locale # Set this to true to receive the locale for this group. Defaults to false. # @see https://api.slack.com/methods/groups.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.info.json def groups_info(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] @@ -89,7 +89,7 @@ def groups_info(options = {}) # @option options [user] :user # User to invite. # @see https://api.slack.com/methods/groups.invite - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.invite.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.invite.json def groups_invite(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? @@ -106,7 +106,7 @@ def groups_invite(options = {}) # @option options [user] :user # User to remove from private channel. # @see https://api.slack.com/methods/groups.kick - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.kick.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.kick.json def groups_kick(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? @@ -121,7 +121,7 @@ def groups_kick(options = {}) # @option options [group] :channel # Private channel to leave. # @see https://api.slack.com/methods/groups.leave - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.leave.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.leave.json def groups_leave(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] @@ -136,7 +136,7 @@ def groups_leave(options = {}) # @option options [Object] :exclude_members # Exlude the members from each group. # @see https://api.slack.com/methods/groups.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.list.json def groups_list(options = {}) post('groups.list', options) end @@ -149,7 +149,7 @@ def groups_list(options = {}) # @option options [timestamp] :ts # Timestamp of the most recently seen message. # @see https://api.slack.com/methods/groups.mark - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.mark.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.mark.json def groups_mark(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -163,7 +163,7 @@ def groups_mark(options = {}) # @option options [group] :channel # Private channel to open. # @see https://api.slack.com/methods/groups.open - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.open.json def groups_open(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] @@ -180,7 +180,7 @@ def groups_open(options = {}) # @option options [Object] :validate # Whether to return errors on invalid channel name instead of modifying it to meet the specified criteria. # @see https://api.slack.com/methods/groups.rename - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.rename.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.rename.json def groups_rename(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? @@ -196,7 +196,7 @@ def groups_rename(options = {}) # @option options [Object] :thread_ts # Unique identifier of a thread's parent message. # @see https://api.slack.com/methods/groups.replies - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.replies.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.replies.json def groups_replies(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil? @@ -212,7 +212,7 @@ def groups_replies(options = {}) # @option options [Object] :purpose # The new purpose. # @see https://api.slack.com/methods/groups.setPurpose - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.setPurpose.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.setPurpose.json def groups_setPurpose(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :purpose missing') if options[:purpose].nil? @@ -228,7 +228,7 @@ def groups_setPurpose(options = {}) # @option options [Object] :topic # The new topic. # @see https://api.slack.com/methods/groups.setTopic - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.setTopic.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.setTopic.json def groups_setTopic(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :topic missing') if options[:topic].nil? @@ -242,7 +242,7 @@ def groups_setTopic(options = {}) # @option options [group] :channel # Private channel to unarchive. # @see https://api.slack.com/methods/groups.unarchive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/groups/groups.unarchive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.unarchive.json def groups_unarchive(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel] diff --git a/lib/slack/web/api/endpoints/im.rb b/lib/slack/web/api/endpoints/im.rb index 63d2e841..89dddfc2 100644 --- a/lib/slack/web/api/endpoints/im.rb +++ b/lib/slack/web/api/endpoints/im.rb @@ -11,7 +11,7 @@ module Im # @option options [im] :channel # Direct message channel to close. # @see https://api.slack.com/methods/im.close - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.close.json def im_close(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -32,7 +32,7 @@ def im_close(options = {}) # @option options [Object] :unreads # Include unread_count_display in the output?. # @see https://api.slack.com/methods/im.history - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.history.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.history.json def im_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -47,7 +47,7 @@ def im_history(options = {}) # @option options [Object] :limit # 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. # @see https://api.slack.com/methods/im.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.list.json def im_list(options = {}) if block_given? Pagination::Cursor.new(self, :im_list, options).each do |page| @@ -66,7 +66,7 @@ def im_list(options = {}) # @option options [timestamp] :ts # Timestamp of the most recently seen message. # @see https://api.slack.com/methods/im.mark - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.mark.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.mark.json def im_mark(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -84,7 +84,7 @@ def im_mark(options = {}) # @option options [Object] :return_im # Boolean, indicates you want the full IM channel definition in the response. # @see https://api.slack.com/methods/im.open - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.open.json def im_open(options = {}) throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? options = options.merge(user: users_id(options)['user']['id']) if options[:user] @@ -99,7 +99,7 @@ def im_open(options = {}) # @option options [Object] :thread_ts # Unique identifier of a thread's parent message. # @see https://api.slack.com/methods/im.replies - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/im/im.replies.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/im/im.replies.json def im_replies(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil? diff --git a/lib/slack/web/api/endpoints/mpim.rb b/lib/slack/web/api/endpoints/mpim.rb index 35563c8e..33ffe73e 100644 --- a/lib/slack/web/api/endpoints/mpim.rb +++ b/lib/slack/web/api/endpoints/mpim.rb @@ -11,7 +11,7 @@ module Mpim # @option options [channel] :channel # MPIM to close. # @see https://api.slack.com/methods/mpim.close - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.close.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.close.json def mpim_close(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -32,7 +32,7 @@ def mpim_close(options = {}) # @option options [Object] :unreads # Include unread_count_display in the output?. # @see https://api.slack.com/methods/mpim.history - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.history.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.history.json def mpim_history(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -43,7 +43,7 @@ def mpim_history(options = {}) # Lists multiparty direct message channels for the calling user. # # @see https://api.slack.com/methods/mpim.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.list.json def mpim_list(options = {}) post('mpim.list', options) end @@ -56,7 +56,7 @@ def mpim_list(options = {}) # @option options [timestamp] :ts # Timestamp of the most recently seen message. # @see https://api.slack.com/methods/mpim.mark - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.mark.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.mark.json def mpim_mark(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :ts missing') if options[:ts].nil? @@ -70,7 +70,7 @@ def mpim_mark(options = {}) # @option options [Object] :users # Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned. # @see https://api.slack.com/methods/mpim.open - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.open.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.open.json def mpim_open(options = {}) throw ArgumentError.new('Required arguments :users missing') if options[:users].nil? post('mpim.open', options) @@ -84,7 +84,7 @@ def mpim_open(options = {}) # @option options [Object] :thread_ts # Unique identifier of a thread's parent message. # @see https://api.slack.com/methods/mpim.replies - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/mpim/mpim.replies.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/mpim/mpim.replies.json def mpim_replies(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? throw ArgumentError.new('Required arguments :thread_ts missing') if options[:thread_ts].nil? diff --git a/lib/slack/web/api/endpoints/oauth.rb b/lib/slack/web/api/endpoints/oauth.rb index b3aa9e03..d14b0a72 100644 --- a/lib/slack/web/api/endpoints/oauth.rb +++ b/lib/slack/web/api/endpoints/oauth.rb @@ -17,7 +17,7 @@ module Oauth # @option options [Object] :redirect_uri # This must match the originally submitted URI (if one was sent). # @see https://api.slack.com/methods/oauth.access - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/oauth/oauth.access.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth/oauth.access.json def oauth_access(options = {}) throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil? throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil? @@ -39,7 +39,7 @@ def oauth_access(options = {}) # @option options [Object] :single_channel # Request the user to add your app only to a single channel. # @see https://api.slack.com/methods/oauth.token - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/oauth/oauth.token.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth/oauth.token.json def oauth_token(options = {}) throw ArgumentError.new('Required arguments :client_id missing') if options[:client_id].nil? throw ArgumentError.new('Required arguments :client_secret missing') if options[:client_secret].nil? diff --git a/lib/slack/web/api/endpoints/pins.rb b/lib/slack/web/api/endpoints/pins.rb index 50dcc391..235677eb 100644 --- a/lib/slack/web/api/endpoints/pins.rb +++ b/lib/slack/web/api/endpoints/pins.rb @@ -17,7 +17,7 @@ module Pins # @option options [Object] :timestamp # Timestamp of the message to pin. # @see https://api.slack.com/methods/pins.add - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/pins/pins.add.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.add.json def pins_add(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -30,7 +30,7 @@ def pins_add(options = {}) # @option options [channel] :channel # Channel to get pinned items for. # @see https://api.slack.com/methods/pins.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/pins/pins.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.list.json def pins_list(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -49,7 +49,7 @@ def pins_list(options = {}) # @option options [Object] :timestamp # Timestamp of the message to un-pin. # @see https://api.slack.com/methods/pins.remove - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/pins/pins.remove.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/pins/pins.remove.json def pins_remove(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] diff --git a/lib/slack/web/api/endpoints/presence.rb b/lib/slack/web/api/endpoints/presence.rb index 92e55a49..33f411ec 100644 --- a/lib/slack/web/api/endpoints/presence.rb +++ b/lib/slack/web/api/endpoints/presence.rb @@ -11,7 +11,7 @@ module Presence # @option options [Object] :presence # Either `active` or `away`. # @see https://api.slack.com/methods/presence.set - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/presence.set.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/presence.set.json def presence_set(options = {}) throw ArgumentError.new('Required arguments :presence missing') if options[:presence].nil? post('presence.set', options) diff --git a/lib/slack/web/api/endpoints/reactions.rb b/lib/slack/web/api/endpoints/reactions.rb index e848a9dd..f08a42e3 100644 --- a/lib/slack/web/api/endpoints/reactions.rb +++ b/lib/slack/web/api/endpoints/reactions.rb @@ -19,7 +19,7 @@ module Reactions # @option options [Object] :timestamp # Timestamp of the message to add reaction to. # @see https://api.slack.com/methods/reactions.add - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reactions/reactions.add.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.add.json def reactions_add(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] @@ -40,7 +40,7 @@ def reactions_add(options = {}) # @option options [Object] :timestamp # Timestamp of the message to get reactions for. # @see https://api.slack.com/methods/reactions.get - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reactions/reactions.get.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.get.json def reactions_get(options = {}) options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('reactions.get', options) @@ -54,7 +54,7 @@ def reactions_get(options = {}) # @option options [user] :user # Show reactions made by this user. Defaults to the authed user. # @see https://api.slack.com/methods/reactions.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reactions/reactions.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.list.json def reactions_list(options = {}) options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('reactions.list', options) @@ -74,7 +74,7 @@ def reactions_list(options = {}) # @option options [Object] :timestamp # Timestamp of the message to remove reaction from. # @see https://api.slack.com/methods/reactions.remove - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reactions/reactions.remove.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reactions/reactions.remove.json def reactions_remove(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] diff --git a/lib/slack/web/api/endpoints/reminders.rb b/lib/slack/web/api/endpoints/reminders.rb index ee58e2ec..1684e712 100644 --- a/lib/slack/web/api/endpoints/reminders.rb +++ b/lib/slack/web/api/endpoints/reminders.rb @@ -15,7 +15,7 @@ module Reminders # @option options [user] :user # The user who will receive the reminder. If no user is specified, the reminder will go to user who created it. # @see https://api.slack.com/methods/reminders.add - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reminders/reminders.add.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.add.json def reminders_add(options = {}) throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? throw ArgumentError.new('Required arguments :time missing') if options[:time].nil? @@ -29,7 +29,7 @@ def reminders_add(options = {}) # @option options [Object] :reminder # The ID of the reminder to be marked as complete. # @see https://api.slack.com/methods/reminders.complete - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reminders/reminders.complete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.complete.json def reminders_complete(options = {}) throw ArgumentError.new('Required arguments :reminder missing') if options[:reminder].nil? post('reminders.complete', options) @@ -41,7 +41,7 @@ def reminders_complete(options = {}) # @option options [Object] :reminder # The ID of the reminder. # @see https://api.slack.com/methods/reminders.delete - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reminders/reminders.delete.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.delete.json def reminders_delete(options = {}) throw ArgumentError.new('Required arguments :reminder missing') if options[:reminder].nil? post('reminders.delete', options) @@ -53,7 +53,7 @@ def reminders_delete(options = {}) # @option options [Object] :reminder # The ID of the reminder. # @see https://api.slack.com/methods/reminders.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reminders/reminders.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.info.json def reminders_info(options = {}) throw ArgumentError.new('Required arguments :reminder missing') if options[:reminder].nil? post('reminders.info', options) @@ -63,7 +63,7 @@ def reminders_info(options = {}) # Lists all reminders created by or for a given user. # # @see https://api.slack.com/methods/reminders.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/reminders/reminders.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/reminders/reminders.list.json def reminders_list(options = {}) post('reminders.list', options) end diff --git a/lib/slack/web/api/endpoints/rtm.rb b/lib/slack/web/api/endpoints/rtm.rb index 8825c708..164264c1 100644 --- a/lib/slack/web/api/endpoints/rtm.rb +++ b/lib/slack/web/api/endpoints/rtm.rb @@ -13,7 +13,7 @@ module Rtm # @option options [Object] :presence_sub # Only deliver presence events when requested by subscription. See presence subscriptions. # @see https://api.slack.com/methods/rtm.connect - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/rtm/rtm.connect.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/rtm/rtm.connect.json def rtm_connect(options = {}) post('rtm.connect', options) end @@ -36,7 +36,7 @@ def rtm_connect(options = {}) # @option options [Object] :simple_latest # Return timestamp only for latest message object of each channel (improves performance). # @see https://api.slack.com/methods/rtm.start - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/rtm/rtm.start.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/rtm/rtm.start.json def rtm_start(options = {}) post('rtm.start', options) end diff --git a/lib/slack/web/api/endpoints/search.rb b/lib/slack/web/api/endpoints/search.rb index 99badc79..4b0e31bd 100644 --- a/lib/slack/web/api/endpoints/search.rb +++ b/lib/slack/web/api/endpoints/search.rb @@ -17,7 +17,7 @@ module Search # @option options [Object] :sort_dir # Change sort direction to ascending (asc) or descending (desc). # @see https://api.slack.com/methods/search.all - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/search/search.all.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.all.json def search_all(options = {}) throw ArgumentError.new('Required arguments :query missing') if options[:query].nil? post('search.all', options) @@ -35,7 +35,7 @@ def search_all(options = {}) # @option options [Object] :sort_dir # Change sort direction to ascending (asc) or descending (desc). # @see https://api.slack.com/methods/search.files - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/search/search.files.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.files.json def search_files(options = {}) throw ArgumentError.new('Required arguments :query missing') if options[:query].nil? post('search.files', options) @@ -53,7 +53,7 @@ def search_files(options = {}) # @option options [Object] :sort_dir # Change sort direction to ascending (asc) or descending (desc). # @see https://api.slack.com/methods/search.messages - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/search/search.messages.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/search/search.messages.json def search_messages(options = {}) throw ArgumentError.new('Required arguments :query missing') if options[:query].nil? post('search.messages', options) diff --git a/lib/slack/web/api/endpoints/stars.rb b/lib/slack/web/api/endpoints/stars.rb index c0a666a7..8a5c3650 100644 --- a/lib/slack/web/api/endpoints/stars.rb +++ b/lib/slack/web/api/endpoints/stars.rb @@ -17,7 +17,7 @@ module Stars # @option options [Object] :timestamp # Timestamp of the message to add star to. # @see https://api.slack.com/methods/stars.add - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/stars/stars.add.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.add.json def stars_add(options = {}) options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('stars.add', options) @@ -27,7 +27,7 @@ def stars_add(options = {}) # Lists stars for a user. # # @see https://api.slack.com/methods/stars.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/stars/stars.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.list.json def stars_list(options = {}) post('stars.list', options) end @@ -44,7 +44,7 @@ def stars_list(options = {}) # @option options [Object] :timestamp # Timestamp of the message to remove star from. # @see https://api.slack.com/methods/stars.remove - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/stars/stars.remove.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/stars/stars.remove.json def stars_remove(options = {}) options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel] post('stars.remove', options) diff --git a/lib/slack/web/api/endpoints/team.rb b/lib/slack/web/api/endpoints/team.rb index 3cada4a3..63598df9 100644 --- a/lib/slack/web/api/endpoints/team.rb +++ b/lib/slack/web/api/endpoints/team.rb @@ -11,7 +11,7 @@ module Team # @option options [Object] :before # End of time range of logs to include in results (inclusive). # @see https://api.slack.com/methods/team.accessLogs - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/team/team.accessLogs.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.accessLogs.json def team_accessLogs(options = {}) post('team.accessLogs', options) end @@ -22,7 +22,7 @@ def team_accessLogs(options = {}) # @option options [user] :user # A user to retrieve the billable information for. Defaults to all users. # @see https://api.slack.com/methods/team.billableInfo - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/team/team.billableInfo.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.billableInfo.json def team_billableInfo(options = {}) options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('team.billableInfo', options) @@ -32,7 +32,7 @@ def team_billableInfo(options = {}) # Gets information about the current team. # # @see https://api.slack.com/methods/team.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/team/team.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.info.json def team_info(options = {}) post('team.info', options) end @@ -49,7 +49,7 @@ def team_info(options = {}) # @option options [user] :user # Filter logs generated by this user's actions. Defaults to all logs. # @see https://api.slack.com/methods/team.integrationLogs - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/team/team.integrationLogs.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team/team.integrationLogs.json def team_integrationLogs(options = {}) options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('team.integrationLogs', options) diff --git a/lib/slack/web/api/endpoints/team_profile.rb b/lib/slack/web/api/endpoints/team_profile.rb index 07314c1e..79d68837 100644 --- a/lib/slack/web/api/endpoints/team_profile.rb +++ b/lib/slack/web/api/endpoints/team_profile.rb @@ -11,7 +11,7 @@ module TeamProfile # @option options [Object] :visibility # Filter by visibility. # @see https://api.slack.com/methods/team.profile.get - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/team.profile/team.profile.get.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.profile/team.profile.get.json def team_profile_get(options = {}) post('team.profile.get', options) end diff --git a/lib/slack/web/api/endpoints/usergroups.rb b/lib/slack/web/api/endpoints/usergroups.rb index 54824d5a..d56f1f2a 100644 --- a/lib/slack/web/api/endpoints/usergroups.rb +++ b/lib/slack/web/api/endpoints/usergroups.rb @@ -19,7 +19,7 @@ module Usergroups # @option options [Object] :include_count # Include the number of users in each User Group. # @see https://api.slack.com/methods/usergroups.create - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups/usergroups.create.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.create.json def usergroups_create(options = {}) throw ArgumentError.new('Required arguments :name missing') if options[:name].nil? post('usergroups.create', options) @@ -33,7 +33,7 @@ def usergroups_create(options = {}) # @option options [Object] :include_count # Include the number of users in the User Group. # @see https://api.slack.com/methods/usergroups.disable - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups/usergroups.disable.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.disable.json def usergroups_disable(options = {}) throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? post('usergroups.disable', options) @@ -47,7 +47,7 @@ def usergroups_disable(options = {}) # @option options [Object] :include_count # Include the number of users in the User Group. # @see https://api.slack.com/methods/usergroups.enable - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups/usergroups.enable.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.enable.json def usergroups_enable(options = {}) throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? post('usergroups.enable', options) @@ -63,7 +63,7 @@ def usergroups_enable(options = {}) # @option options [Object] :include_users # Include the list of users for each User Group. # @see https://api.slack.com/methods/usergroups.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups/usergroups.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.list.json def usergroups_list(options = {}) post('usergroups.list', options) end @@ -84,7 +84,7 @@ def usergroups_list(options = {}) # @option options [Object] :name # A name for the User Group. Must be unique among User Groups. # @see https://api.slack.com/methods/usergroups.update - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups/usergroups.update.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups/usergroups.update.json def usergroups_update(options = {}) throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? post('usergroups.update', options) diff --git a/lib/slack/web/api/endpoints/usergroups_users.rb b/lib/slack/web/api/endpoints/usergroups_users.rb index 377782e0..4b40293f 100644 --- a/lib/slack/web/api/endpoints/usergroups_users.rb +++ b/lib/slack/web/api/endpoints/usergroups_users.rb @@ -13,7 +13,7 @@ module UsergroupsUsers # @option options [Object] :include_disabled # Allow results that involve disabled User Groups. # @see https://api.slack.com/methods/usergroups.users.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.list.json def usergroups_users_list(options = {}) throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? post('usergroups.users.list', options) @@ -29,7 +29,7 @@ def usergroups_users_list(options = {}) # @option options [Object] :include_count # Include the number of users in the User Group. # @see https://api.slack.com/methods/usergroups.users.update - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.update.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/usergroups.users/usergroups.users.update.json def usergroups_users_update(options = {}) throw ArgumentError.new('Required arguments :usergroup missing') if options[:usergroup].nil? throw ArgumentError.new('Required arguments :users missing') if options[:users].nil? diff --git a/lib/slack/web/api/endpoints/users.rb b/lib/slack/web/api/endpoints/users.rb index c2bbe7d9..a6a7aea5 100644 --- a/lib/slack/web/api/endpoints/users.rb +++ b/lib/slack/web/api/endpoints/users.rb @@ -9,7 +9,7 @@ module Users # Delete the user profile photo # # @see https://api.slack.com/methods/users.deletePhoto - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.deletePhoto.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.deletePhoto.json def users_deletePhoto(options = {}) post('users.deletePhoto', options) end @@ -20,7 +20,7 @@ def users_deletePhoto(options = {}) # @option options [user] :user # User to get presence info on. Defaults to the authed user. # @see https://api.slack.com/methods/users.getPresence - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.getPresence.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.getPresence.json def users_getPresence(options = {}) throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? options = options.merge(user: users_id(options)['user']['id']) if options[:user] @@ -31,7 +31,7 @@ def users_getPresence(options = {}) # Get a user's identity. # # @see https://api.slack.com/methods/users.identity - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.identity.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.identity.json def users_identity(options = {}) post('users.identity', options) end @@ -44,7 +44,7 @@ def users_identity(options = {}) # @option options [Object] :include_locale # Set this to true to receive the locale for this user. Defaults to false. # @see https://api.slack.com/methods/users.info - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.info.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.info.json def users_info(options = {}) throw ArgumentError.new('Required arguments :user missing') if options[:user].nil? options = options.merge(user: users_id(options)['user']['id']) if options[:user] @@ -63,7 +63,7 @@ def users_info(options = {}) # @option options [Object] :presence # Whether to include presence data in the output. Setting this to false improves performance, especially with large teams. # @see https://api.slack.com/methods/users.list - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.list.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.list.json def users_list(options = {}) if block_given? Pagination::Cursor.new(self, :users_list, options).each do |page| @@ -78,7 +78,7 @@ def users_list(options = {}) # Marks a user as active. # # @see https://api.slack.com/methods/users.setActive - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.setActive.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setActive.json def users_setActive(options = {}) post('users.setActive', options) end @@ -95,7 +95,7 @@ def users_setActive(options = {}) # @option options [Object] :crop_y # Y coordinate of top-left corner of crop box. # @see https://api.slack.com/methods/users.setPhoto - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.setPhoto.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setPhoto.json def users_setPhoto(options = {}) throw ArgumentError.new('Required arguments :image missing') if options[:image].nil? post('users.setPhoto', options) @@ -107,7 +107,7 @@ def users_setPhoto(options = {}) # @option options [Object] :presence # Either auto or away. # @see https://api.slack.com/methods/users.setPresence - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users/users.setPresence.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users/users.setPresence.json def users_setPresence(options = {}) throw ArgumentError.new('Required arguments :presence missing') if options[:presence].nil? post('users.setPresence', options) diff --git a/lib/slack/web/api/endpoints/users_profile.rb b/lib/slack/web/api/endpoints/users_profile.rb index 783c1ecf..428ee107 100644 --- a/lib/slack/web/api/endpoints/users_profile.rb +++ b/lib/slack/web/api/endpoints/users_profile.rb @@ -13,7 +13,7 @@ module UsersProfile # @option options [user] :user # User to retrieve profile info for. # @see https://api.slack.com/methods/users.profile.get - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users.profile/users.profile.get.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.profile/users.profile.get.json def users_profile_get(options = {}) options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('users.profile.get', options) @@ -31,7 +31,7 @@ def users_profile_get(options = {}) # @option options [Object] :value # Value to set a single key to. Usable only if profile is not passed. # @see https://api.slack.com/methods/users.profile.set - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/users.profile/users.profile.set.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.profile/users.profile.set.json def users_profile_set(options = {}) options = options.merge(user: users_id(options)['user']['id']) if options[:user] post('users.profile.set', options) diff --git a/lib/slack/web/api/patches/chat.1.text-attachments-required.patch b/lib/slack/web/api/patches/chat.1.text-attachments-required.patch index f143229f..6cffce86 100644 --- a/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +++ b/lib/slack/web/api/patches/chat.1.text-attachments-required.patch @@ -3,7 +3,7 @@ index 1f7a8d7..2ec4bed 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -49,7 +49,7 @@ module Slack - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.postMessage.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.postMessage.json def chat_postMessage(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? - throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? diff --git a/lib/slack/web/api/patches/chat.3.update-attachments-support.patch b/lib/slack/web/api/patches/chat.3.update-attachments-support.patch index 472dd4d1..91e7da99 100644 --- a/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +++ b/lib/slack/web/api/patches/chat.3.update-attachments-support.patch @@ -3,7 +3,7 @@ index 5186416..490bc91 100644 --- a/lib/slack/web/api/endpoints/chat.rb +++ b/lib/slack/web/api/endpoints/chat.rb @@ -154,9 +154,15 @@ module Slack - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/chat/chat.update.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat/chat.update.json def chat_update(options = {}) throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil? - throw ArgumentError.new('Required arguments :text missing') if options[:text].nil? diff --git a/lib/slack/web/api/slack-api-ref b/lib/slack/web/api/slack-api-ref index 34a8162d..9f0fa239 160000 --- a/lib/slack/web/api/slack-api-ref +++ b/lib/slack/web/api/slack-api-ref @@ -1 +1 @@ -Subproject commit 34a8162dbd45411c79556739ef803c5213cffefe +Subproject commit 9f0fa2399da9808dad0d56fc463f7713accb923a diff --git a/lib/slack/web/api/templates/method.erb b/lib/slack/web/api/templates/method.erb index ad68075e..674ecf2f 100644 --- a/lib/slack/web/api/templates/method.erb +++ b/lib/slack/web/api/templates/method.erb @@ -26,7 +26,7 @@ module Slack <% end %> <% end %> # @see https://api.slack.com/methods/<%= group %>.<%= name %> - # @see https://github.com/dblock/slack-api-ref/blob/master/methods/<%= group %>/<%= group %>.<%= name %>.json + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/<%= group %>/<%= group %>.<%= name %>.json def <%= group.gsub(".", "_") %>_<%= name %>(options = {}) <% data['args'].select{ |k, v| v['required'] }.each do |arg_name, arg_v| %> throw ArgumentError.new('Required arguments :<%= arg_name %> missing') if options[:<%= arg_name %>].nil? diff --git a/lib/tasks/git.rake b/lib/tasks/git.rake index 0a1c14ef..fbfb60d3 100644 --- a/lib/tasks/git.rake +++ b/lib/tasks/git.rake @@ -1,5 +1,5 @@ namespace :slack do - # update slack-api-ref from https://github.com/dblock/slack-api-ref + # update slack-api-ref from https://github.com/slack-ruby/slack-api-ref task :git_update do sh 'git submodule update --init --recursive' sh 'git submodule foreach git pull origin master'