Page not found
62 | 63 |Sorry, but the page you were trying to get to, does not exist. You 64 | may want to try searching this site using the sidebar or using our 65 | API Reference page to find what 66 | you were looking for.
67 | 68 | 81 |├── test ├── test_helper.exs └── slackex_test.exs ├── .gitignore ├── doc ├── fonts │ ├── icomoon.eot │ ├── icomoon.ttf │ ├── icomoon.woff │ └── icomoon.svg ├── index.html ├── 404.html ├── Slackex.Emoji.html ├── Slackex.Auth.html ├── Slackex.Api.html ├── Slackex.RTM.html ├── Slackex.Supervisor.html ├── Slackex.OAuth.html ├── Slackex.UserGroups.Users.html ├── dist │ └── sidebar_items.js ├── Slackex.Search.html ├── Slackex.Chat.html ├── Slackex.Team.html ├── Slackex.Files.Comments.html ├── Slackex.Pins.html ├── Slackex.Stars.html ├── Slackex.Files.html ├── Slackex.UserGroups.html ├── Slackex.Reactions.html ├── Slackex.DoNotDisturb.html ├── Slackex.IM.html ├── Slackex.Users.html ├── Slackex.MPIM.html ├── api-reference.html ├── Slackex.Channels.html └── Slackex.Groups.html ├── lib ├── slackex │ ├── emoji.ex │ ├── api.ex │ ├── auth.ex │ ├── rtm.ex │ ├── supervisor.ex │ ├── team.ex │ ├── oauth.ex │ ├── usergroups.users.ex │ ├── search.ex │ ├── stars.ex │ ├── chat.ex │ ├── files.ex │ ├── files.comments.ex │ ├── pins.ex │ ├── dnd.ex │ ├── usergroups.ex │ ├── reactions.ex │ ├── users.ex │ ├── instant_message.ex │ ├── multiparty_instant_message.ex │ ├── channels.ex │ └── groups.ex └── slackex.ex ├── mix.lock ├── LICENSE ├── README.md └── mix.exs /test/test_helper.exs: -------------------------------------------------------------------------------- 1 | ExUnit.start() 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /_build 2 | /cover 3 | /deps 4 | erl_crash.dump 5 | *.ez 6 | /config/dev.secret.exs -------------------------------------------------------------------------------- /doc/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidstump/slackex/HEAD/doc/fonts/icomoon.eot -------------------------------------------------------------------------------- /doc/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidstump/slackex/HEAD/doc/fonts/icomoon.ttf -------------------------------------------------------------------------------- /doc/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidstump/slackex/HEAD/doc/fonts/icomoon.woff -------------------------------------------------------------------------------- /test/slackex_test.exs: -------------------------------------------------------------------------------- 1 | defmodule SlackexTest do 2 | use ExUnit.Case 3 | doctest Slackex 4 | 5 | test "the truth" do 6 | assert 1 + 1 == 2 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /lib/slackex/emoji.ex: -------------------------------------------------------------------------------- 1 | defmodule Slackex.Emoji do 2 | @moduledoc """ 3 | Gets custom Emojis for a team. 4 | """ 5 | 6 | @doc """ 7 | This method lists the custom emoji for a team. 8 | """ 9 | def list(options \\ %{}) do 10 | Slackex.request("emoji.list", options) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/slackex/api.ex: -------------------------------------------------------------------------------- 1 | defmodule Slackex.Api do 2 | @moduledoc """ 3 | API Test Calls for Slack 4 | """ 5 | 6 | @doc """ 7 | Returns an "ok" message when a 8 | successfull connection to the Slack 9 | API is made 10 | """ 11 | 12 | def test do 13 | Slackex.request("api.test") 14 | end 15 | 16 | end 17 | -------------------------------------------------------------------------------- /lib/slackex/auth.ex: -------------------------------------------------------------------------------- 1 | defmodule Slackex.Auth do 2 | @moduledoc """ 3 | Authentication Calls for Slack 4 | """ 5 | 6 | @doc """ 7 | Checks Slack Authentication and tells 8 | the user who they are. 9 | """ 10 | 11 | def test(options \\ %{}) do 12 | Slackex.request("auth.test", options) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Sorry, but the page you were trying to get to, does not exist. You 64 | may want to try searching this site using the sidebar or using our 65 | API Reference page to find what 66 | you were looking for.
67 | 68 | 81 |Gets custom Emojis for a team.
71 | 72 |This method lists the custom emoji for a team.
131 | 132 |Authentication Calls for Slack
71 | 72 |Checks Slack Authentication and tells 132 | the user who they are.
133 | 134 |API Test Calls for Slack
71 | 72 |Returns an “ok” message when a 133 | successfull connection to the Slack 134 | API is made
135 | 136 |Manage Slack Real Time Messaging Session
71 | 72 |This method starts a Real Time Messaging API session. 96 | Refer to the RTM API documentation for full details on 97 | how to use the RTM API
98 |This method starts a Real Time Messaging API session. 133 | Refer to the RTM API documentation for full details on 134 | how to use the RTM API.
135 | 136 |Callback implementation for c::supervisor.init/1
Callback implementation for c::supervisor.init/1.
Exchanges a temporary OAuth code for an API token.
71 | 72 |This method allows you to exchange a temporary OAuth 96 | code for an API access token. This is used as part of 97 | the OAuth authentication flow
98 |This method allows you to exchange a temporary OAuth 133 | code for an API access token. This is used as part of 134 | the OAuth authentication flow.
135 |As discussed in RFC 6749 it is possible to supply the 136 | Client ID and Client Secret using the HTTP Basic 137 | authentication scheme. If HTTP Basic authentication is 138 | used you do not need to supply the client_id and 139 | client_secret parameters as part of the request.
140 | 141 |Get information on users in usergroups
71 | 72 |This method returns a list of all users within 96 | a user group
97 |This method updates the list of users that belong to 106 | a user group. This method replaces all users in a user 107 | group with the list of users provided in the users 108 | parameter
109 |This method returns a list of all users within 144 | a user group.
145 | 146 |This method updates the list of users that belong to 159 | a user group. This method replaces all users in a user 160 | group with the list of users provided in the users 161 | parameter.
162 | 163 |Search your team’s files and messages.
71 | 72 |This method allows to to search both messages 96 | and files in a single call
97 |This method returns files matching a search query
106 |This method returns messages matching a search query
115 |This method allows to to search both messages 150 | and files in a single call.
151 | 152 |This method returns files matching a search query.
165 | 166 |This method returns messages matching a search query.
179 | 180 |Post chat messages to Slack.
71 | 72 |This method deletes a message from a channel
96 |This method posts a message to a public channel, 105 | private group, or IM channel
106 |This method updates a message in a channel
115 |This method deletes a message from a channel.
150 | 151 |This method posts a message to a public channel, 164 | private group, or IM channel.
165 | 166 |This method updates a message in a channel.
179 | 180 |Get info on your team
71 | 72 |This method is used to get the access logs for 96 | users on a team
97 |This method provides information about your team
106 |This method lists the integration activity logs for 115 | a team, including when integrations are added, modified 116 | and removed. This method can only be called by Admins
117 |This method is used to get the access logs for 152 | users on a team.
153 | 154 |This method provides information about your team.
167 | 168 |This method lists the integration activity logs for 181 | a team, including when integrations are added, modified 182 | and removed. This method can only be called by Admins.
183 | 184 |Handles comments on files
71 | 72 |Add a comment to an existing file
96 |Delete an existing comment on a file. Only the 105 | original author of the comment or a team 106 | administrator may delete a file comment
107 |Edit an existing comment on a file. Only the user who 116 | created a comment may make edits. Teams may configure 117 | a limited time window during which file comment edits 118 | are allowed
119 |Add a comment to an existing file.
154 | 155 |Delete an existing comment on a file. Only the 168 | original author of the comment or a team 169 | administrator may delete a file comment.
170 | 171 |Edit an existing comment on a file. Only the user who 184 | created a comment may make edits. Teams may configure 185 | a limited time window during which file comment edits 186 | are allowed.
187 | 188 |Manage Slack Pins
71 | 72 |This method pins an item (file, file comment, channel 96 | message, or group message) to a particular channel. 97 | The channel argument is required and one of file, 98 | file_comment, or timestamp must also be specified
99 |This method lists the items pinned to a channel
108 |This method un-pins an item (file, file comment, 117 | channel message, or group message) from a channel. 118 | The channel argument is required and one of file, 119 | file_comment, or timestamp must also be specified
120 |This method pins an item (file, file comment, channel 155 | message, or group message) to a particular channel. 156 | The channel argument is required and one of file, 157 | file_comment, or timestamp must also be specified.
158 | 159 |This method lists the items pinned to a channel.
172 | 173 |This method un-pins an item (file, file comment, 186 | channel message, or group message) from a channel. 187 | The channel argument is required and one of file, 188 | file_comment, or timestamp must also be specified.
189 | 190 |Manage Slack Stars
71 | 72 |This method adds a star to an item (message, file, 96 | file comment, channel, private group, or DM) on behalf 97 | of the authenticated user. One of file, file_comment, 98 | channel, or the combination of channel and timestamp 99 | must be specified
100 |This method lists the items starred by a user
109 |This method removes a star from an item (message, 118 | file, file comment, channel, private group, or DM) 119 | on behalf of the authenticated user. One of file, 120 | file_comment, channel, or the combination of channel 121 | and timestamp must be specified
122 |This method adds a star to an item (message, file, 157 | file comment, channel, private group, or DM) on behalf 158 | of the authenticated user. One of file, file_comment, 159 | channel, or the combination of channel and timestamp 160 | must be specified.
161 | 162 |This method lists the items starred by a user.
175 | 176 |This method removes a star from an item (message, 189 | file, file comment, channel, private group, or DM) 190 | on behalf of the authenticated user. One of file, 191 | file_comment, channel, or the combination of channel 192 | and timestamp must be specified.
193 | 194 |Get info on files uploaded to Slack, upload 71 | new files to Slack.
72 | 73 |This method deletes a file from your team
97 |This method returns information about a file in 106 | your team
107 |This method returns a list of files within the team. 116 | It can be filtered and sliced in various ways
117 |This method allows you to create or upload an existing file
126 |This method deletes a file from your team.
161 | 162 |This method returns information about a file in 175 | your team.
176 | 177 |This method returns a list of files within the team. 190 | It can be filtered and sliced in various ways.
191 | 192 |This method allows you to create or upload an existing file.
205 | 206 |Get info on your team’s user groups.
71 | 72 |This method is used to create a user group
96 |This method disables an existing user group
105 |This method enables a user group which was 114 | previously disabled
115 |This method returns a list of all user groups in the 124 | team. This can optionally include disabled user groups
125 |This method updates the properties of an existing 134 | user group
135 |This method is used to create a user group.
170 | 171 |This method disables an existing user group.
184 | 185 |This method enables a user group which was 198 | previously disabled.
199 | 200 |This method returns a list of all user groups in the 213 | team. This can optionally include disabled user groups.
214 | 215 |This method updates the properties of an existing 228 | user group.
229 | 230 |Manage Slack Reactions
71 | 72 |This method adds a reaction (emoji) to an item 96 | (file, file comment, channel message, group message, 97 | or direct message). One of file, file_comment, or 98 | the combination of channel and timestamp must be 99 | specified
100 |This method returns a list of all reactions for a single 109 | item (file, file comment, channel message, group message, 110 | or direct message)
111 |This method returns a list of all items (file, file comment, 120 | channel message, group message, or direct message) reacted 121 | to by a user
122 |This method removes a reaction (emoji) from an item (file, 131 | file comment, channel message, group message, or direct 132 | message). One of file, file_comment, or the combination of 133 | channel and timestamp must be specified
134 |This method adds a reaction (emoji) to an item 169 | (file, file comment, channel message, group message, 170 | or direct message). One of file, file_comment, or 171 | the combination of channel and timestamp must be 172 | specified.
173 | 174 |This method returns a list of all reactions for a single 187 | item (file, file comment, channel message, group message, 188 | or direct message).
189 | 190 |This method returns a list of all items (file, file comment, 203 | channel message, group message, or direct message) reacted 204 | to by a user.
205 | 206 |This method removes a reaction (emoji) from an item (file, 219 | file comment, channel message, group message, or direct 220 | message). One of file, file_comment, or the combination of 221 | channel and timestamp must be specified.
222 | 223 |Adjust and view Do Not Disturb settings for 71 | team members
72 | 73 |Ends the user’s currently scheduled Do Not Disturb session immediately
97 |Ends the current user’s snooze mode immediately
106 |Provides information about a user’s current 115 | Do Not Disturb settings
116 |Adjusts the snooze duration for a user’s Do Not 125 | Disturb settings. If a snooze session is not 126 | already active for the user, invoking this method 127 | will begin one for the specified duration
128 |Provides information about the current Do Not Disturb 137 | settings for users of a Slack team
138 |Ends the user’s currently scheduled Do Not Disturb session immediately.
173 | 174 |Ends the current user’s snooze mode immediately.
187 | 188 |Provides information about a user’s current 201 | Do Not Disturb settings.
202 | 203 |Adjusts the snooze duration for a user’s Do Not 216 | Disturb settings. If a snooze session is not 217 | already active for the user, invoking this method 218 | will begin one for the specified duration.
219 | 220 |Provides information about the current Do Not Disturb 233 | settings for users of a Slack team.
234 | 235 |Get info on your direct messages.
71 | 72 |This method closes a direct message channel
96 |This method returns a portion of messages/events 105 | from the specified direct message channel. To read 106 | the entire history for a direct message channel, call 107 | the method with no latest or oldest arguments, and 108 | then continue paging using the instructions below
109 |This method returns a list of all im channels that 118 | the user has
119 |This method moves the read cursor in a direct message 128 | channel
129 |This method opens a direct message channel with 138 | another member of your Slack team
139 |This method closes a direct message channel.
174 | 175 |This method returns a portion of messages/events 188 | from the specified direct message channel. To read 189 | the entire history for a direct message channel, call 190 | the method with no latest or oldest arguments, and 191 | then continue paging using the instructions below.
192 | 193 |This method returns a list of all im channels that 206 | the user has.
207 | 208 |This method moves the read cursor in a direct message 221 | channel.
222 | 223 |This method opens a direct message channel with 236 | another member of your Slack team.
237 | 238 |Get info on members of your Slack team.
71 | 72 |This method lets you find out information about 96 | a user’s presence. Consult the presence documentation 97 | for more details
98 |This method returns information about a team member
107 |This method returns a list of all users in the team. This 116 | includes deleted/deactivated users
117 |This method lets the slack messaging server know that the 126 | authenticated user is currently active. Consult the 127 | presence documentation for more details
128 |This method lets you set the calling user’s manual presence. 137 | Consult the presence documentation for more details
138 |This method lets you find out information about 173 | a user’s presence. Consult the presence documentation 174 | for more details.
175 | 176 |This method returns information about a team member.
189 | 190 |This method returns a list of all users in the team. This 203 | includes deleted/deactivated users.
204 | 205 |This method lets the slack messaging server know that the 218 | authenticated user is currently active. Consult the 219 | presence documentation for more details.
220 | 221 |This method lets you set the calling user’s manual presence. 234 | Consult the presence documentation for more details.
235 | 236 |Get info on your multiparty direct messages.
71 | 72 |Get info on your multiparty direct messages
96 |This method returns a portion of messages/events 105 | from the specified multiparty direct message channel. 106 | To read the entire history for a multiparty direct 107 | message, call the method with no latest or oldest 108 | arguments, and then continue paging using the 109 | instructions below
110 |This method returns a list of all multiparty direct 119 | message channels that the user has
120 |This method moves the read cursor in a multiparty 129 | direct message channel
130 |This method opens a multiparty direct message
139 |Get info on your multiparty direct messages.
174 | 175 |This method returns a portion of messages/events 188 | from the specified multiparty direct message channel. 189 | To read the entire history for a multiparty direct 190 | message, call the method with no latest or oldest 191 | arguments, and then continue paging using the 192 | instructions below.
193 | 194 |This method returns a list of all multiparty direct 207 | message channels that the user has.
208 | 209 |This method moves the read cursor in a multiparty 222 | direct message channel.
223 | 224 |This method opens a multiparty direct message.
237 |Opening a multiparty direct message takes a list of 238 | up-to 8 encoded user ids. If there is no MPIM already 239 | created that includes that exact set of members, a 240 | new MPIM will be created. Subsequent calls to mpim.open 241 | with the same set of users will return the already 242 | existing MPIM conversation.
243 | 244 |An HTTP client for Slack
81 |API Test Calls for Slack
88 |Authentication Calls for Slack
95 |Get info on your team’s Slack channels, 102 | create or archive channels, invite users, 103 | set the topic and purpose, and mark a 104 | channel as read
105 |Post chat messages to Slack
112 |Adjust and view Do Not Disturb settings for 119 | team members
120 |Gets custom Emojis for a team
127 |Get info on files uploaded to Slack, upload 134 | new files to Slack
135 |Handles comments on files
142 |Get info on your team’s private channels
149 |Get info on your direct messages
156 |Get info on your multiparty direct messages
163 |Exchanges a temporary OAuth code for an API token
170 |Manage Slack Pins
177 |Manage Slack Real Time Messaging Session
184 |Manage Slack Reactions
191 |Search your team’s files and messages
198 |Manage Slack Stars
205 |Get info on your team
216 |Get info on your team’s user groups
223 |Get information on users in usergroups
230 |Get info on members of your Slack team
237 |Get info on your team’s Slack channels, 71 | create or archive channels, invite users, 72 | set the topic and purpose, and mark a 73 | channel as read.
74 | 75 |This method archives a channel
99 |This method is used to create a channel
108 |This method returns a portion of messages/events 117 | from the specified channel. To read the entire 118 | history for a channel, call the method with no 119 | latest or oldest arguments, and then continue paging 120 | using the instructions below
121 |This method is used to invite a user to a channel. 138 | The calling user must be a member of the channel
139 |This method is used to join a channel. If the 148 | channel does not exist, it is created
149 |This method allows a user to remove another member 158 | from a team channel
159 |This method is used to leave a channel
168 |This method returns a list of all channels 177 | in the team. This includes channels the 178 | caller is in, channels they are not currently 179 | in, and archived channels but does not include 180 | private channels. The number of (non-deactivated) 181 | members in each channel is also returned
182 |This method moves the read cursor in a channel
191 |This method renames a team channel
200 |This method is used to change the purpose of a 209 | channel. The calling user must be a member of 210 | the channel
211 |This method is used to change the topic of a 220 | channel. The calling user must be a member of 221 | the channel
222 |This method unarchives a channel. The calling 231 | user is added to the channel
232 |This method archives a channel.
267 | 268 |This method is used to create a channel.
281 | 282 |This method returns a portion of messages/events 295 | from the specified channel. To read the entire 296 | history for a channel, call the method with no 297 | latest or oldest arguments, and then continue paging 298 | using the instructions below.
299 | 300 |This method is used to invite a user to a channel. 326 | The calling user must be a member of the channel.
327 | 328 |This method is used to join a channel. If the 341 | channel does not exist, it is created.
342 | 343 |This method allows a user to remove another member 356 | from a team channel.
357 | 358 |This method is used to leave a channel.
371 | 372 |This method returns a list of all channels 385 | in the team. This includes channels the 386 | caller is in, channels they are not currently 387 | in, and archived channels but does not include 388 | private channels. The number of (non-deactivated) 389 | members in each channel is also returned.
390 |To retrieve a list of private channels, use groups.list
391 | 392 |This method moves the read cursor in a channel.
405 | 406 |This method renames a team channel.
419 |The only people who can rename a channel are team 420 | admins, or the person that originally created the 421 | channel. Others will receive a “not_authorized” 422 | error.
423 | 424 |This method is used to change the purpose of a 437 | channel. The calling user must be a member of 438 | the channel.
439 | 440 |This method is used to change the topic of a 453 | channel. The calling user must be a member of 454 | the channel.
455 | 456 |This method unarchives a channel. The calling 469 | user is added to the channel.
470 | 471 |Get info on your team’s private channels.
71 | 72 |This method archives a private channel
96 |This method closes a private channel
105 |This method creates a private channel
114 |This method takes an existing private channel and 123 | performs the following steps
124 |This method returns a portion of messages/events from the 133 | specified private channel. To read the entire history for 134 | a private channel, call the method with no latest or oldest 135 | arguments, and then continue paging using the instructions 136 | below
137 |This method returns information about a private channel
146 |This method is used to invite a user to a private channel. 155 | The calling user must be a member of the private channel
156 |This method allows a user to remove another member from a 165 | private channel
166 |This method is used to leave a private channel
175 |This method returns a list of private channels in 184 | the team that the caller is in and archived groups 185 | that the caller was in. The list of (non-deactivated) 186 | members in each private channel is also returned
187 |This method moves the read cursor in a private channel
196 |This method opens a private channel
205 |This method renames a private channel
214 |This method is used to change the purpose of a 223 | private channel. The calling user must be a member 224 | of the private channel
225 |This method is used to change the topic of a private 234 | channel. The calling user must be a member of the 235 | private channel
236 |This method unarchives a private channel
245 |This method archives a private channel.
280 | 281 |This method closes a private channel.
294 | 295 |This method creates a private channel.
308 | 309 |This method takes an existing private channel and 322 | performs the following steps:
323 |This is useful when inviting a new member to an existing 337 | private channel while hiding all previous chat history from 338 | them. In this scenario you can call groups.createChild 339 | followed by groups.invite.
340 |The new private channel will have a special parent_group 341 | property pointing to the original archived private channel. 342 | This will only be returned for members of both private channels, 343 | so will not be visible to any newly invited members.
344 | 345 |This method returns a portion of messages/events from the 358 | specified private channel. To read the entire history for 359 | a private channel, call the method with no latest or oldest 360 | arguments, and then continue paging using the instructions 361 | below.
362 | 363 |This method returns information about a private channel.
376 | 377 |This method is used to invite a user to a private channel. 390 | The calling user must be a member of the private channel.
391 |To invite a new member to a private channel without giving 392 | them access to the archives of the private channel, call 393 | the groups.createChild method before inviting.
394 | 395 |This method allows a user to remove another member from a 408 | private channel.
409 | 410 |This method is used to leave a private channel.
423 | 424 |This method returns a list of private channels in 437 | the team that the caller is in and archived groups 438 | that the caller was in. The list of (non-deactivated) 439 | members in each private channel is also returned.
440 | 441 |This method moves the read cursor in a private channel.
454 | 455 |This method opens a private channel.
468 | 469 |This method renames a private channel.
482 | 483 |This method is used to change the purpose of a 496 | private channel. The calling user must be a member 497 | of the private channel.
498 | 499 |This method is used to change the topic of a private 512 | channel. The calling user must be a member of the 513 | private channel.
514 | 515 |This method unarchives a private channel.
528 | 529 |