Sha256: c1b2b7f4c278472b588d3303f6ac403bfb7b8378ccba6fd8da69926eaaf40e5e

Contents?: true

Size: 377 Bytes

Versions: 15

Compression:

Stored size: 377 Bytes

Contents

module Boty
  module Slack
    class IM
      include Slack::URL
      url "https://slack.com/api/im"

      def open(user, parameters = {})
        defaults = { user: user }
        url = parameterize defaults.merge(parameters), path: ".open"
        info = URL.get(url) || {}
        Slack::Channel.new id: Hash(info["channel"])["id"], info: info
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
boty-1.0.1 lib/boty/slack/im.rb
boty-1.0.0 lib/boty/slack/im.rb
boty-0.2.0 lib/boty/slack/im.rb
boty-0.1.2 lib/boty/slack/im.rb
boty-0.1.1 lib/boty/slack/im.rb
boty-0.1.0 lib/boty/slack/im.rb
boty-0.0.17.1 lib/boty/slack/im.rb
boty-0.0.17 lib/boty/slack/im.rb
boty-0.0.16 lib/boty/slack/im.rb
boty-0.0.15 lib/boty/slack/im.rb
boty-0.0.14 lib/boty/slack/im.rb
boty-0.0.13 lib/boty/slack/im.rb
boty-0.0.12 lib/boty/slack/im.rb
boty-0.0.11 lib/boty/slack/im.rb
boty-0.0.10 lib/boty/slack/im.rb