Module: Slack::Web::Api::Endpoints::AdminEmoji

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/admin_emoji.rb

Instance Method Summary collapse

Instance Method Details

#admin_emoji_add(options = {}) ⇒ Object

Add an emoji.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :name (Object)

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

  • :url (Object)

    The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.

See Also:



18
19
20
21
22
# 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 = {}) ⇒ Object

Add an emoji alias.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :alias_for (Object)

    The alias of the emoji.

  • :name (Object)

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

See Also:



33
34
35
36
37
# 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 = {}) ⇒ Object

List emoji for an Enterprise Grid organization.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :cursor (Object)

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

  • :limit (Object)

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

See Also:



48
49
50
51
52
53
54
55
56
# 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 = {}) ⇒ Object

Remove an emoji across an Enterprise Grid organization

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :name (Object)

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

See Also:



65
66
67
68
# 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 = {}) ⇒ Object

Rename an emoji.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :name (Object)

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

  • :new_name (Object)

    The new name of the emoji.

See Also:



79
80
81
82
83
# 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