Sha256: fe3bf56f1c714a6cd7df073b693f6cc6f93a9b38ddc8a132489ebe371b28830e

Contents?: true

Size: 872 Bytes

Versions: 3

Compression:

Stored size: 872 Bytes

Contents

module Slatan
  module Mouth
    module Reactions
      @category = 'reactions'

      class << self
        ## @see https://api.slack.com/methods/reactions.add
        def add(name, options={})
          send('add', {
            name: name
          }.merge(options))
        end

        ## @see https://api.slack.com/methods/reactions.get
        def get(options={})
          send('get', options)
        end

        ## @see https://api.slack.com/methods/reactions.list
        def list(options={})
          send('list', options)
        end

        ## @see https://api.slack.com/methods/reactions.remove
        def remove(name, options={})
          send('remove', {
            name: name
          }.merge(options))
        end

        private
        def send(method, msg)
          Mouth.send(@category, method, msg)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slatan-0.2.2 lib/slatan/mouth/reactions.rb
slatan-0.2.0 lib/slatan/mouth/reactions.rb
slatan-0.1.0 lib/slatan/mouth/reactions.rb