# This file was auto-generated by lib/generators/tasks/generate.rb module Slack module Endpoint module Groups # # Archives a private group. # # @option options [group] :channel # Private group to archive # @see https://api.slack.com/methods/groups.archive # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.archive.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.archive.json def groups_archive(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.archive", options) end # # Closes a private group. # # @option options [group] :channel # Group to open. # @see https://api.slack.com/methods/groups.close # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.close.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.close.json def groups_close(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.close", options) end # # Creates a private group. # # @option options [Object] :name # Name of group to create # @see https://api.slack.com/methods/groups.create # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.create.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.create.json def groups_create(options={}) throw ArgumentError.new("Required arguments :name missing") if options[:name].nil? post("groups.create", options) end # # Clones and archives a private group. # # @option options [group] :channel # Group to clone and archive. # @see https://api.slack.com/methods/groups.createChild # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.createChild.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.createChild.json def groups_createChild(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.createChild", options) end # # Fetches history of messages and events from a private group. # # @option options [group] :channel # Group to fetch history for. # @option options [timestamp] :latest # Latest message timestamp to include in results. # @option options [timestamp] :oldest # Oldest message timestamp to include in results. # @option options [Object] :count # Number of messages to return, between 1 and 1000. # @see https://api.slack.com/methods/groups.history # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.history.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.history.json def groups_history(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.history", options) end # # Invites a user to a private group. # # @option options [group] :channel # Private group to invite user to. # @option options [user] :user # User to invite. # @see https://api.slack.com/methods/groups.invite # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.invite.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/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? post("groups.invite", options) end # # Removes a user from a private group. # # @option options [group] :channel # Group to remove user from. # @option options [user] :user # User to remove from group. # @see https://api.slack.com/methods/groups.kick # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.kick.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/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? post("groups.kick", options) end # # Leaves a private group. # # @option options [group] :channel # Group to leave # @see https://api.slack.com/methods/groups.leave # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.leave.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.leave.json def groups_leave(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.leave", options) end # # Lists private groups that the calling user has access to. # # @option options [Object] :exclude_archived # Don't return archived groups. # @see https://api.slack.com/methods/groups.list # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.list.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.list.json def groups_list(options={}) post("groups.list", options) end # # Sets the read cursor in a private group. # # @option options [group] :channel # Group to set reading cursor in. # @option options [timestamp] :ts # Timestamp of the most recently seen message. # @see https://api.slack.com/methods/groups.mark # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.mark.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/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? post("groups.mark", options) end # # Opens a private group. # # @option options [group] :channel # Group to open. # @see https://api.slack.com/methods/groups.open # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.open.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.open.json def groups_open(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.open", options) end # # Renames a private group. # # @option options [channel] :channel # Group to rename # @option options [Object] :name # New name for group. # @see https://api.slack.com/methods/groups.rename # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.rename.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/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? post("groups.rename", options) end # # Sets the purpose for a private group. # # @option options [channel] :channel # Private group to set the purpose of # @option options [Object] :purpose # The new purpose # @see https://api.slack.com/methods/groups.setPurpose # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.setPurpose.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/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? post("groups.setPurpose", options) end # # Sets the topic for a private group. # # @option options [channel] :channel # Private group to set the topic of # @option options [Object] :topic # The new topic # @see https://api.slack.com/methods/groups.setTopic # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.setTopic.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/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? post("groups.setTopic", options) end # # Unarchives a private group. # # @option options [group] :channel # Group to unarchive # @see https://api.slack.com/methods/groups.unarchive # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.unarchive.md # @see https://github.com/slackhq/slack-api-docs/blob/master/methods/groups.unarchive.json def groups_unarchive(options={}) throw ArgumentError.new("Required arguments :channel missing") if options[:channel].nil? post("groups.unarchive", options) end end end end