module Slack::Endpoint::Presence

Public Instance Methods

presence_set(options={}) click to toggle source

Manually set user presence

@option options [Object] :presence

Either `active` or `away`

@see api.slack.com/methods/presence.set @see github.com/aki017/slack-api-docs/blob/master/methods/presence.set.md @see github.com/aki017/slack-api-docs/blob/master/methods/presence.set.json

# File lib/slack/endpoint/presence.rb, line 14
def presence_set(options={})
  throw ArgumentError.new("Required arguments :presence missing") if options[:presence].nil?
  options[:attachments] = options[:attachments].to_json if Hash === options[:attachments]
  post("presence.set", options)
end