Module: Slack::Web::Groups

Included in:
Slack::Web
Defined in:
lib/slack/web/groups.rb

Constant Summary collapse

SCOPE =
"groups"

Instance Method Summary collapse

Instance Method Details

#groups_archive(channel) ⇒ Object

Archives a private group.



7
8
9
10
# File 'lib/slack/web/groups.rb', line 7

def groups_archive(channel)
  response = @session.do_get "#{SCOPE}.archive", "channel" => channel
  Slack::parse_response(response)
end

#groups_close(channel) ⇒ Object

Closes a private group.



13
14
15
16
# File 'lib/slack/web/groups.rb', line 13

def groups_close(channel)
  response = @session.do_get "#{SCOPE}.close", "channel" => channel
  Slack::parse_response(response)
end

#groups_create(name) ⇒ Object

Creates a private group.



19
20
21
22
# File 'lib/slack/web/groups.rb', line 19

def groups_create(name)
  response = @session.do_get "#{SCOPE}.create", "name" => name
  Slack::parse_response(response)
end

#groups_create_child(channel) ⇒ Object

Clones and archives a private group.



25
26
27
28
# File 'lib/slack/web/groups.rb', line 25

def groups_create_child(channel)
  response = @session.do_get "#{SCOPE}.createChild", "channel" => channel
  Slack::parse_response(response)
end

#groups_history(channel, latest, oldest, inclusive, count) ⇒ Object

Fetches history of messages and events from a private group.



31
32
33
# File 'lib/slack/web/groups.rb', line 31

def groups_history(channel, latest, oldest, inclusive, count)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_invite(channel, user) ⇒ Object

Invites a user to a private group.



36
37
38
# File 'lib/slack/web/groups.rb', line 36

def groups_invite(channel, user)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_kick(channel, user) ⇒ Object

Removes a user from a private group.



41
42
43
# File 'lib/slack/web/groups.rb', line 41

def groups_kick(channel, user)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_leave(channel) ⇒ Object

Leaves a private group.



46
47
48
# File 'lib/slack/web/groups.rb', line 46

def groups_leave(channel)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_list(exclude_archived = 0) ⇒ Object

Lists private groups that the calling user has access to..



51
52
53
54
# File 'lib/slack/web/groups.rb', line 51

def groups_list(exclude_archived=0)
  response = @session.do_get "#{SCOPE}.list", "exclude_archived" => exclude_archived
  Slack::parse_response(response)
end

#groups_mark(channel, ts) ⇒ Object

Sets the read cursor in a private group.



57
58
59
# File 'lib/slack/web/groups.rb', line 57

def groups_mark(channel, ts)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_open(channel) ⇒ Object

Opens a private group.



62
63
64
# File 'lib/slack/web/groups.rb', line 62

def groups_open(channel)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_rename(channel, name) ⇒ Object

Renames a private group.



67
68
69
# File 'lib/slack/web/groups.rb', line 67

def groups_rename(channel, name)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_set_purpose(channel, purpose) ⇒ Object

Sets the purpose for a private group.



72
73
74
# File 'lib/slack/web/groups.rb', line 72

def groups_set_purpose(channel, purpose)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_set_topic(channel, topic) ⇒ Object

Sets the topic for a private group.



77
78
79
# File 'lib/slack/web/groups.rb', line 77

def groups_set_topic(channel, topic)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end

#groups_unarchive(channel) ⇒ Object

Unarchives a private group.



82
83
84
# File 'lib/slack/web/groups.rb', line 82

def groups_unarchive(channel)
  raise NotImplementedError.new("Not yet implemented, feel free to make a pull request")
end