module Slack::Web::Api::Endpoints::AdminEmoji

Public Instance Methods

admin_emoji_add(options = {}) click to toggle source

Add an emoji.

@option options [Object] :name

The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included.

@option options [Object] :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 api.slack.com/methods/admin.emoji.add @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.add.json

# File lib/slack/web/api/endpoints/admin_emoji.rb, line 18
def admin_emoji_add(options = {})
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  throw ArgumentError.new('Required arguments :url missing') if options[:url].nil?
  post('admin.emoji.add', options)
end
admin_emoji_addAlias(options = {}) click to toggle source

Add an emoji alias.

@option options [Object] :alias_for

The alias of the emoji.

@option options [Object] :name

The name of the emoji to be aliased. Colons (:myemoji:) around the value are not required, although they may be included.

@see api.slack.com/methods/admin.emoji.addAlias @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.addAlias.json

# File lib/slack/web/api/endpoints/admin_emoji.rb, line 33
def admin_emoji_addAlias(options = {})
  throw ArgumentError.new('Required arguments :alias_for missing') if options[:alias_for].nil?
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  post('admin.emoji.addAlias', options)
end
admin_emoji_list(options = {}) { |page| ... } click to toggle source

List emoji for an Enterprise Grid organization.

@option options [Object] :cursor

Set cursor to next_cursor returned by the previous call to list items in the next page.

@option options [Object] :limit

The maximum number of items to return. Must be between 1 - 1000 both inclusive.

@see api.slack.com/methods/admin.emoji.list @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.list.json

# File lib/slack/web/api/endpoints/admin_emoji.rb, line 48
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
admin_emoji_remove(options = {}) click to toggle source

Remove an emoji across an Enterprise Grid organization

@option options [Object] :name

The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.

@see api.slack.com/methods/admin.emoji.remove @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.remove.json

# File lib/slack/web/api/endpoints/admin_emoji.rb, line 65
def admin_emoji_remove(options = {})
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  post('admin.emoji.remove', options)
end
admin_emoji_rename(options = {}) click to toggle source

Rename an emoji.

@option options [Object] :name

The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included.

@option options [Object] :new_name

The new name of the emoji.

@see api.slack.com/methods/admin.emoji.rename @see github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.rename.json

# File lib/slack/web/api/endpoints/admin_emoji.rb, line 79
def admin_emoji_rename(options = {})
  throw ArgumentError.new('Required arguments :name missing') if options[:name].nil?
  throw ArgumentError.new('Required arguments :new_name missing') if options[:new_name].nil?
  post('admin.emoji.rename', options)
end