# frozen_string_literal: true # This file was auto-generated by lib/tasks/web.rake module Slack module Web module Api module Endpoints module AdminEmoji # # Add an emoji. # # @option options [string] :name # The name of the emoji to be added (using lower-case letters only). Colons (:myemoji:) around the value are not required, although they may be included. # @option options [string] :url # The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best. # @see https://api.slack.com/methods/admin.emoji.add # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.add.json def admin_emoji_add(options = {}) raise ArgumentError, 'Required arguments :name missing' if options[:name].nil? raise ArgumentError, 'Required arguments :url missing' if options[:url].nil? post('admin.emoji.add', options) end # # Add an emoji alias. # # @option options [string] :alias_for # Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed. # @option options [string] :name # The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed. # @see https://api.slack.com/methods/admin.emoji.addAlias # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.addAlias.json def admin_emoji_addAlias(options = {}) raise ArgumentError, 'Required arguments :alias_for missing' if options[:alias_for].nil? raise ArgumentError, 'Required arguments :name missing' if options[:name].nil? post('admin.emoji.addAlias', options) end # # List emoji for an Enterprise Grid organization. # # @option options [string] :cursor # Set cursor to next_cursor returned by the previous call to list items in the next page. # @option options [integer] :limit # The maximum number of items to return. Must be between 1 - 1000 both inclusive. # @see https://api.slack.com/methods/admin.emoji.list # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.list.json def admin_emoji_list(options = {}) if block_given? Pagination::Cursor.new(self, :admin_emoji_list, options).each do |page| yield page end else post('admin.emoji.list', options) end end # # Remove an emoji across an Enterprise Grid organization # # @option options [string] :name # The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included. # @see https://api.slack.com/methods/admin.emoji.remove # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.remove.json def admin_emoji_remove(options = {}) raise ArgumentError, 'Required arguments :name missing' if options[:name].nil? post('admin.emoji.remove', options) end # # Rename an emoji. # # @option options [string] :name # The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included. # @option options [string] :new_name # The new name of the emoji. # @see https://api.slack.com/methods/admin.emoji.rename # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.rename.json def admin_emoji_rename(options = {}) raise ArgumentError, 'Required arguments :name missing' if options[:name].nil? raise ArgumentError, 'Required arguments :new_name missing' if options[:new_name].nil? post('admin.emoji.rename', options) end end end end end end